summaryrefslogtreecommitdiff
path: root/firmware/export/pcm_record.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/pcm_record.h')
-rw-r--r--firmware/export/pcm_record.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/firmware/export/pcm_record.h b/firmware/export/pcm_record.h
index f6dddb3424..865a37fc70 100644
--- a/firmware/export/pcm_record.h
+++ b/firmware/export/pcm_record.h
@@ -25,6 +25,37 @@
25#define DMA_REC_ERROR_SPDIF (-2) 25#define DMA_REC_ERROR_SPDIF (-2)
26#endif 26#endif
27 27
28/** Warnings **/
29/* pcm (dma) buffer has overflowed */
30#define PCMREC_W_PCM_BUFFER_OVF 0x00000001
31/* encoder output buffer has overflowed */
32#define PCMREC_W_ENC_BUFFER_OVF 0x00000002
33#ifdef PCMREC_PARANOID
34/* dma write position alignment incorrect */
35#define PCMREC_W_DMA_WR_POS_ALIGN 0x00000004
36/* pcm read position changed at some point not under control of recording */
37#define PCMREC_W_PCM_RD_POS_TRASHED 0x00000008
38/* dma write position changed at some point not under control of recording */
39#define PCMREC_W_DMA_WR_POS_TRASHED 0x00000010
40#endif /* PCMREC_PARANOID */
41/** Errors **/
42/* failed to load encoder */
43#define PCMREC_E_LOAD_ENCODER 0x80001000
44/* error originating in encoder */
45#define PCMREC_E_ENCODER 0x80002000
46/* filename queue has desynced from stream markers */
47#define PCMREC_E_FNQ_DESYNC 0x80004000
48#ifdef PCMREC_PARANOID
49/* encoder has written past end of allotted space */
50#define PCMREC_E_CHUNK_OVF 0x80008000
51/* chunk header incorrect */
52#define PCMREC_E_BAD_CHUNK 0x80010000
53/* encoder read position changed outside of recording control */
54#define PCMREC_E_ENC_RD_INDEX_TRASHED 0x80020000
55/* encoder write position changed outside of recording control */
56#define PCMREC_E_ENC_WR_INDEX_TRASHED 0x80040000
57#endif /* PCMREC_PARANOID */
58
28/** 59/**
29 * RAW pcm data recording 60 * RAW pcm data recording
30 * These calls are nescessary only when using the raw pcm apis directly. 61 * These calls are nescessary only when using the raw pcm apis directly.
@@ -54,6 +85,7 @@ void pcm_rec_error_clear(void);
54/* pcm_rec_status is deprecated for general use. audio_status merges the 85/* pcm_rec_status is deprecated for general use. audio_status merges the
55 results for consistency with the hardware codec version */ 86 results for consistency with the hardware codec version */
56unsigned long pcm_rec_status(void); 87unsigned long pcm_rec_status(void);
88unsigned long pcm_rec_get_warnings(void);
57void pcm_rec_init(void); 89void pcm_rec_init(void);
58int pcm_rec_current_bitrate(void); 90int pcm_rec_current_bitrate(void);
59int pcm_rec_encoder_afmt(void); /* AFMT_* value, AFMT_UNKNOWN if none */ 91int pcm_rec_encoder_afmt(void); /* AFMT_* value, AFMT_UNKNOWN if none */