ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
[sfrench/cifs-2.6.git] / sound / soc / mediatek / mt8173 / mt8173-rt5650.c
index bbc4ad749892c93b4779e35dfa4021b05d28ac1c..2065c94dbf99dea431ef5212d86b8c96d8166c66 100644 (file)
@@ -104,8 +104,8 @@ static struct snd_soc_jack mt8173_rt5650_jack, mt8173_rt5650_hdmi_jack;
 static int mt8173_rt5650_init(struct snd_soc_pcm_runtime *runtime)
 {
        struct snd_soc_card *card = runtime->card;
-       struct snd_soc_component *component = runtime->codec_dais[0]->component;
-       const char *codec_capture_dai = runtime->codec_dais[1]->name;
+       struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
+       const char *codec_capture_dai = asoc_rtd_to_codec(runtime, 1)->name;
        int ret;
 
        rt5645_sel_asrc_clk_src(component,
@@ -154,7 +154,7 @@ static int mt8173_rt5650_hdmi_init(struct snd_soc_pcm_runtime *rtd)
        if (ret)
                return ret;
 
-       return hdmi_codec_set_jack_detect(rtd->codec_dai->component,
+       return hdmi_codec_set_jack_detect(asoc_rtd_to_codec(rtd, 0)->component,
                                          &mt8173_rt5650_hdmi_jack);
 }