Skip to content

Commit efd58ed

Browse files
committed
Add new AMP MAX98360A for RT5682S
Merge series from tongjian <[email protected]>: Add MAX98360A for RT5682S, MAX98360A works same as rt1019. So, it can be supported.
2 parents 472a630 + 2d3dd55 commit efd58ed

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ properties:
1616
compatible:
1717
enum:
1818
- mediatek,mt8186-mt6366-rt1019-rt5682s-sound
19+
- mediatek,mt8186-mt6366-rt5682s-max98360-sound
1920

2021
mediatek,platform:
2122
$ref: "/schemas/types.yaml#/definitions/phandle"

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)