summaryrefslogtreecommitdiff
path: root/audio_codec/libflac/codec_message.h (plain)
blob: 030128328612a2b5aaacdd16272fac8eca0c1bb7
1#ifndef _CODEC_MESSAGE_HEADERS
2#define _CODEC_MESSAGE_HEADERS
3
4
5#define SUB_FMT_VALID (1<<1)
6#define CHANNEL_VALID (1<<2)
7#define SAMPLE_RATE_VALID (1<<3)
8#define DATA_WIDTH_VALID (1<<4)
9
10#define AUDIO_EXTRA_DATA_SIZE (2048*2)
11
12struct digit_raw_output_info {
13 int framelength;
14 unsigned char* framebuf;
15 int frame_size;
16 int frame_samples;
17 unsigned char* rawptr;
18 //for AC3
19 int sampleratecode;
20 int bsmod;
21
22 int bpf;
23 int brst;
24 int length;
25 int padsize;
26 int mode;
27 unsigned int syncword1;
28 unsigned int syncword2;
29 unsigned int syncword3;
30
31 unsigned int syncword1_mask;
32 unsigned int syncword2_mask;
33 unsigned int syncword3_mask;
34
35 unsigned chstat0_l;
36 unsigned chstat0_r;
37 unsigned chstat1_l;
38 unsigned chstat1_r;
39
40 unsigned can_bypass;
41};
42struct frame_fmt {
43 int valid;
44 int sub_fmt;
45 int channel_num;
46 int sample_rate;
47 int data_width;
48 int buffered_len;/*dsp codec,buffered origan data len*/
49 int format;
50 unsigned int total_byte_parsed;
51 union {
52 unsigned int total_sample_decoded;
53 void *pcm_encoded_info; //used for encoded pcm info
54 } data;
55 unsigned int bps;
56 void* private_data;
57 struct digit_raw_output_info * digit_raw_output_info;
58};
59
60typedef struct pcm51_encoded_info_s {
61 unsigned int InfoValidFlag; //only if InfoValidFlag==1 can userspace start reading the data in 51pcm_buf;
62 unsigned int SampFs; //sampling frequency
63 unsigned int NumCh; //total output valid channels( including LFE channel if LFE is valid)
64 unsigned int AcMode; //audio coding mode
65 unsigned int LFEFlag; //indicating the output buffers cotains LFE components if LFEFlag==1
66 unsigned int BitsPerSamp; //bits count used to indicates a pcm_samples
67} pcm51_encoded_info_t;
68
69
70struct frame_info {
71 int len;
72 unsigned long offset;/*steam start to here*/
73 unsigned long buffered_len;/*data buffer in dsp,pcm datalen*/
74 int reversed[1];/*for cache aligned 32 bytes*/
75};
76
77struct audio_info {
78 int valid;
79 int sample_rate;
80 int channels;
81 int bitrate;
82 int codec_id;
83 int block_align;
84 int extradata_size;
85 char extradata[AUDIO_EXTRA_DATA_SIZE];
86};
87
88typedef enum {
89 DECODE_INIT_ERR,
90 DECODE_FATAL_ERR,
91} error_code_t;
92
93struct dsp_working_info {
94 int status;
95 int sp;
96 int pc;
97 int ilink1;
98 int ilink2;
99 int blink;
100 int jeffies;
101 int out_wp;
102 int out_rp;
103 int buffered_len;//pcm buffered at the dsp side
104 int es_offset;//stream read offset since start decoder
105 int reserved[5];
106};
107
108#endif
109
110