<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu <<a href="mailto:chancel.liu@nxp.com">chancel.liu@nxp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This patch can register different ASoC platform drivers if there are<br>
several rpmsg channels. Thus sound cards based on different rpmsg<br>
channels can link to their respective platform drivers. Besides, the<br>
name of driver is equal to the name of rpmsg channel.<br>
<br>
Signed-off-by: Chancel Liu <<a href="mailto:chancel.liu@nxp.com" target="_blank">chancel.liu@nxp.com</a>><br></blockquote><div><br></div><div>Acked-by: Shengjiu Wang <<a href="mailto:shengjiu.wang@gmail.com">shengjiu.wang@gmail.com</a>></div><div><br></div><div>Best regards</div><div>Wang Shengjiu </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
 sound/soc/fsl/imx-pcm-rpmsg.c | 8 ++++++--<br>
 1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c<br>
index 35049043e532..3157cd5a837e 100644<br>
--- a/sound/soc/fsl/imx-pcm-rpmsg.c<br>
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c<br>
@@ -684,7 +684,7 @@ static int imx_rpmsg_pcm_probe(struct platform_device *pdev)<br>
        info->rpdev = container_of(pdev->dev.parent, struct rpmsg_device, dev);<br>
        info->dev = &pdev->dev;<br>
        /* Setup work queue */<br>
-       info->rpmsg_wq = alloc_ordered_workqueue("rpmsg_audio",<br>
+       info->rpmsg_wq = alloc_ordered_workqueue(info->rpdev-><a href="http://id.name" rel="noreferrer" target="_blank">id.name</a>,<br>
                                                 WQ_HIGHPRI |<br>
                                                 WQ_UNBOUND |<br>
                                                 WQ_FREEZABLE);<br>
@@ -723,11 +723,15 @@ static int imx_rpmsg_pcm_probe(struct platform_device *pdev)<br>
        if (ret)<br>
                goto fail;<br>
<br>
-       component = snd_soc_lookup_component(&pdev->dev, IMX_PCM_DRV_NAME);<br>
+       component = snd_soc_lookup_component(&pdev->dev, NULL);<br>
        if (!component) {<br>
                ret = -EINVAL;<br>
                goto fail;<br>
        }<br>
+<br>
+       /* platform component name is used by machine driver to link with */<br>
+       component->name = info->rpdev-><a href="http://id.name" rel="noreferrer" target="_blank">id.name</a>;<br>
+<br>
 #ifdef CONFIG_DEBUG_FS<br>
        component->debugfs_prefix = "rpmsg";<br>
 #endif<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div></div>