• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI__SOUND_SB16_CSP_H
20 #define _UAPI__SOUND_SB16_CSP_H
21 #define SNDRV_SB_CSP_MODE_NONE 0x00
22 #define SNDRV_SB_CSP_MODE_DSP_READ 0x01
23 #define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02
24 #define SNDRV_SB_CSP_MODE_QSOUND 0x04
25 #define SNDRV_SB_CSP_LOAD_FROMUSER 0x01
26 #define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02
27 #define SNDRV_SB_CSP_SAMPLE_8BIT 0x01
28 #define SNDRV_SB_CSP_SAMPLE_16BIT 0x02
29 #define SNDRV_SB_CSP_MONO 0x01
30 #define SNDRV_SB_CSP_STEREO 0x02
31 #define SNDRV_SB_CSP_RATE_8000 0x01
32 #define SNDRV_SB_CSP_RATE_11025 0x02
33 #define SNDRV_SB_CSP_RATE_22050 0x04
34 #define SNDRV_SB_CSP_RATE_44100 0x08
35 #define SNDRV_SB_CSP_RATE_ALL 0x0f
36 #define SNDRV_SB_CSP_ST_IDLE 0x00
37 #define SNDRV_SB_CSP_ST_LOADED 0x01
38 #define SNDRV_SB_CSP_ST_RUNNING 0x02
39 #define SNDRV_SB_CSP_ST_PAUSED 0x04
40 #define SNDRV_SB_CSP_ST_AUTO 0x08
41 #define SNDRV_SB_CSP_ST_QSOUND 0x10
42 #define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20
43 #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
44 struct snd_sb_csp_mc_header {
45   char codec_name[16];
46   unsigned short func_req;
47 };
48 struct snd_sb_csp_microcode {
49   struct snd_sb_csp_mc_header info;
50   unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
51 };
52 struct snd_sb_csp_start {
53   int sample_width;
54   int channels;
55 };
56 struct snd_sb_csp_info {
57   char codec_name[16];
58   unsigned short func_nr;
59   unsigned int acc_format;
60   unsigned short acc_channels;
61   unsigned short acc_width;
62   unsigned short acc_rates;
63   unsigned short csp_mode;
64   unsigned short run_channels;
65   unsigned short run_width;
66   unsigned short version;
67   unsigned short state;
68 };
69 #define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
70 #define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
71 #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
72 #define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start)
73 #define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
74 #define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15)
75 #define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16)
76 #endif
77