From: Takashi Iwai <tiwai@suse.de>
To: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Jie Yang <yang.jie@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
Mark Brown <broonie@kernel.org>,
Bard liao <yung-chuan.liao@linux.intel.com>
Subject: Re: Asoc: Intel: SST (CHT) regression in asoc/for-5.11
Date: Tue, 01 Dec 2020 17:23:09 +0100 [thread overview]
Message-ID: <s5hpn3tbimq.wl-tiwai@suse.de> (raw)
In-Reply-To: <ef5dce32556b20e184dfd496e5f7b81a54b60a3c.camel@linux.intel.com>
On Tue, 01 Dec 2020 17:15:15 +0100,
Ranjani Sridharan wrote:
>
> > >
> > > I was able to reproduce this error with Mark's for-next branch on a
> > > CHT device w/ rt5640, and git bisect points to this commit:
> > >
> > > a27b421f1d04b201c474a15ee1591919c81fb413 is the first bad commit
> > > commit a27b421f1d04b201c474a15ee1591919c81fb413
> > > Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> > > Date: Tue Nov 17 13:50:01 2020 -0800
> > >
> > > ASoC: pcm: call snd_soc_dapm_stream_stop() in soc_pcm_hw_clean
> > >
> > > Currently, the SND_SOC_DAPM_STREAM_START event is sent during
> > > pcm_prepare() but the SND_SOC_DAPM_STREAM_STOP event is
> > > sent only in dpcm_fe_dai_shutdown() after soc_pcm_close().
> > > This results in an imbalance between when the DAPM widgets
> > > receive the PRE/POST_PMU/PMD events. So call
> > > snd_soc_dapm_stream_stop() in soc_pcm_hw_clean() before the
> > > snd_soc_pcm_component_hw_free() to keep the stream_stop DAPM
> > > event balanced with the stream_start event in soc_pm_prepare().
> > >
> > > Also, in order to prevent duplicate DAPM stream events,
> > > remove the call for DAPM STREAM_START event in
> > > dpcm_fe_dai_prepare()
> > > and the call for DAPM STREAM_STOP event in
> > > dpcm_fe_dai_shutdown().
> > >
> > > Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > Reviewed-by: Pierre-Louis Bossart
> > > <pierre-louis.bossart@linux.intel.com>
> > > Signed-off-by: Ranjani Sridharan <
> > > ranjani.sridharan@linux.intel.com>
> > > Link:
> > > https://lore.kernel.org/r/20201117215001.163107-1-ranjani.sridharan@linux.intel.com
> > > Signed-off-by: Mark Brown <broonie@kernel.org>
> > >
> > > sound/soc/soc-pcm.c | 10 +++-------
> > > 1 file changed, 3 insertions(+), 7 deletions(-)
> > >
> > >
> > > I am not sure why this break the Atom/SST driver, this was reviewed
> > > and seemed legit - even required IIRC to deal with topology
> > > pipelines
> > > initialized on-demand. Reverting this patch restores functionality.
> > > I
> > > would guess it's the DAPM_STREAM_START that's now missing (or in
> > > the
> > > 'wrong' location) and causing issues?
> >
> > Indeed the DAPM_START_STREAM call completely disappeared after the
> > patch, which looks very wrong. This has to be revisited before 5.11
> > merge.
>
> Hi Pierre/Takashi,
>
> The DAPM_STREAM_START event is still there in soc_pcm_prepare() and
> this patch only removed the duplicate call in dpcm_fe_dai_prepare().
Ah, thanks, I see now.
But note that the PCM prepare callback may be called multiple times in
row; i.e. it's not always paired with hw_clean (that is via either
hw_params error path or hw_free). So if the balance really matters,
we need another type of checks, not relying on the call pattern.
Takashi
next prev parent reply other threads:[~2020-12-01 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 12:24 Asoc: Intel: SST (CHT) regression in asoc/for-5.11 Hans de Goede
2020-11-30 16:15 ` Pierre-Louis Bossart
2020-12-01 3:24 ` Pierre-Louis Bossart
2020-12-01 14:46 ` Takashi Iwai
2020-12-01 15:37 ` Hans de Goede
2020-12-01 16:15 ` Ranjani Sridharan
2020-12-01 16:23 ` Takashi Iwai [this message]
2020-12-01 23:52 ` Ranjani Sridharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hpn3tbimq.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=yang.jie@linux.intel.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).