Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI__SOUND_SB16_CSP_H |
| 8 | #define _UAPI__SOUND_SB16_CSP_H |
| 9 | #define SNDRV_SB_CSP_MODE_NONE 0x00 |
| 10 | #define SNDRV_SB_CSP_MODE_DSP_READ 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02 |
| 12 | #define SNDRV_SB_CSP_MODE_QSOUND 0x04 |
| 13 | #define SNDRV_SB_CSP_LOAD_FROMUSER 0x01 |
| 14 | #define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define SNDRV_SB_CSP_SAMPLE_8BIT 0x01 |
| 16 | #define SNDRV_SB_CSP_SAMPLE_16BIT 0x02 |
| 17 | #define SNDRV_SB_CSP_MONO 0x01 |
| 18 | #define SNDRV_SB_CSP_STEREO 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #define SNDRV_SB_CSP_RATE_8000 0x01 |
| 20 | #define SNDRV_SB_CSP_RATE_11025 0x02 |
| 21 | #define SNDRV_SB_CSP_RATE_22050 0x04 |
| 22 | #define SNDRV_SB_CSP_RATE_44100 0x08 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define SNDRV_SB_CSP_RATE_ALL 0x0f |
| 24 | #define SNDRV_SB_CSP_ST_IDLE 0x00 |
| 25 | #define SNDRV_SB_CSP_ST_LOADED 0x01 |
| 26 | #define SNDRV_SB_CSP_ST_RUNNING 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define SNDRV_SB_CSP_ST_PAUSED 0x04 |
| 28 | #define SNDRV_SB_CSP_ST_AUTO 0x08 |
| 29 | #define SNDRV_SB_CSP_ST_QSOUND 0x10 |
| 30 | #define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 |
| 32 | struct snd_sb_csp_mc_header { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 | char codec_name[16]; |
| 34 | unsigned short func_req; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | }; |
| 36 | struct snd_sb_csp_microcode { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | struct snd_sb_csp_mc_header info; |
| 38 | unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | }; |
| 40 | struct snd_sb_csp_start { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | int sample_width; |
| 42 | int channels; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | }; |
| 44 | struct snd_sb_csp_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | char codec_name[16]; |
| 46 | unsigned short func_nr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | unsigned int acc_format; |
| 48 | unsigned short acc_channels; |
| 49 | unsigned short acc_width; |
| 50 | unsigned short acc_rates; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | unsigned short csp_mode; |
| 52 | unsigned short run_channels; |
| 53 | unsigned short run_width; |
| 54 | unsigned short version; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | unsigned short state; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | }; |
| 57 | #define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 58 | #define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) |
| 60 | #define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start) |
| 61 | #define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14) |
| 62 | #define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16) |
| 64 | #endif |