Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp228003ybg; Thu, 11 Jun 2020 23:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsM2MT+w/J4D9ozCJwY2qNFLhFcLZrcmZGLEi4I00ekbS+ELYWo6zHHshm/LabFRHckK2l X-Received: by 2002:a17:906:f74a:: with SMTP id jp10mr11814663ejb.43.1591942255115; Thu, 11 Jun 2020 23:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591942255; cv=none; d=google.com; s=arc-20160816; b=uI+dzqtXCmg0keWAHI3FsxYQGmx+b9j84pfpTW0anIevroYl+hjoK/nHVTrM80yvoW EETrBnEDIGss/p9pEKU5RwNjfdxu2GbHeroBn5SNsXZTwVlCkAxRmTOBwFXFlmEJkCNO mQrP3IM/TdwrbKFHzGf3tSyMRblQ+Fk3CfJCaI0FlRWwaQYNZkaTErQuC35nKFdmaGDm 5JmkcI40KAB+j72MaSgZeYfd0y/FX+q7ZJhWpH0FKI7CXEblAONi7b+YSJZIM2U58N8G qqLb2WceNXxi5KqTPSDP9mcBMrV5RgW9jMBTdY9AS+hpzEjyyXHBQB4ysUAb/P70POL0 uCDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=qbuk7psowNB0J8EsE0jiRGC0cW/cxZYQsleiZW/6/rI=; b=tZzC3I/6UgSxOTFbDE7o5oc8Lb4NAF63emRuqfJ7wvGs+IblMrn8a8ij1AR+XQ3Ous RUum4NOmcQhoqMxiFHGu4m8M8gs6eZgY0tysFILrmawK7YLp+dovUxTKc4lDoEqE45d7 fJiFiLP1eqdzurPEPXlEM6hmTXjXVUFexUFXQZY3l2LV2LNzoPsoaQp+XxFYxJcECHrt jMR19HsRaGkkefqpwjQrqodjxAgsgaa0Yz5d4SO8QkPP4FIo+bvEfZ6Z+d3rU7IYvDai T15WdyToZeWO/WtYAkPmeeXuA/ATpU5VPD+XM1Gf+s2/3aR8iXUpYwtKcqn3WqAgLWEV Cf8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z28si3157639edi.287.2020.06.11.23.10.32; Thu, 11 Jun 2020 23:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726473AbgFLGGg (ORCPT + 99 others); Fri, 12 Jun 2020 02:06:36 -0400 Received: from mga17.intel.com ([192.55.52.151]:37896 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbgFLGGf (ORCPT ); Fri, 12 Jun 2020 02:06:35 -0400 IronPort-SDR: VqHlzLLVtE8ri6LCL85wIA66Yl9Ea5G1YVi7Mzu/L6YzWLnMEAy7yKVvZtP0SAg9PO0egn3PCS OmtoTJQ3Q/gw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 23:06:35 -0700 IronPort-SDR: t2oR15pPScZH7yIFwN9eLEB+YnIWO4LXheA7PMMH6XUiA6mgEok6PLUVsgBPntobo7EceaVyzQ 2mPBceX+rm7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,502,1583222400"; d="scan'208";a="289783286" Received: from brentlu-desk0.itwn.intel.com ([10.5.253.11]) by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 23:06:30 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Cc: Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown , Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Zhu Yingjiang , Keyon Jie , Brent Lu , Bard Liao , sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: SOF: Intel: hda: unsolicited RIRB response Date: Fri, 12 Jun 2020 14:01:09 +0800 Message-Id: <1591941669-28683-1-git-send-email-brent.lu@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Port commit 6d011d5057ff ("ALSA: hda: Clear RIRB status before reading WP") from legacy HDA driver to fix the get response timeout issue. Current SOF driver does not suffer from this issue because sync write is enabled in hda_init. The issue will come back if the sync write is disabled for some reason. Signed-off-by: Brent Lu --- sound/soc/sof/intel/hda-stream.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-stream.c b/sound/soc/sof/intel/hda-stream.c index 7f65dcc..1bda14c 100644 --- a/sound/soc/sof/intel/hda-stream.c +++ b/sound/soc/sof/intel/hda-stream.c @@ -653,11 +653,16 @@ irqreturn_t hda_dsp_stream_threaded_handler(int irq, void *context) if (status & AZX_INT_CTRL_EN) { rirb_status = snd_hdac_chip_readb(bus, RIRBSTS); if (rirb_status & RIRB_INT_MASK) { + /* + * Clearing the interrupt status here ensures + * that no interrupt gets masked after the RIRB + * wp is read in snd_hdac_bus_update_rirb. + */ + snd_hdac_chip_writeb(bus, RIRBSTS, + RIRB_INT_MASK); active = true; if (rirb_status & RIRB_INT_RESPONSE) snd_hdac_bus_update_rirb(bus); - snd_hdac_chip_writeb(bus, RIRBSTS, - RIRB_INT_MASK); } } #endif -- 2.7.4