diff mbox series

[v3,4/7] ASoC: imx-pcm-rpmsg: Multi-channel support for sound card based on rpmsg

Message ID 20220930064441.2548505-5-chancel.liu@nxp.com (mailing list archive)
State Accepted
Commit bdc0f6ca1c079ba790e0e227cff6164feae90460
Headers show
Series Create a new sound card to access MICFIL based on rpmsg channel | expand

Commit Message

Chancel Liu Sept. 30, 2022, 6:44 a.m. UTC
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>
---
 sound/soc/fsl/imx-pcm-rpmsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shengjiu Wang Oct. 9, 2022, 6:18 a.m. UTC | #1
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu <chancel.liu@nxp.com> wrote:

> 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>

Best regards
Wang Shengjiu

> ---
>  sound/soc/fsl/imx-pcm-rpmsg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
> index 3157cd5a837e..2f310994f7ee 100644
> --- a/sound/soc/fsl/imx-pcm-rpmsg.c
> +++ b/sound/soc/fsl/imx-pcm-rpmsg.c
> @@ -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;
>         }
>
> --
> 2.25.1
>
>
diff mbox series

Patch

diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
index 3157cd5a837e..2f310994f7ee 100644
--- a/sound/soc/fsl/imx-pcm-rpmsg.c
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c
@@ -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;
 	}