Unverified Commit 125ab5d5 authored by Jiaxin Yu's avatar Jiaxin Yu Committed by Mark Brown
Browse files

ASoC: mediatek: mt8192: add platform driver



This patch adds mt8192 platform and affiliated drivers.

Signed-off-by: default avatarJiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1604390378-23993-3-git-send-email-jiaxin.yu@mediatek.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 682c5a72
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -158,3 +158,13 @@ config SND_SOC_MTK_BTCVSD
	  BT encoded data to/from BT firmware.
	  Select Y if you have such device.
	  If unsure select "N".

config SND_SOC_MT8192
	tristate "ASoC support for Mediatek MT8192 chip"
	depends on ARCH_MEDIATEK
	select SND_SOC_MEDIATEK
	help
	  This adds ASoC platform driver support for Mediatek MT8192 chip
	  that can be used with other codecs.
	  Select Y if you have such device.
	  If unsure select "N".
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@ obj-$(CONFIG_SND_SOC_MT2701) += mt2701/
obj-$(CONFIG_SND_SOC_MT6797) += mt6797/
obj-$(CONFIG_SND_SOC_MT8173) += mt8173/
obj-$(CONFIG_SND_SOC_MT8183) += mt8183/
obj-$(CONFIG_SND_SOC_MT8192) += mt8192/
+9 −4
Original line number Diff line number Diff line
@@ -542,8 +542,13 @@ int mtk_memif_set_format(struct mtk_base_afe *afe,
		break;
	case SNDRV_PCM_FORMAT_S32_LE:
	case SNDRV_PCM_FORMAT_U32_LE:
		if (afe->memif_32bit_supported) {
			hd_audio = 2;
			hd_align = 0;
		} else {
			hd_audio = 1;
			hd_align = 1;
		}
		break;
	case SNDRV_PCM_FORMAT_S24_LE:
	case SNDRV_PCM_FORMAT_U24_LE:
@@ -556,10 +561,10 @@ int mtk_memif_set_format(struct mtk_base_afe *afe,
	}

	mtk_regmap_update_bits(afe->regmap, memif->data->hd_reg,
			       1, hd_audio, memif->data->hd_shift);
			       0x3, hd_audio, memif->data->hd_shift);

	mtk_regmap_update_bits(afe->regmap, memif->data->hd_align_reg,
			       1, hd_align, memif->data->hd_align_mshift);
			       0x1, hd_align, memif->data->hd_align_mshift);

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ struct mtk_base_afe {
	int memif_size;
	struct mtk_base_afe_irq *irqs;
	int irqs_size;
	int memif_32bit_supported;

	struct list_head sub_dais;
	struct snd_soc_dai_driver *dai_drivers;
+14 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

# platform driver
snd-soc-mt8192-afe-objs := \
	mt8192-afe-pcm.o \
	mt8192-afe-clk.o \
	mt8192-afe-gpio.o \
	mt8192-dai-adda.o \
	mt8192-afe-control.o \
	mt8192-dai-i2s.o \
	mt8192-dai-pcm.o \
	mt8192-dai-tdm.o

obj-$(CONFIG_SND_SOC_MT8192) += snd-soc-mt8192-afe.o
Loading