18 May
2023
18 May
'23
12:37 p.m.
On 5/18/2023 7:46 AM, Kuninori Morimoto wrote:
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