diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-06-06 00:18:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-06 17:06:39 -0400 |
commit | 8d6975ea3627d3aff2c9c8bb6b6eb84cddef0e07 (patch) | |
tree | 19358cb59c22d30ef5dbd0a02c2cbe1eac5e7175 /sound/soc/rockchip | |
parent | 0209bf2b2a765cd5c705a1f97e8f57895e3b9821 (diff) |
ASoC: rockchip: rockchip_max98090: use modern dai_link style
ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r-- | sound/soc/rockchip/rockchip_max98090.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c index 789d6f1e2b5f..fcb5c06a0fe2 100644 --- a/sound/soc/rockchip/rockchip_max98090.c +++ b/sound/soc/rockchip/rockchip_max98090.c | |||
@@ -123,14 +123,19 @@ static const struct snd_soc_ops rk_aif1_ops = { | |||
123 | .hw_params = rk_aif1_hw_params, | 123 | .hw_params = rk_aif1_hw_params, |
124 | }; | 124 | }; |
125 | 125 | ||
126 | SND_SOC_DAILINK_DEFS(hifi, | ||
127 | DAILINK_COMP_ARRAY(COMP_EMPTY()), | ||
128 | DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), | ||
129 | DAILINK_COMP_ARRAY(COMP_EMPTY())); | ||
130 | |||
126 | static struct snd_soc_dai_link rk_dailink = { | 131 | static struct snd_soc_dai_link rk_dailink = { |
127 | .name = "max98090", | 132 | .name = "max98090", |
128 | .stream_name = "Audio", | 133 | .stream_name = "Audio", |
129 | .codec_dai_name = "HiFi", | ||
130 | .ops = &rk_aif1_ops, | 134 | .ops = &rk_aif1_ops, |
131 | /* set max98090 as slave */ | 135 | /* set max98090 as slave */ |
132 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | 136 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
133 | SND_SOC_DAIFMT_CBS_CFS, | 137 | SND_SOC_DAIFMT_CBS_CFS, |
138 | SND_SOC_DAILINK_REG(hifi), | ||
134 | }; | 139 | }; |
135 | 140 | ||
136 | static int rk_98090_headset_init(struct snd_soc_component *component); | 141 | static int rk_98090_headset_init(struct snd_soc_component *component); |
@@ -184,23 +189,23 @@ static int snd_rk_mc_probe(struct platform_device *pdev) | |||
184 | /* register the soc card */ | 189 | /* register the soc card */ |
185 | card->dev = &pdev->dev; | 190 | card->dev = &pdev->dev; |
186 | 191 | ||
187 | rk_dailink.codec_of_node = of_parse_phandle(np, | 192 | rk_dailink.codecs->of_node = of_parse_phandle(np, |
188 | "rockchip,audio-codec", 0); | 193 | "rockchip,audio-codec", 0); |
189 | if (!rk_dailink.codec_of_node) { | 194 | if (!rk_dailink.codecs->of_node) { |
190 | dev_err(&pdev->dev, | 195 | dev_err(&pdev->dev, |
191 | "Property 'rockchip,audio-codec' missing or invalid\n"); | 196 | "Property 'rockchip,audio-codec' missing or invalid\n"); |
192 | return -EINVAL; | 197 | return -EINVAL; |
193 | } | 198 | } |
194 | 199 | ||
195 | rk_dailink.cpu_of_node = of_parse_phandle(np, | 200 | rk_dailink.cpus->of_node = of_parse_phandle(np, |
196 | "rockchip,i2s-controller", 0); | 201 | "rockchip,i2s-controller", 0); |
197 | if (!rk_dailink.cpu_of_node) { | 202 | if (!rk_dailink.cpus->of_node) { |
198 | dev_err(&pdev->dev, | 203 | dev_err(&pdev->dev, |
199 | "Property 'rockchip,i2s-controller' missing or invalid\n"); | 204 | "Property 'rockchip,i2s-controller' missing or invalid\n"); |
200 | return -EINVAL; | 205 | return -EINVAL; |
201 | } | 206 | } |
202 | 207 | ||
203 | rk_dailink.platform_of_node = rk_dailink.cpu_of_node; | 208 | rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; |
204 | 209 | ||
205 | rk_98090_headset_dev.codec_of_node = of_parse_phandle(np, | 210 | rk_98090_headset_dev.codec_of_node = of_parse_phandle(np, |
206 | "rockchip,headset-codec", 0); | 211 | "rockchip,headset-codec", 0); |