ASoC: imx-pcm-rpmsg: Multi-channel support for sound card based on rpmsg
authorChancel Liu <chancel.liu@nxp.com>
Fri, 30 Sep 2022 06:44:38 +0000 (14:44 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 17 Oct 2022 11:48:15 +0000 (12:48 +0100)
Some sound card based on rpmsg may support multi-channel. The number of
channels can be sent to Cortex-M in rpmsg for process.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220930064441.2548505-5-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-pcm-rpmsg.c

index 3157cd5a837e337522cc27f0cd27ed89b210405f..2f310994f7ee060a60fc417374fbbad3f072de4f 100644 (file)
@@ -178,7 +178,7 @@ static int imx_rpmsg_pcm_hw_params(struct snd_soc_component *component,
                msg->s_msg.param.channels = RPMSG_CH_STEREO;
                break;
        default:
-               ret = -EINVAL;
+               msg->s_msg.param.channels = params_channels(params);
                break;
        }