Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1493388ybg; Thu, 11 Jun 2020 11:15:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL1JiJqAkCfnI8BW4tkOw84OcWXh9tGiyXA1vMLr/wB4WeGFDK31pz4ctHgnPoUuW+vfk3 X-Received: by 2002:a17:906:57d3:: with SMTP id u19mr9736010ejr.401.1591899312056; Thu, 11 Jun 2020 11:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591899312; cv=none; d=google.com; s=arc-20160816; b=xfZnjyo3wTQe5VniQa1LYp908SR9fI6T8bdFYRtYqxu7jn8BzDFBwTB74UdQBcJGM7 GdWA0FzxC82nWpNjb3SDIllGcR6Ku9k7Zc5m0Nv7jHgaPf/FK+Sd5jdUyL08j7iBhwCb v+QSOOgt/dhci9tTxUfIvdJK1UM4cHpCw2TYynBrw1wRuBYV9r3Yd/exU+abepao4EKr w70+qvl6Fxn6lRpFh8meGmC5XDFvaoTekpRBQsXLEDeEIvs48GVFdSJayAWdZ7xj+b6R FVFkwyMc/HhU51QKstkgpxzqUz+RqOEYUzkack25emZe7RQxJCin9IgfXTv74Gk4QFR0 1FTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :ironport-sdr:ironport-sdr; bh=qdyi7n78YJtjjUetrfGqrfGg1lZIom9KGBztgt5r6VA=; b=aSnOAYAByFnFGmopM6JD776sLWR69sCQW1hZtXRCb0VtK1Sk/K/GrE/51ueWG/qRvo rYzPExU6pYAYg4M29YjpcxK+mCEuK22shJ4ZQ5k89dGxjzZvp4cK3CTaF/swRieHr2Vo mMNGbCvcbqJIeYqIpK/JaZYuBdxIvjlT3i9KCkxbK8RV/fnAdObaC63P7L6XiZ3WWCQ2 cqd3YVkhXubJoH3+qgkIEFzIFfx1WkLDBA8p3HVXacKed9Yg+liFJ6BjwyewDvx/sVm3 eAiH4cum7EXLLxewbvvbziVj4SbuDWAiBiKP+cm5+RdMY6Z4P/7xhwtHu6GPsZqNKS7V Sojg== 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 dc20si1946163edb.75.2020.06.11.11.14.47; Thu, 11 Jun 2020 11:15:12 -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 S1726681AbgFKSM4 (ORCPT + 99 others); Thu, 11 Jun 2020 14:12:56 -0400 Received: from mga12.intel.com ([192.55.52.136]:7619 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725824AbgFKSM4 (ORCPT ); Thu, 11 Jun 2020 14:12:56 -0400 IronPort-SDR: Hf93qwpQ015UEyGGZFmUzkZUB1ForM3wysQOg+SmPCZtVdeqK+AYfP/IeAUV9956YlgINwaNJf KklBRKbJ1RkQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 11:12:54 -0700 IronPort-SDR: sgGeycKqS49OljXzUmElxdqto92wMSFKg9+yX1gughcpFA1byNZuzBPzJ+vRJabTr/S1Wb8+DX 0OH2e2Ii1Fig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,500,1583222400"; d="scan'208";a="289624840" Received: from ttvo1-mobl.amr.corp.intel.com ([10.251.138.170]) by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 11:12:53 -0700 Message-ID: Subject: Re: [PATCH] ASoC: SOF: Intel: hda: unsolicited RIRB response From: Ranjani Sridharan To: Takashi Iwai , "Lu, Brent" Cc: "alsa-devel@alsa-project.org" , Pierre-Louis Bossart DRIVERS , "authored:2/16=12%,added_lines:21/248=8%,removed_lines:5/84=6%,),Liam " "Girdwood DRIVERS )" , "commit_signer:6/16=38%,authored:6/16=38%,added_lines:123/248=50% ,removed_lines:36/84=43%,Kai " "Vehmanen DRIVERS )" , "Daniel Baluta DRIVERS )" , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Rojewski, Cezary" , Zhu Yingjiang , Keyon Jie , Bard Liao , "sound-open-firmware@alsa-project.orgDRIVERS" , "linux-kernel@vger.kernel.org" Date: Thu, 11 Jun 2020 11:12:53 -0700 In-Reply-To: References: <1591883073-17190-1-git-send-email-brent.lu@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-06-11 at 19:59 +0200, Takashi Iwai wrote: > On Thu, 11 Jun 2020 19:09:08 +0200, > Lu, Brent wrote: > > > > > Hi Brent, > > > > > > Thanks for the patch. Is this fix for a specific issue you're > > > seeing? > > > If so, could you please give us some details about it? > > > > > > Thanks, > > > Ranjani > > > > Hi Ranjani, > > > > It's reported to happen on GLK Chromebook 'Fleex' that sometimes it > > cannot output the audio stream to external display. The kernel is > > Chrome v4.14 branch. Following is the reproduce step provided by > > ODM but I could reproduce it simply running aplay or > > cras_test_client > > so I think it's not about the cable plug/unplug handling. > > > > What steps will reproduce the problem? > > 1. Play YouTube video on Chromebook and connect it to external > > monitor with Type C to DP dongle > > 2. Press monitor power button to turn off the monitor > > 3. Press monitor power button again to turn on the monitor > > 4. Continue to play YouTube video and check audio playback > > 5. No sound comes out from built-in speaker of external > > monitor when turn on external monitor > > > > I added debug messages to print the RIRBWP register and realize > > that > > response could come between the read of RIRBWP in the > > snd_hdac_bus_update_rirb() function and the interrupt clear in the > > hda_dsp_stream_interrupt() function. The response is not handled > > but > > the interrupt is already cleared. It will cause timeout unless more > > responses coming to RIRB. > > Now I noticed that the legacy driver already addressed it recently > via > commit 6d011d5057ff > ALSA: hda: Clear RIRB status before reading WP > > We should have checked SOF at the same time, too... Thanks, Takashi. But the legacy driver but doesnt remove the loop. The loop added in the SOF driver was based on the legacy driver and specifically to handle missed stream interrupts. Is there any harm in keeping the loop? Thanks, Ranjani