aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mt8173/mt8173-max98090.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-08 14:45:20 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-08 14:45:34 +0200
commit3c53c6255d598db7084c5c3d7553d7200e857818 (patch)
tree19a88468bd59118ac7f07ce730485211ca671ea5 /sound/soc/mediatek/mt8173/mt8173-max98090.c
parentMerge branch 'topic/hda-refresh-cleanup' into for-next (diff)
parentMerge remote-tracking branch 'asoc/topic/meson' into asoc-next (diff)
downloadlinux-dev-3c53c6255d598db7084c5c3d7553d7200e857818.tar.xz
linux-dev-3c53c6255d598db7084c5c3d7553d7200e857818.zip
Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v5.3 This is a very big update, mainly thanks to Morimoto-san's refactoring work and some fairly large new drivers. - Lots more work on moving towards a component based framework from Morimoto-san. - Support for force disconnecting muxes from Jerome Brunet. - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant CX2072X, Realtek RT1011 and RT1308. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/mediatek/mt8173/mt8173-max98090.c')
-rw-r--r--sound/soc/mediatek/mt8173/mt8173-max98090.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/sound/soc/mediatek/mt8173/mt8173-max98090.c b/sound/soc/mediatek/mt8173/mt8173-max98090.c
index 4d6596d5cb07..22c00600c999 100644
--- a/sound/soc/mediatek/mt8173/mt8173-max98090.c
+++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c
@@ -82,41 +82,51 @@ static int mt8173_max98090_init(struct snd_soc_pcm_runtime *runtime)
return max98090_mic_detect(component, &mt8173_max98090_jack);
}
+SND_SOC_DAILINK_DEFS(playback,
+ DAILINK_COMP_ARRAY(COMP_CPU("DL1")),
+ DAILINK_COMP_ARRAY(COMP_DUMMY()),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
+SND_SOC_DAILINK_DEFS(capture,
+ DAILINK_COMP_ARRAY(COMP_CPU("VUL")),
+ DAILINK_COMP_ARRAY(COMP_DUMMY()),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
+SND_SOC_DAILINK_DEFS(hifi,
+ DAILINK_COMP_ARRAY(COMP_CPU("I2S")),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
/* Digital audio interface glue - connects codec <---> CPU */
static struct snd_soc_dai_link mt8173_max98090_dais[] = {
/* Front End DAI links */
{
.name = "MAX98090 Playback",
.stream_name = "MAX98090 Playback",
- .cpu_dai_name = "DL1",
- .codec_name = "snd-soc-dummy",
- .codec_dai_name = "snd-soc-dummy-dai",
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
.dynamic = 1,
.dpcm_playback = 1,
+ SND_SOC_DAILINK_REG(playback),
},
{
.name = "MAX98090 Capture",
.stream_name = "MAX98090 Capture",
- .cpu_dai_name = "VUL",
- .codec_name = "snd-soc-dummy",
- .codec_dai_name = "snd-soc-dummy-dai",
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
.dynamic = 1,
.dpcm_capture = 1,
+ SND_SOC_DAILINK_REG(capture),
},
/* Back End DAI links */
{
.name = "Codec",
- .cpu_dai_name = "I2S",
.no_pcm = 1,
- .codec_dai_name = "HiFi",
.init = mt8173_max98090_init,
.ops = &mt8173_max98090_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
.dpcm_playback = 1,
.dpcm_capture = 1,
+ SND_SOC_DAILINK_REG(hifi),
},
};
@@ -147,9 +157,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev)
return -EINVAL;
}
for_each_card_prelinks(card, i, dai_link) {
- if (dai_link->platform_name)
+ if (dai_link->platforms->name)
continue;
- dai_link->platform_of_node = platform_node;
+ dai_link->platforms->of_node = platform_node;
}
codec_node = of_parse_phandle(pdev->dev.of_node,
@@ -160,9 +170,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev)
return -EINVAL;
}
for_each_card_prelinks(card, i, dai_link) {
- if (dai_link->codec_name)
+ if (dai_link->codecs->name)
continue;
- dai_link->codec_of_node = codec_node;
+ dai_link->codecs->of_node = codec_node;
}
card->dev = &pdev->dev;