All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Stephan Gerhold <stephan@gerhold.net>, Mark Brown <broonie@kernel.org>
Cc: Sameer Pujar <spujar@nvidia.com>,
	alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: soc-pcm: fix regression in soc_new_pcm()
Date: Tue, 18 Feb 2020 16:19:13 +0100	[thread overview]
Message-ID: <1jd0abrki6.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <20200218103824.26708-1-stephan@gerhold.net>


On Tue 18 Feb 2020 at 11:38, Stephan Gerhold <stephan@gerhold.net> wrote:

> Commit af4bac11531f ("ASoC: soc-pcm: crash in snd_soc_dapm_new_dai")
> swapped the SNDRV_PCM_STREAM_* parameter in the
> snd_soc_dai_stream_valid(cpu_dai, ...) checks. But that works only
> for codec2codec links. For normal links it breaks registration of
> playback/capture-only PCM devices.
>
> E.g. on qcom/apq8016_sbc there is usually one playback-only and one
> capture-only PCM device, but they disappeared after the commit.
>
> The codec2codec case was added in commit a342031cdd08
> ("ASoC: create pcm for codec2codec links as well") as an extra check
> (e.g. `playback = playback && cpu_playback->channels_min`).

That particular check was there when I worked on that change but I seems
I messed up when I rebased on Kuninori's work regarding
snd_soc_dai_stream_valid() which happened more or less at the same time.

>
> We should be able to simplify the code by checking directly for
> the correct stream type in the loop.
> This also fixes the regression because we check for PLAYBACK for
> both codec and cpu dai again when codec2codec is not used.
>
> Cc: Sameer Pujar <spujar@nvidia.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Fixes: af4bac11531f ("ASoC: soc-pcm: crash in snd_soc_dapm_new_dai")
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Looks good and works with the codec-to-codec links on Amlogic aiu. Thx !

Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>

  reply	other threads:[~2020-02-18 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 10:38 [PATCH] ASoC: soc-pcm: fix regression in soc_new_pcm() Stephan Gerhold
2020-02-18 15:19 ` Jerome Brunet [this message]
2020-02-19  0:11 ` Applied "ASoC: soc-pcm: fix regression in soc_new_pcm()" to the asoc tree Mark Brown

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=1jd0abrki6.fsf@starbuckisacylon.baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=spujar@nvidia.com \
    --cc=stephan@gerhold.net \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.