Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp47883ybb; Thu, 19 Mar 2020 11:25:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtZF+F/v/ukPF308aFv0HDa3eg2JHpyvs/EFA5zVs8jHmVj+BA2aaffkPEgTbbQ9rKgILyo X-Received: by 2002:aca:5d8a:: with SMTP id r132mr1542627oib.129.1584642341650; Thu, 19 Mar 2020 11:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584642341; cv=none; d=google.com; s=arc-20160816; b=Jfhb1Xq05SeoMrK5LIPEPeCIcVLPcP+zotpkaP94/K3i+xzXK5wqWULAQmHQgBKjx2 TFr41Jf5tx23IFBWZCM1Rjqfjf/BH7OatLPcGU/Go9PUr74RcYr10Ake5o+peeVAC4Qd k56Qzab5wcWvAqEZeY0b8xzuih3KaWJBagnOc9cAEABrpLbJ4uispNPJ9nx0U7ntpFRk p5OIoxAQ8k81DaMXX4lKo0PS1QGQmNMUbKHfLRYfMqfuuPOB3U4HOj1f1BLm5zspTY9w sqIMlKN+8IP9uYh+T2s3S4jFHdZnTin2bYIj7S8M20j7mtnPCZT8/rou8PiR4d5uguAA /AWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lXXDL6wauZFr+zrISqddnRkjvaIVsNWKxIRiOeIjIj4=; b=k00qS9DCAAWtt+ZrQVrmH4Le8ZQNEqZMr3RF0yAU+4ysBwFMJUIisTcHphM6K2qUFU jluLNEp7+/UbmgRPAHhy0PTLRop3jNHKthcnLE5n7AKbLKjnxopyzuvexhx+g7Z11oek aBeW2DQgkPq/bZ/Xqi0V8DJZv+HqevjgoUxoa7XrNenAr+eWwU3asq3TffqM0jcRZI8Z StGZvrBmLZiXl5r3Xzwv8ihgGlHmgXKKO67vwmS/O/sNSXeO4URWWW4ezz8a7A77p5mX LJe2TV2HIIpWwlD0hYzjnXqUq8/9ko76UopiKYRezwyOffTzqcvllqytfbF5mRuBlhPf HF9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z126si1541160oia.187.2020.03.19.11.25.28; Thu, 19 Mar 2020 11:25:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727317AbgCSSYZ (ORCPT + 99 others); Thu, 19 Mar 2020 14:24:25 -0400 Received: from isilmar-4.linta.de ([136.243.71.142]:54662 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbgCSSYZ (ORCPT ); Thu, 19 Mar 2020 14:24:25 -0400 X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES Received: from light.dominikbrodowski.net (brodo.linta [10.1.0.102]) by isilmar-4.linta.de (Postfix) with ESMTPSA id 5249E200ACD; Thu, 19 Mar 2020 18:24:22 +0000 (UTC) Received: by light.dominikbrodowski.net (Postfix, from userid 1000) id 3077D20578; Thu, 19 Mar 2020 19:24:13 +0100 (CET) Date: Thu, 19 Mar 2020 19:24:13 +0100 From: Dominik Brodowski To: Cezary Rojewski Cc: Mark Brown , kuninori.morimoto.gx@renesas.com, Pierre-Louis Bossart , Keyon Jie , alsa-devel@alsa-project.org, curtis@malainey.com, linux-kernel@vger.kernel.org, tiwai@suse.com, liam.r.girdwood@linux.intel.com Subject: Re: snd_hda_intel/sst-acpi sound breakage on suspend/resume since 5.6-rc1 Message-ID: <20200319182413.GA3968@light.dominikbrodowski.net> References: <20200318192213.GA2987@light.dominikbrodowski.net> <20200318215218.GA2439@light.dominikbrodowski.net> <20200319130049.GA2244@light.dominikbrodowski.net> <20200319134139.GB3983@sirena.org.uk> <20200319165157.GA2254@light.dominikbrodowski.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2020 at 06:33:50PM +0100, Cezary Rojewski wrote: > On 2020-03-19 17:51, Dominik Brodowski wrote: > > On Thu, Mar 19, 2020 at 04:48:03PM +0100, Cezary Rojewski wrote: > > > On 2020-03-19 14:41, Mark Brown wrote: > > > > On Thu, Mar 19, 2020 at 02:00:49PM +0100, Dominik Brodowski wrote: > > > > > > > > > Have some good news now, namely that a bisect is complete: That pointed to > > > > > 1272063a7ee4 ("ASoC: soc-core: care .ignore_suspend for Component suspend"); > > > > > therefore I've added Kuninori Morimoto to this e-mail thread. > > > > > > > > If that's an issue it feels more like a driver bug in that if the driver > > > > asked for ignore_suspend then it should expect not to have the suspend > > > > callback called. > > > > > > > > > > Requested for tests with following diff applied: > > > > > > diff --git a/sound/soc/intel/boards/broadwell.c > > > b/sound/soc/intel/boards/broadwell.c > > > index db7e1e87156d..6ed4c1b0a515 100644 > > > --- a/sound/soc/intel/boards/broadwell.c > > > +++ b/sound/soc/intel/boards/broadwell.c > > > @@ -212,7 +212,6 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = > > > { > > > .init = broadwell_rt286_codec_init, > > > .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | > > > SND_SOC_DAIFMT_CBS_CFS, > > > - .ignore_suspend = 1, > > > .ignore_pmdown_time = 1, > > > .be_hw_params_fixup = broadwell_ssp0_fixup, > > > .ops = &broadwell_rt286_ops, > > > > That patch fixes the issue(s). I didn't even need to revert 64df6afa0dab > > ("ASoC: Intel: broadwell: change cpu_dai and platform components for SOF") > > on top of that. But you can assess better whether that patch needs care for > > other reasons; for me, this one-liner you have suggested is perfect. > > > > Many thanks -- it's been a pleasure to work with you on tracking this issue > > down. > > > > Dominik > > > > Thank you for being so cooperative during this 2day debug session. > > The patch I mentioned earlier unintentionally (?) changed 'platform' > component param for ssp0_port from 'dummy' to 'platform' for non-SOF > solution: > > diff --git a/sound/soc/intel/boards/broadwell.c > b/sound/soc/intel/boards/broadwell.c > index b9c12e24c70b..db7e1e87156d 100644 > --- a/sound/soc/intel/boards/broadwell.c > +++ b/sound/soc/intel/boards/broadwell.c > @@ -164,14 +164,6 @@ SND_SOC_DAILINK_DEF(platform, > SND_SOC_DAILINK_DEF(codec, > DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", "rt286-aif1"))); > > -#if IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) > -SND_SOC_DAILINK_DEF(ssp0_port, > - DAILINK_COMP_ARRAY(COMP_CPU("ssp0-port"))); > -#else > -SND_SOC_DAILINK_DEF(ssp0_port, > - DAILINK_COMP_ARRAY(COMP_DUMMY())); > -#endif > - > /* broadwell digital audio interface glue - connects codec <--> CPU */ > static struct snd_soc_dai_link broadwell_rt286_dais[] = { > /* Front End DAI links */ > @@ -226,7 +218,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = > { > .ops = &broadwell_rt286_ops, > .dpcm_playback = 1, > .dpcm_capture = 1, > - SND_SOC_DAILINK_REG(ssp0_port, codec, platform), > + SND_SOC_DAILINK_REG(dummy, codec, dummy), > }, > > > Said change causes following to occur: > > > (stream start) > [ 113.251950] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000003000000 > size: 77 > [ 113.252090] haswell-pcm-audio haswell-pcm-audio: > rx: 0x0000000043000000 > size: 48 > [ 113.252097] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006301000 > size: 20 > [ 113.252147] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006301000 > size: 20 > [ 113.252179] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006100000 > size: 0 > [ 113.252219] snd_soc_core:dpcm_fe_dai_hw_params: System PCM: ASoC: > hw_params FE System PCM rate 48000 chan 2 fmt 2 > [ 113.252229] snd_soc_core:dapm_update_dai_unlocked: haswell-pcm-audio > haswell-pcm-audio: Update DAI routes for System Pin playback > [ 113.252236] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006000000 > size: 0 > [ 113.252304] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000004000000 > size: 4 > [ 113.252425] snd_soc_sst_haswell_pcm:create_adsp_page_table: System PCM: > generating page table for 00000000a8c2b8a6 size 0x17700 pages 24 > > > (In essence these tx'es denote sequence for stream initialization while the > last two for stream RESET (0x6000000) and FREE (0x4000000)) > > and that is only to recreate the stream once again: > > > [ 113.252673] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000003000000 > size: 77 > [ 113.252803] haswell-pcm-audio haswell-pcm-audio: > rx: 0x0000000043000000 > size: 48 > [ 113.252810] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006301000 > size: 20 > [ 113.252864] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006301000 > size: 20 > [ 113.252900] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006100000 > size: 0 > [ 113.252987] snd_soc_core:dpcm_fe_dai_prepare: System PCM: ASoC: prepare > FE System PCM > [ 113.252993] snd_soc_core:dpcm_be_dai_prepare: Codec: ASoC: prepare BE > Codec > [ 113.253028] snd_soc_core:dpcm_dapm_stream_event: Codec: ASoC: BE Codec > event 1 dir 0 > [ 113.254962] snd_soc_core:dpcm_do_trigger: Codec: ASoC: trigger BE Codec > cmd 1 > > > Because of that we ended up in _reset and _free being called twice: > > > [ 113.254969] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006200000 > size: 0 > [ 113.254980] snd_soc_core:dpcm_dai_trigger_fe_be: System PCM: ASoC: post > trigger FE System PCM cmd 1 > [ 113.254983] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006200000 > size: 0 > [ 113.254996] snd_soc_sst_ipc:ipc_tx_msgs: haswell-pcm-audio > haswell-pcm-audio: ipc_tx_msgs dsp busy > [ 118.486291] System PCM: ASoC: trigger FE cmd: 7 failed: -22 > [ 118.486431] snd_soc_core:dpcm_dai_trigger_fe_be: System PCM: ASoC: pre > trigger FE System PCM cmd 0 > [ 118.486464] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006100000 > size: 0 > [ 118.486495] snd_soc_core:dpcm_do_trigger: Codec: ASoC: trigger BE Codec > cmd 0 > [ 118.486514] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006100000 > size: 0 > [ 118.486550] snd_soc_core:dpcm_fe_dai_hw_free: System PCM: ASoC: hw_free > FE System PCM > [ 118.486569] snd_soc_core:dpcm_be_dai_hw_free: Codec: ASoC: hw_free BE > Codec > [ 118.486719] snd_soc_core:dpcm_fe_dai_hw_free: System PCM: ASoC: hw_free > FE System PCM > [ 118.486734] snd_soc_core:dpcm_be_dai_hw_free: Codec: ASoC: hw_free BE > Codec > [ 118.486751] snd_soc_core:dpcm_be_dai_shutdown: Codec: ASoC: close BE > Codec > [ 118.486801] snd_soc_sst_ipc:ipc_tx_msgs: haswell-pcm-audio > haswell-pcm-audio: ipc_tx_msgs dsp busy > [ 118.489279] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000006000000 > size: 0 > [ 118.489382] haswell-pcm-audio haswell-pcm-audio: tx: 0x0000000004000000 > size: 4 > [ 118.489535] snd_soc_core:dpcm_fe_dai_shutdown: System PCM: ASoC: close > FE System PCM > [ 118.489547] haswell-pcm-audio haswell-pcm-audio: warning: stream is NULL, > no stream to reset, ignore it. > [ 118.489553] haswell-pcm-audio haswell-pcm-audio: warning: stream is NULL, > no stream to free, ignore it. > [ 118.489571] snd_soc_core:dpcm_be_disconnect: System PCM: ASoC: BE > playback disconnect check for Codec > [ 118.489580] snd_soc_core:dpcm_be_disconnect: System PCM: freed DSP > playback path System PCM -> Codec > > > Could you confirm the same happens on your machine when revert of mentioned > patch is not applied ("stream is NULL" messages occur)? Issue may be > harmless but explained sequence does not look right. Indeed, I still see haswell-pcm-audio haswell-pcm-audio: warning: stream is NULL, no stream to reset, ignore it. haswell-pcm-audio haswell-pcm-audio: warning: stream is NULL, no stream to free, ignore it. haswell-pcm-audio haswell-pcm-audio: FW loaded, mailbox readback FW info: type 01, - version: 00.00, build 77, source commit id: 876ac6906f31a43b6772b23c7c983ce9dcb18a19 haswell-pcm-audio haswell-pcm-audio: warning: stream is NULL, no stream to reset, ignore it. haswell-pcm-audio haswell-pcm-audio: warning: stream is NULL, no stream to free, ignore it. though sounds continues to work. Thanks again, Dominik