ASoC: mediatek: let mt8173 use mediatek common structure
Modify mt8173 driver implementation to use common structure. Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
283b612429
Коммит
6b1e19d91d
|
@ -1,6 +1,10 @@
|
|||
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,2 +1,2 @@
|
|||
# 8173 Machine support
|
||||
obj-$(CONFIG_SND_SOC_MEDIATEK) += common/
|
||||
obj-$(CONFIG_SND_SOC_MT8173) += mt8173/
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# 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
|
|
@ -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
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче