forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/mediatek/common/mtk-base-afe.h
....@@ -16,19 +16,38 @@
1616 const char *name;
1717 int reg_ofs_base;
1818 int reg_ofs_cur;
19
+ int reg_ofs_end;
20
+ int reg_ofs_base_msb;
21
+ int reg_ofs_cur_msb;
22
+ int reg_ofs_end_msb;
1923 int fs_reg;
2024 int fs_shift;
2125 int fs_maskbit;
2226 int mono_reg;
2327 int mono_shift;
28
+ int mono_invert;
29
+ int quad_ch_reg;
30
+ int quad_ch_mask;
31
+ int quad_ch_shift;
2432 int enable_reg;
2533 int enable_shift;
2634 int hd_reg;
2735 int hd_shift;
36
+ int hd_align_reg;
37
+ int hd_align_mshift;
2838 int msb_reg;
2939 int msb_shift;
40
+ int msb2_reg;
41
+ int msb2_shift;
3042 int agent_disable_reg;
3143 int agent_disable_shift;
44
+ /* playback memif only */
45
+ int pbuf_reg;
46
+ int pbuf_mask;
47
+ int pbuf_shift;
48
+ int minlen_reg;
49
+ int minlen_mask;
50
+ int minlen_shift;
3251 };
3352
3453 struct mtk_base_irq_data {
....@@ -82,6 +101,12 @@
82101 unsigned int rate);
83102 int (*irq_fs)(struct snd_pcm_substream *substream,
84103 unsigned int rate);
104
+ int (*get_dai_fs)(struct mtk_base_afe *afe,
105
+ int dai_id, unsigned int rate);
106
+ int (*get_memif_pbuf_size)(struct snd_pcm_substream *substream);
107
+
108
+ int (*request_dram_resource)(struct device *dev);
109
+ int (*release_dram_resource)(struct device *dev);
85110
86111 void *platform_priv;
87112 };
....@@ -93,6 +118,9 @@
93118 const struct mtk_base_memif_data *data;
94119 int irq_usage;
95120 int const_irq;
121
+ unsigned char *dma_area;
122
+ dma_addr_t dma_addr;
123
+ size_t dma_bytes;
96124 };
97125
98126 struct mtk_base_afe_irq {