1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #ifndef _DVBAUDIO_H_
28 #define _DVBAUDIO_H_
29
30 #include <linux/types.h>
31
32 typedef enum {
33 AUDIO_SOURCE_DEMUX,
34 AUDIO_SOURCE_MEMORY
35 } audio_stream_source_t;
36
37
38 typedef enum {
39 AUDIO_STOPPED,
40 AUDIO_PLAYING,
41 AUDIO_PAUSED
42 } audio_play_state_t;
43
44
45 typedef enum {
46 AUDIO_STEREO,
47 AUDIO_MONO_LEFT,
48 AUDIO_MONO_RIGHT,
49 AUDIO_MONO,
50 AUDIO_STEREO_SWAPPED
51 } audio_channel_select_t;
52
53
54 typedef struct audio_mixer {
55 unsigned int volume_left;
56 unsigned int volume_right;
57
58 } audio_mixer_t;
59
60
61 typedef struct audio_status {
62 int AV_sync_state;
63 int mute_state;
64 audio_play_state_t play_state;
65 audio_stream_source_t stream_source;
66 audio_channel_select_t channel_select;
67 int bypass_mode;
68 audio_mixer_t mixer_state;
69 } audio_status_t;
70
71
72
73 #define AUDIO_CAP_DTS 1
74 #define AUDIO_CAP_LPCM 2
75 #define AUDIO_CAP_MP1 4
76 #define AUDIO_CAP_MP2 8
77 #define AUDIO_CAP_MP3 16
78 #define AUDIO_CAP_AAC 32
79 #define AUDIO_CAP_OGG 64
80 #define AUDIO_CAP_SDDS 128
81 #define AUDIO_CAP_AC3 256
82
83 #define AUDIO_STOP _IO('o', 1)
84 #define AUDIO_PLAY _IO('o', 2)
85 #define AUDIO_PAUSE _IO('o', 3)
86 #define AUDIO_CONTINUE _IO('o', 4)
87 #define AUDIO_SELECT_SOURCE _IO('o', 5)
88 #define AUDIO_SET_MUTE _IO('o', 6)
89 #define AUDIO_SET_AV_SYNC _IO('o', 7)
90 #define AUDIO_SET_BYPASS_MODE _IO('o', 8)
91 #define AUDIO_CHANNEL_SELECT _IO('o', 9)
92 #define AUDIO_GET_STATUS _IOR('o', 10, audio_status_t)
93
94 #define AUDIO_GET_CAPABILITIES _IOR('o', 11, unsigned int)
95 #define AUDIO_CLEAR_BUFFER _IO('o', 12)
96 #define AUDIO_SET_ID _IO('o', 13)
97 #define AUDIO_SET_MIXER _IOW('o', 14, audio_mixer_t)
98 #define AUDIO_SET_STREAMTYPE _IO('o', 15)
99 #define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)
100
101 #endif