Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp373860ybg; Fri, 12 Jun 2020 04:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2tIFQFr6Slcju7/PtlYb45PoeJyhdJ4vYe2AD91ujspXYCLP3sykx7J6pS6sJFRtQLgrO X-Received: by 2002:aa7:c486:: with SMTP id m6mr11486899edq.234.1591959617077; Fri, 12 Jun 2020 04:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591959617; cv=none; d=google.com; s=arc-20160816; b=uhSI3QrNWxV9d8pJvCwox55JpF9ZFNl+QIK8/sjX/dX7HnQU+CRvN0F7bRVx/DQi3t D00tieIA2m+QQuWz9UkFET1UaWKECjC7Zt2g6OdqTdKMTifIrbD8T+5FBRwzSGupg9RD gJwYtDOLzfS5PkNFwutm8DJqY6g/L06H+sjILzDm6pp7GjELZaskErsLV6LQJA1hB9Wh /rGTPPGjH7UHmB1Am75HngKERdDNysCyl7oqEpOgqmw2ftRy8eYk/oNo9YzKRTGmoADY v+TuIz04Vk48Hgmgl8viKVRWTupQVRHDEoqfDbEelDVKt1QLLN0HJLVi8bBWg4Znbmie Z2JQ== 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=lEc127CxDDOJu7Xbp54K/Ez+F03XFc8D4Ail/qgjeWTBxPd3+I7K5UjLswYkRXhlTM jQzjPCU4BoPI/uMSzg74Ua7PwT9c5R1rxWgKR6JEKY+hqfdiesfvPd8QPkzNL7sshUYq rhpKouAoWb3ch/T7QWDYPEtG3/12kjhTUqslEdtCPYYsLWP6TgfkQyrLn9yAOOXTwHju NT3GoeH4QpnIMaZc6LYvo8svxN+6/NrJkz+A0x2TYkuJrpqeoGbV1X+5ZlYavVXRe1VW PSLR1g3AyDwyzCeHLOx37ieNTY+F5UqXo2tjFV0L5+Y2QS0YeZtdFyeItQKR6wjey7rA 95Ig== 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 z18si3553482ejb.75.2020.06.12.03.59.53; Fri, 12 Jun 2020 04:00:17 -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 S1725886AbgFLK4F (ORCPT + 99 others); Fri, 12 Jun 2020 06:56:05 -0400 Received: from mga09.intel.com ([134.134.136.24]:62716 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgFLK4E (ORCPT ); Fri, 12 Jun 2020 06:56:04 -0400 IronPort-SDR: 73cvHR1/QySTocqbYgYCtLQcVWPVHnwmIf9mPhhyO8PW9PKfWgevYyedTdUot/oVj7pnrb7dG5 cAnJrRxAyLSw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2020 03:56:04 -0700 IronPort-SDR: ZcGLl+RkwYt02Z8/gxScjrfLCyrd+lsf9nChOIzUYX1xpa7CjJqsblc7ofsxXz5d63WK5YLMdh xCLDm9xZbaWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,503,1583222400"; d="scan'208";a="259857472" Received: from brentlu-desk0.itwn.intel.com ([10.5.253.11]) by fmsmga007.fm.intel.com with ESMTP; 12 Jun 2020 03:56:00 -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 v3] ASoC: SOF: Intel: hda: Clear RIRB status before reading WP Date: Fri, 12 Jun 2020 18:50:48 +0800 Message-Id: <1591959048-15813-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