MPEGPlayer quickie: add an option to set the backlight brightness to a plugin-specifi...
[kugel-rb.git] / firmware / export / pcm_record.h
blob814eb73b3a1b2edf35976960dde0cffd9e8d2cb4
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef PCM_RECORD_H
21 #define PCM_RECORD_H
23 #define DMA_REC_ERROR_DMA (-1)
24 #ifdef HAVE_SPDIF_REC
25 #define DMA_REC_ERROR_SPDIF (-2)
26 #endif
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 /** Errors **/
34 /* failed to load encoder */
35 #define PCMREC_E_LOAD_ENCODER 0x80001000
36 /* error originating in encoder */
37 #define PCMREC_E_ENCODER 0x80002000
38 /* filename queue has desynced from stream markers */
39 #define PCMREC_E_FNQ_DESYNC 0x80004000
40 /* I/O error has occurred */
41 #define PCMREC_E_IO 0x80008000
42 #ifdef DEBUG
43 /* encoder has written past end of allotted space */
44 #define PCMREC_E_CHUNK_OVF 0x80010000
45 #endif /* DEBUG */
47 /** General functions for high level codec recording **/
48 /* pcm_rec_error_clear is deprecated for general use. audio_error_clear
49 should be used */
50 void pcm_rec_error_clear(void);
51 /* pcm_rec_status is deprecated for general use. audio_status merges the
52 results for consistency with the hardware codec version */
53 unsigned long pcm_rec_status(void);
54 unsigned long pcm_rec_get_warnings(void);
55 void pcm_rec_init(void);
56 int pcm_rec_current_bitrate(void);
57 int pcm_rec_encoder_afmt(void); /* AFMT_* value, AFMT_UNKNOWN if none */
58 int pcm_rec_rec_format(void); /* Format index or -1 otherwise */
59 unsigned long pcm_rec_sample_rate(void);
60 int pcm_get_num_unprocessed(void);
62 /* audio.h contains audio_* recording functions */
64 #endif /* PCM_RECORD_H */