Searched hist:"092830 cf550667d5fa6286605167d232f2c1f61e" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/sound/soc/ |
H A D | soc-pcm.c | diff 092830cf550667d5fa6286605167d232f2c1f61e Mon May 29 19:49:43 CDT 2023 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: soc-pcm.c: indicate error if stream has no playback no capture
soc_get_playback_capture() (A) returns number of substreams for playback/capture (B). ASoC will probe the Sound Card and mapps CPU<->Codec pair.
(A) static int soc_get_playback_capture(..., (B) int *playback, int *capture) { ... if (rtd->dai_link->playback_only) { *playback = 1; *capture = 0; }
if (rtd->dai_link->capture_only) { *playback = 0; *capture = 1; } (C) return 0; }
But it might be no playback no capture if it returns playback=0, capture=0. It is very difficult to notice about it. This patch indicates error at (C) then.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87y1l6zlqx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
|