Skip to content

Commit 6e1dbf6

Browse files
tongjianbroonie
authored andcommitted
ASoC: mediatek: mt8186: support rt5682s_max98360
Add support for using the rt5682s codec together with max98360a on MT8186-MT6366-RT1019-RT5682S machines. Signed-off-by: tongjian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b1e9c22 commit 6e1dbf6

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,21 @@ static struct snd_soc_card mt8186_mt6366_rt1019_rt5682s_soc_card = {
10831083
.num_configs = ARRAY_SIZE(mt8186_mt6366_rt1019_rt5682s_codec_conf),
10841084
};
10851085

1086+
static struct snd_soc_card mt8186_mt6366_rt5682s_max98360_soc_card = {
1087+
.name = "mt8186_rt5682s_max98360",
1088+
.owner = THIS_MODULE,
1089+
.dai_link = mt8186_mt6366_rt1019_rt5682s_dai_links,
1090+
.num_links = ARRAY_SIZE(mt8186_mt6366_rt1019_rt5682s_dai_links),
1091+
.controls = mt8186_mt6366_rt1019_rt5682s_controls,
1092+
.num_controls = ARRAY_SIZE(mt8186_mt6366_rt1019_rt5682s_controls),
1093+
.dapm_widgets = mt8186_mt6366_rt1019_rt5682s_widgets,
1094+
.num_dapm_widgets = ARRAY_SIZE(mt8186_mt6366_rt1019_rt5682s_widgets),
1095+
.dapm_routes = mt8186_mt6366_rt1019_rt5682s_routes,
1096+
.num_dapm_routes = ARRAY_SIZE(mt8186_mt6366_rt1019_rt5682s_routes),
1097+
.codec_conf = mt8186_mt6366_rt1019_rt5682s_codec_conf,
1098+
.num_configs = ARRAY_SIZE(mt8186_mt6366_rt1019_rt5682s_codec_conf),
1099+
};
1100+
10861101
static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
10871102
{
10881103
struct snd_soc_card *card;
@@ -1232,9 +1247,14 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
12321247

12331248
#if IS_ENABLED(CONFIG_OF)
12341249
static const struct of_device_id mt8186_mt6366_rt1019_rt5682s_dt_match[] = {
1235-
{ .compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound",
1250+
{
1251+
.compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound",
12361252
.data = &mt8186_mt6366_rt1019_rt5682s_soc_card,
12371253
},
1254+
{
1255+
.compatible = "mediatek,mt8186-mt6366-rt5682s-max98360-sound",
1256+
.data = &mt8186_mt6366_rt5682s_max98360_soc_card,
1257+
},
12381258
{}
12391259
};
12401260
MODULE_DEVICE_TABLE(of, mt8186_mt6366_rt1019_rt5682s_dt_match);

0 commit comments

Comments
 (0)