mirror of https://github.com/OpenIPC/firmware.git
66 lines
2.1 KiB
Diff
66 lines
2.1 KiB
Diff
diff -drupN a/sound/soc/sunxi/sun8iw19-pcm.h b/sound/soc/sunxi/sun8iw19-pcm.h
|
|
--- a/sound/soc/sunxi/sun8iw19-pcm.h 1970-01-01 03:00:00.000000000 +0300
|
|
+++ b/sound/soc/sunxi/sun8iw19-pcm.h 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -0,0 +1,61 @@
|
|
+/* sound\soc\sunxi\sun8iw19-pcm.h
|
|
+ * (C) Copyright 2014-2019
|
|
+ * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
|
+ * Wolfgang Huang <huangjinhui@allwinnertech.com>
|
|
+ *
|
|
+ * some simple description for this code
|
|
+ *
|
|
+ * This program is free software; you can redistribute it and/or
|
|
+ * modify it under the terms of the GNU General Public License as
|
|
+ * published by the Free Software Foundation; either version 2 of
|
|
+ * the License, or (at your option) any later version.
|
|
+ *
|
|
+ */
|
|
+#ifndef __SUN8IW19_PCM_H_
|
|
+#define __SUN8IW19_PCM_H_
|
|
+
|
|
+struct sunxi_dma_params {
|
|
+ char *name;
|
|
+ dma_addr_t dma_addr;
|
|
+ u8 src_maxburst;
|
|
+ u8 dst_maxburst;
|
|
+ u8 dma_drq_type_num;
|
|
+};
|
|
+
|
|
+#ifdef CONFIG_SUNXI_ADC_DAUDIO_SYNC
|
|
+enum sunxi_pcm_adc_i2s_mode {
|
|
+ ADC_CODEC_SYNC = 0,
|
|
+ ADC_I2S_SYNC = 1,
|
|
+ ADC_I2S_RUNNING = 2,
|
|
+};
|
|
+
|
|
+struct sunxi_pcm_trigger_spinlock {
|
|
+ unsigned long ref_count;
|
|
+ spinlock_t spinlock;
|
|
+ unsigned long spinlock_flags;
|
|
+};
|
|
+
|
|
+long long sunxi_codec_get_pcm_trigger_playback_tv(void);
|
|
+long long sunxi_codec_get_pcm_trigger_capture_tv(void);
|
|
+void sunxi_codec_set_pcm_trigger_playback_tv(void);
|
|
+void sunxi_codec_set_pcm_trigger_capture_tv(void);
|
|
+int sunxi_codec_get_pcm_trigger_substream_mode(void);
|
|
+void sunxi_codec_set_pcm_trigger_substream_mode(int value);
|
|
+
|
|
+void sunxi_codec_set_pcm_adc_sync_flag(int value);
|
|
+int sunxi_codec_get_pcm_adc_sync_flag(void);
|
|
+void sunxi_codec_set_pcm_adc_daudio0(void *sunxi_daudio);
|
|
+void *sunxi_codec_get_pcm_adc_daudio0(void);
|
|
+/* for adc and i2s rx sync */
|
|
+void sunxi_codec_set_regmap(struct regmap *codec_regmap);
|
|
+void sunxi_cpudai_adc_drq_enable(bool enable);
|
|
+
|
|
+
|
|
+void audio_trigger_lock_spinlock(void);
|
|
+void audio_trigger_unlock_spinlock(void);
|
|
+
|
|
+#endif
|
|
+
|
|
+int asoc_dma_platform_register(struct device *dev, unsigned int flags);
|
|
+void asoc_dma_platform_unregister(struct device *dev);
|
|
+#endif /* __SUN8IW19_PCM_H_ */
|