Skip to content

Commit 6ed619b

Browse files
AngeloGioacchino Del Regnobroonie
authored andcommitted
ASoC: mediatek: mt8186: Unify mt8186-mt6366 machine drivers
Copy the few differences from mt8186-mt6166-da7219-max98357 in the mt8186-mt6366-rt1019-rt5682s driver to greatly reduce code duplication; since now the driver is meant to support MT8186 with the MT6366 PMIC codec and various combinations of I2S codecs, rename the driver to mt8186-mt6366 for consistency with MT8195 and MT8188, and rename the configuration option to SND_SOC_MT8186_MT6366. Since right now there is no machine using the da7219-max98357 yet, the snd_soc_dapm_route array was omitted as it's now possible to specify the audio routing in device trees instead. While at it, also add the missing sentinel comment to the last entry of the of_device_id array. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240416071410.75620-14-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1d2a6b3 commit 6ed619b

4 files changed

Lines changed: 202 additions & 1242 deletions

File tree

sound/soc/mediatek/Kconfig

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,27 +185,11 @@ config SND_SOC_MT8186
185185
Select Y if you have such device.
186186
If unsure select "N".
187187

188-
config SND_SOC_MT8186_MT6366_DA7219_MAX98357
189-
tristate "ASoC Audio driver for MT8186 with DA7219 MAX98357A codec"
188+
config SND_SOC_MT8186_MT6366
189+
tristate "ASoC Audio driver for MT8186 with MT6366 and I2S codecs"
190190
depends on I2C && GPIOLIB
191191
depends on SND_SOC_MT8186 && MTK_PMIC_WRAP
192-
select SND_SOC_MT6358
193-
select SND_SOC_MAX98357A
194192
select SND_SOC_DA7219
195-
select SND_SOC_BT_SCO
196-
select SND_SOC_DMIC
197-
select SND_SOC_HDMI_CODEC
198-
help
199-
This adds ASoC driver for Mediatek MT8186 boards
200-
with the MT6366(MT6358) DA7219 MAX98357A codecs.
201-
Select Y if you have such device.
202-
If unsure select "N".
203-
204-
config SND_SOC_MT8186_MT6366_RT1019_RT5682S
205-
tristate "ASoC Audio driver for MT8186 with RT1019 RT5682S MAX98357A/MAX98360 codec"
206-
depends on I2C && GPIOLIB
207-
depends on SND_SOC_MT8186 && MTK_PMIC_WRAP
208-
select SND_SOC_MAX98357A
209193
select SND_SOC_MT6358
210194
select SND_SOC_MAX98357A
211195
select SND_SOC_RT1015P
@@ -215,8 +199,8 @@ config SND_SOC_MT8186_MT6366_RT1019_RT5682S
215199
select SND_SOC_DMIC
216200
select SND_SOC_HDMI_CODEC
217201
help
218-
This adds ASoC driver for Mediatek MT8186 boards
219-
with the MT6366(MT6358) RT1019 RT5682S codecs.
202+
This adds the ASoC machine driver for Mediatek MT8186 boards
203+
with the MT6366(MT6358) and other I2S audio codecs.
220204
Select Y if you have such device.
221205
If unsure select "N".
222206

sound/soc/mediatek/mt8186/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ snd-soc-mt8186-afe-objs := \
1818
mt8186-mt6366-common.o
1919

2020
obj-$(CONFIG_SND_SOC_MT8186) += snd-soc-mt8186-afe.o
21-
obj-$(CONFIG_SND_SOC_MT8186_MT6366_DA7219_MAX98357) += mt8186-mt6366-da7219-max98357.o
22-
obj-$(CONFIG_SND_SOC_MT8186_MT6366_RT1019_RT5682S) += mt8186-mt6366-rt1019-rt5682s.o
21+
obj-$(CONFIG_SND_SOC_MT8186_MT6366) += mt8186-mt6366.o

0 commit comments

Comments
 (0)