[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ad13f95-434d-376a-bc38-b209623b461e@linux.intel.com>
Date: Wed, 29 Jul 2020 10:56:05 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Jerome Brunet <jbrunet@...libre.com>,
Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
linux-amlogic@...ts.infradead.org,
Kevin Hilman <khilman@...libre.com>, zhangn1985@...look.com,
Stephan Gerhold <stephan@...hold.net>
Subject: Re: [PATCH] ASoC: core: restore dpcm flags semantics
On 7/29/20 10:46 AM, Jerome Brunet wrote:
> commit b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks')
> changed dpcm_playback and dpcm_capture semantic by throwing an error if
> these flags are not aligned with DAIs capabilities on the link.
>
> The former semantic did not force the flags and DAI caps to be aligned.
> The flag previously allowed card drivers to disable a stream direction on
> a link (whether or not such feature is deemed useful).
>
> With change ('ASoC: core: use less strict tests for dailink capabilities')
> an error is thrown if the flags and and the DAI caps are not aligned. Those
> parameters were not meant to aligned initially. No technical reason was
> given about why cards should now be considered "broken" in such condition
> is not met, or why it should be considered to be an improvement to enforce
> that.
>
> Forcing the flags to be aligned with DAI caps just make the information
> the flag carry redundant with DAI caps, breaking a few cards along the way.
>
> This change drops the added error conditions and restore the initial flag
> semantics.
or rather lack thereof.
I am ok to move dev_err to dev_warn and remove the return -EINVAL, but I
maintain that we have to reach a point where configurations make sense
before we can clean them up. If we implicitly push issues under the rug
by not even being aware of them we'll never make progress.
>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
> Signed-off-by: Jerome Brunet <jbrunet@...libre.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 */
>
Powered by blists - more mailing lists