ASoC: q6dsp6: q6afe-dai: add missing channels to MI2S DAIs
authorStephan Gerhold <stephan@gerhold.net>
Wed, 15 Apr 2020 15:00:50 +0000 (17:00 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 15 Apr 2020 16:58:59 +0000 (17:58 +0100)
commit0c824ec094b5cda766c80d88c2036e28c24a4cb1
tree40a328d1881ae7d57ddd54a2f4b57d85cd59e37a
parent9b5db059366ae2087e07892b5fc108f81f4ec189
ASoC: q6dsp6: q6afe-dai: add missing channels to MI2S DAIs

For some reason, the MI2S DAIs do not have channels_min/max defined.
This means that snd_soc_dai_stream_valid() returns false,
i.e. the DAIs have neither valid playback nor capture stream.

It's quite surprising that this ever worked correctly,
but in 5.7-rc1 this is now failing badly: :)

Commit 0e9cf4c452ad ("ASoC: pcm: check if cpu-dai supports a given stream")
introduced a check for snd_soc_dai_stream_valid() before calling
hw_params(), which means that the q6i2s_hw_params() function
was never called, eventually resulting in:

    qcom-q6afe aprsvc:q6afe:4:4: no line is assigned

... even though "qcom,sd-lines" is set in the device tree.

Commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported")
now even avoids creating PCM devices if the stream is not supported,
which means that it is failing even earlier with e.g.:

    Primary MI2S: ASoC: no backend playback stream

Avoid all that trouble by adding channels_min/max for the MI2S DAIs.

Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6afe: Add q6afe dai driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200415150050.616392-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6afe-dai.c