]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
Merge tag 'asoc-v5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[mirror_ubuntu-hirsute-kernel.git] / sound / soc / intel / boards / kbl_rt5663_rt5514_max98927.c
index 96c814f364581bbd30a1ada36a17b262ba3b14f0..1b1f8d7a4ea3fc8445d4e619dcc4ea578a8738eb 100644 (file)
@@ -206,7 +206,7 @@ static struct snd_soc_codec_conf max98927_codec_conf[] = {
 static int kabylake_rt5663_fe_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_dapm_context *dapm;
-       struct snd_soc_component *component = rtd->cpu_dai->component;
+       struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component;
        int ret;
 
        dapm = snd_soc_component_get_dapm(component);
@@ -221,7 +221,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 {
        int ret;
        struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card);
-       struct snd_soc_component *component = rtd->codec_dai->component;
+       struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
        struct snd_soc_jack *jack;
 
        /*
@@ -255,7 +255,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device)
 {
        struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card);
-       struct snd_soc_dai *dai = rtd->codec_dai;
+       struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
        struct kbl_hdmi_pcm *pcm;
 
        pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
@@ -372,7 +372,7 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
+       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
        int ret;
 
        /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */
@@ -399,7 +399,7 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
        struct snd_soc_dai *codec_dai;
        int ret = 0, j;
 
-       for_each_rtd_codec_dai(rtd, j, codec_dai) {
+       for_each_rtd_codec_dais(rtd, j, codec_dai) {
                if (!strcmp(codec_dai->component->name, RT5514_DEV_NAME)) {
                        ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0, 8, 16);
                        if (ret < 0) {
@@ -772,7 +772,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
        kabylake_audio_card.dev = &pdev->dev;
        snd_soc_card_set_drvdata(&kabylake_audio_card, ctx);
 
-       mach = (&pdev->dev)->platform_data;
+       mach = pdev->dev.platform_data;
        if (mach)
                dmic_constraints = mach->mach_params.dmic_num == 2 ?
                        &constraints_dmic_2ch : &constraints_dmic_channels;