summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2018-07-25 13:43:31 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit7cb1b1a922eadf10454c6e4b1142957322df4de2 (patch)
tree050d24a07c5e4075393f4b75152a226ffd405ad0 /sound
parent94e072bd0894e23a02e1a90b4c0b87501e64cb09 (diff)
MLK-19042-4: ASoC: imx-rpmsg: dummy codec support in imx8mm
In imx8mm, there is no controls for wm8524, so we use the dummy codec instead. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/imx-rpmsg.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
index 6887e69df220..844bdaceb472 100644
--- a/sound/soc/fsl/imx-rpmsg.c
+++ b/sound/soc/fsl/imx-rpmsg.c
@@ -34,6 +34,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
struct device_node *cpu_np;
struct platform_device *cpu_pdev;
struct imx_rpmsg_data *data;
+ struct fsl_rpmsg_i2s *rpmsg_i2s;
int ret;
cpu_np = of_parse_phandle(pdev->dev.of_node, "cpu-dai", 0);
@@ -56,10 +57,17 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
goto fail;
}
+ rpmsg_i2s = platform_get_drvdata(cpu_pdev);
+
data->dai[0].name = "rpmsg hifi";
data->dai[0].stream_name = "rpmsg hifi";
- data->dai[0].codec_dai_name = "rpmsg-wm8960-hifi";
- data->dai[0].codec_name = "rpmsg-audio-codec";
+ if (rpmsg_i2s->codec) {
+ data->dai[0].codec_dai_name = "rpmsg-wm8960-hifi";
+ data->dai[0].codec_name = "rpmsg-audio-codec";
+ } else {
+ data->dai[0].codec_dai_name = "snd-soc-dummy-dai";
+ data->dai[0].codec_name = "snd-soc-dummy";
+ }
data->dai[0].cpu_dai_name = dev_name(&cpu_pdev->dev);
data->dai[0].platform_of_node = cpu_np;
data->dai[0].playback_only = false;