From: Mark Brown <broonie@kernel.org>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: alsa-devel@alsa-project.org,
Stephan Gerhold <stephan@gerhold.net>,
Liam Girdwood <lgirdwood@gmail.com>,
Kevin Hilman <khilman@baylibre.com>,
linux-kernel@vger.kernel.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
zhangn1985@outlook.com, linux-amlogic@lists.infradead.org
Subject: Re: [PATCH] ASoC: core: restore dpcm flags semantics
Date: Thu, 30 Jul 2020 19:12:57 +0100 [thread overview]
Message-ID: <20200730181257.GF5055@sirena.org.uk> (raw)
In-Reply-To: <1jft998jbe.fsf@starbuckisacylon.baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 2319 bytes --]
On Thu, Jul 30, 2020 at 11:04:53AM +0200, Jerome Brunet wrote:
> Carrying redundant information makes things complex and error prone.
> If you really want to update this, here is another proposition:
> * Removing snd_soc_dai_link_set_capabilities()
> * Removing both flags completely
> * Let ASoC figure out what is needed based on the components present.
My understanding is that that was broadly where we were headed with this
stuff - snd_soc_dai_link_set_capabilities() is trying to figure things
out from the components already, it's storing the flags as a cache but
could be modified so we use it every time we need a value.
>
> >
> >>
> >> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> >> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> >> ---
> >>
> >> Hi Mark,
> >>
> >> Because b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks')
> >> introduced more than one problem, the change
> >> "ASoC: core: use less strict tests for dailink capabilities" [0] is still
> >> necessary but the change of semantic remains a problem with it.
> >>
> >> This patch applies on top of it.
> >>
> >> sound/soc/soc-pcm.c | 14 --------------
> >> 1 file changed, 14 deletions(-)
> >>
> >> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> >> index 00ac1cbf6f88..2e205b738eae 100644
> >> --- a/sound/soc/soc-pcm.c
> >> +++ b/sound/soc/soc-pcm.c
> >> @@ -2749,13 +2749,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
> >> break;
> >> }
> >> }
> >> -
> >> - if (!playback) {
> >> - dev_err(rtd->card->dev,
> >> - "No CPU DAIs support playback for stream %s\n",
> >> - rtd->dai_link->stream_name);
> >> - return -EINVAL;
> >> - }
> >> }
> >> if (rtd->dai_link->dpcm_capture) {
> >> stream = SNDRV_PCM_STREAM_CAPTURE;
> >> @@ -2766,13 +2759,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
> >> break;
> >> }
> >> }
> >> -
> >> - if (!capture) {
> >> - dev_err(rtd->card->dev,
> >> - "No CPU DAIs support capture for stream %s\n",
> >> - rtd->dai_link->stream_name);
> >> - return -EINVAL;
> >> - }
> >> }
> >> } else {
> >> /* Adapt stream for codec2codec links */
> >>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-07-30 18:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 18:05 [PATCH] ASoC: core: use less strict tests for dailink capabilities Pierre-Louis Bossart
2020-07-24 8:31 ` Jerome Brunet
2020-07-24 19:05 ` Pierre-Louis Bossart
2020-07-27 9:42 ` Jerome Brunet
2020-07-27 14:13 ` Pierre-Louis Bossart
2020-07-27 15:15 ` Jerome Brunet
2020-07-27 15:26 ` Pierre-Louis Bossart
2020-07-29 15:46 ` [PATCH] ASoC: core: restore dpcm flags semantics Jerome Brunet
2020-07-29 15:56 ` Pierre-Louis Bossart
2020-07-30 9:04 ` Jerome Brunet
2020-07-30 16:06 ` Pierre-Louis Bossart
2020-07-30 18:52 ` Mark Brown
2020-07-31 12:16 ` Jerome Brunet
2020-07-31 17:42 ` Mark Brown
2020-07-31 8:06 ` Jerome Brunet
2020-07-30 18:12 ` Mark Brown [this message]
2020-07-31 18:54 ` [PATCH] ASoC: core: use less strict tests for dailink capabilities 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=20200730181257.GF5055@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=stephan@gerhold.net \
--cc=zhangn1985@outlook.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).