Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b1e19d9 authored by Garlic Tseng's avatar Garlic Tseng Committed by Mark Brown
Browse files

ASoC: mediatek: let mt8173 use mediatek common structure



Modify mt8173 driver implementation to use common structure.

Signed-off-by: default avatarGarlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 283b6124
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
config SND_SOC_MEDIATEK
	tristate

config SND_SOC_MT8173
	tristate "ASoC support for Mediatek MT8173 chip"
	depends on ARCH_MEDIATEK
	select SND_SOC_MEDIATEK
	help
	  This adds ASoC platform driver support for Mediatek MT8173 chip
	  that can be used with other codecs.
+1 −1
Original line number Diff line number Diff line
# 8173 Machine support
obj-$(CONFIG_SND_SOC_MEDIATEK) += common/
obj-$(CONFIG_SND_SOC_MT8173) += mt8173/
+16 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2015 MediaTek Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#

# platform driver
snd-soc-mtk-common-objs := mtk-afe-platform-driver.o mtk-afe-fe-dai.o
obj-$(CONFIG_SND_SOC_MEDIATEK) += snd-soc-mtk-common.o
+7 −35
Original line number Diff line number Diff line
@@ -46,14 +46,13 @@ enum {
};

enum {
	MT8173_AFE_IRQ_1,
	MT8173_AFE_IRQ_2,
	MT8173_AFE_IRQ_3,
	MT8173_AFE_IRQ_4,
	MT8173_AFE_IRQ_5,
	MT8173_AFE_IRQ_6,
	MT8173_AFE_IRQ_7,
	MT8173_AFE_IRQ_8,
	MT8173_AFE_IRQ_DL1,
	MT8173_AFE_IRQ_DL2,
	MT8173_AFE_IRQ_VUL,
	MT8173_AFE_IRQ_DAI,
	MT8173_AFE_IRQ_AWB,
	MT8173_AFE_IRQ_MOD_DAI,
	MT8173_AFE_IRQ_HDMI,
	MT8173_AFE_IRQ_NUM,
};

@@ -71,31 +70,4 @@ enum {
	MT8173_CLK_NUM
};

struct mt8173_afe;
struct snd_pcm_substream;

struct mt8173_afe_memif_data {
	int id;
	const char *name;
	int reg_ofs_base;
	int reg_ofs_cur;
	int fs_shift;
	int mono_shift;
	int enable_shift;
	int irq_reg_cnt;
	int irq_cnt_shift;
	int irq_en_shift;
	int irq_fs_shift;
	int irq_clr_shift;
	int msb_shift;
};

struct mt8173_afe_memif {
	unsigned int phys_buf_addr;
	int buffer_size;
	struct snd_pcm_substream *substream;
	const struct mt8173_afe_memif_data *data;
	const struct mt8173_afe_irq_data *irqdata;
};

#endif
+290 −389

File changed.

Preview size limit exceeded, changes collapsed.