summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-wm8958.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2019-09-04 11:11:03 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:50:53 +0800
commit78b719abec0c42bd2c067cc063a5f9295d738671 (patch)
treefd12c3e79cec667329b0be35b0f8a71162c5cdb0 /sound/soc/fsl/imx-wm8958.c
parent7bcdb1f7f44806615c49ea27f87ab3d36bd1758e (diff)
ASoC: imx-wm8958: Fix compile error
API change due to: adb76b5b9c47 ("ASoC: soc-core: remove legacy style dai_link") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/imx-wm8958.c')
-rw-r--r--sound/soc/fsl/imx-wm8958.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sound/soc/fsl/imx-wm8958.c b/sound/soc/fsl/imx-wm8958.c
index 13035790ac68..2ffbd1f69e2b 100644
--- a/sound/soc/fsl/imx-wm8958.c
+++ b/sound/soc/fsl/imx-wm8958.c
@@ -434,10 +434,15 @@ static int imx_wm8958_probe(struct platform_device *pdev)
struct imx_priv *priv = &card_priv;
struct i2c_client *codec_dev;
struct imx_wm8958_data *data;
+ struct snd_soc_dai_link_component *dlc;
int ret;
priv->pdev = pdev;
+ dlc = devm_kzalloc(&pdev->dev, 3 * sizeof(*dlc), GFP_KERNEL);
+ if (!dlc)
+ return -ENOMEM;
+
cpu_np = of_parse_phandle(np, "cpu-dai", 0);
if (!cpu_np) {
dev_err(&pdev->dev, "cpu dai phandle missing or invalid\n");
@@ -492,12 +497,19 @@ static int imx_wm8958_probe(struct platform_device *pdev)
priv->hp_gpio = of_get_named_gpio_flags(np, "hp-det-gpios", 0,
(enum of_gpio_flags *)&priv->hp_active_low);
+ data->dai.cpus = &dlc[0];
+ data->dai.num_cpus = 1;
+ data->dai.platforms = &dlc[1];
+ data->dai.num_platforms = 1;
+ data->dai.codecs = &dlc[2];
+ data->dai.num_codecs = 1;
+
data->dai.name = "HiFi";
data->dai.stream_name = "HiFi";
- data->dai.codec_dai_name = "wm8994-aif1";
- data->dai.codec_name = "wm8994-codec";
- data->dai.cpu_dai_name = dev_name(&cpu_pdev->dev);
- data->dai.platform_of_node = cpu_np;
+ data->dai.codecs->dai_name = "wm8994-aif1";
+ data->dai.codecs->name = "wm8994-codec";
+ data->dai.cpus->dai_name = dev_name(&cpu_pdev->dev);
+ data->dai.platforms->of_node = cpu_np;
data->dai.ops = &imx_hifi_ops;
data->dai.dai_fmt |= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF;
data->card.set_bias_level = imx_wm8958_set_bias_level;