diff options
Diffstat (limited to 'firmware/export/pcm.h')
-rw-r--r-- | firmware/export/pcm.h | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/firmware/export/pcm.h b/firmware/export/pcm.h index 80b5b09a79..22c5ef350e 100644 --- a/firmware/export/pcm.h +++ b/firmware/export/pcm.h | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | /** RAW PCM routines used with playback and recording **/ | 50 | /** RAW PCM routines used with playback and recording **/ |
51 | 51 | ||
52 | /* Typedef for registered callback */ | 52 | /* Typedef for registered callbacks */ |
53 | typedef void (*pcm_play_callback_type)(unsigned char **start, | 53 | typedef void (*pcm_play_callback_type)(unsigned char **start, |
54 | size_t *size); | 54 | size_t *size); |
55 | typedef void (*pcm_rec_callback_type)(int status, void **start, size_t *size); | 55 | typedef void (*pcm_rec_callback_type)(int status, void **start, size_t *size); |
@@ -90,34 +90,7 @@ void pcm_play_pause(bool play); | |||
90 | bool pcm_is_paused(void); | 90 | bool pcm_is_paused(void); |
91 | bool pcm_is_playing(void); | 91 | bool pcm_is_playing(void); |
92 | 92 | ||
93 | /** The following are for internal use between pcm.c and target- | 93 | void pcm_play_set_dma_started_callback(void (* callback)(void)); |
94 | specific portion **/ | ||
95 | |||
96 | /* Called by the bottom layer ISR when more data is needed. Returns non- | ||
97 | * zero size if more data is to be played. Setting start to NULL | ||
98 | * forces stop. */ | ||
99 | void pcm_play_get_more_callback(void **start, size_t *size); | ||
100 | |||
101 | extern unsigned long pcm_curr_sampr; | ||
102 | extern unsigned long pcm_sampr; | ||
103 | extern int pcm_fsel; | ||
104 | |||
105 | #ifdef HAVE_PCM_DMA_ADDRESS | ||
106 | void * pcm_dma_addr(void *addr); | ||
107 | #endif | ||
108 | |||
109 | extern volatile bool pcm_playing; | ||
110 | extern volatile bool pcm_paused; | ||
111 | |||
112 | void pcm_play_dma_lock(void); | ||
113 | void pcm_play_dma_unlock(void); | ||
114 | void pcm_play_dma_init(void) INIT_ATTR; | ||
115 | void pcm_play_dma_start(const void *addr, size_t size); | ||
116 | void pcm_play_dma_stop(void); | ||
117 | void pcm_play_dma_pause(bool pause); | ||
118 | const void * pcm_play_dma_get_peak_buffer(int *count); | ||
119 | |||
120 | void pcm_dma_apply_settings(void); | ||
121 | 94 | ||
122 | #ifdef HAVE_RECORDING | 95 | #ifdef HAVE_RECORDING |
123 | 96 | ||
@@ -148,19 +121,6 @@ void pcm_rec_more_ready_callback(int status, void **start, size_t *size); | |||
148 | 121 | ||
149 | void pcm_calculate_rec_peaks(int *left, int *right); | 122 | void pcm_calculate_rec_peaks(int *left, int *right); |
150 | 123 | ||
151 | /** The following are for internal use between pcm.c and target- | ||
152 | specific portion **/ | ||
153 | /* DMA transfer in is currently active */ | ||
154 | extern volatile bool pcm_recording; | ||
155 | |||
156 | /* APIs implemented in the target-specific portion */ | ||
157 | void pcm_rec_dma_init(void); | ||
158 | void pcm_rec_dma_close(void); | ||
159 | void pcm_rec_dma_start(void *addr, size_t size); | ||
160 | void pcm_rec_dma_record_more(void *start, size_t size); | ||
161 | void pcm_rec_dma_stop(void); | ||
162 | const void * pcm_rec_dma_get_peak_buffer(void); | ||
163 | |||
164 | #endif /* HAVE_RECORDING */ | 124 | #endif /* HAVE_RECORDING */ |
165 | 125 | ||
166 | #endif /* PCM_PLAYBACK_H */ | 126 | #endif /* PCM_PLAYBACK_H */ |