122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI__SOUND_SB16_CSP_H
2022851890Sopenharmony_ci#define _UAPI__SOUND_SB16_CSP_H
2122851890Sopenharmony_ci#define SNDRV_SB_CSP_MODE_NONE 0x00
2222851890Sopenharmony_ci#define SNDRV_SB_CSP_MODE_DSP_READ 0x01
2322851890Sopenharmony_ci#define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02
2422851890Sopenharmony_ci#define SNDRV_SB_CSP_MODE_QSOUND 0x04
2522851890Sopenharmony_ci#define SNDRV_SB_CSP_LOAD_FROMUSER 0x01
2622851890Sopenharmony_ci#define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02
2722851890Sopenharmony_ci#define SNDRV_SB_CSP_SAMPLE_8BIT 0x01
2822851890Sopenharmony_ci#define SNDRV_SB_CSP_SAMPLE_16BIT 0x02
2922851890Sopenharmony_ci#define SNDRV_SB_CSP_MONO 0x01
3022851890Sopenharmony_ci#define SNDRV_SB_CSP_STEREO 0x02
3122851890Sopenharmony_ci#define SNDRV_SB_CSP_RATE_8000 0x01
3222851890Sopenharmony_ci#define SNDRV_SB_CSP_RATE_11025 0x02
3322851890Sopenharmony_ci#define SNDRV_SB_CSP_RATE_22050 0x04
3422851890Sopenharmony_ci#define SNDRV_SB_CSP_RATE_44100 0x08
3522851890Sopenharmony_ci#define SNDRV_SB_CSP_RATE_ALL 0x0f
3622851890Sopenharmony_ci#define SNDRV_SB_CSP_ST_IDLE 0x00
3722851890Sopenharmony_ci#define SNDRV_SB_CSP_ST_LOADED 0x01
3822851890Sopenharmony_ci#define SNDRV_SB_CSP_ST_RUNNING 0x02
3922851890Sopenharmony_ci#define SNDRV_SB_CSP_ST_PAUSED 0x04
4022851890Sopenharmony_ci#define SNDRV_SB_CSP_ST_AUTO 0x08
4122851890Sopenharmony_ci#define SNDRV_SB_CSP_ST_QSOUND 0x10
4222851890Sopenharmony_ci#define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20
4322851890Sopenharmony_ci#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
4422851890Sopenharmony_cistruct snd_sb_csp_mc_header {
4522851890Sopenharmony_ci  char codec_name[16];
4622851890Sopenharmony_ci  unsigned short func_req;
4722851890Sopenharmony_ci};
4822851890Sopenharmony_cistruct snd_sb_csp_microcode {
4922851890Sopenharmony_ci  struct snd_sb_csp_mc_header info;
5022851890Sopenharmony_ci  unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
5122851890Sopenharmony_ci};
5222851890Sopenharmony_cistruct snd_sb_csp_start {
5322851890Sopenharmony_ci  int sample_width;
5422851890Sopenharmony_ci  int channels;
5522851890Sopenharmony_ci};
5622851890Sopenharmony_cistruct snd_sb_csp_info {
5722851890Sopenharmony_ci  char codec_name[16];
5822851890Sopenharmony_ci  unsigned short func_nr;
5922851890Sopenharmony_ci  unsigned int acc_format;
6022851890Sopenharmony_ci  unsigned short acc_channels;
6122851890Sopenharmony_ci  unsigned short acc_width;
6222851890Sopenharmony_ci  unsigned short acc_rates;
6322851890Sopenharmony_ci  unsigned short csp_mode;
6422851890Sopenharmony_ci  unsigned short run_channels;
6522851890Sopenharmony_ci  unsigned short run_width;
6622851890Sopenharmony_ci  unsigned short version;
6722851890Sopenharmony_ci  unsigned short state;
6822851890Sopenharmony_ci};
6922851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
7022851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
7122851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
7222851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start)
7322851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
7422851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15)
7522851890Sopenharmony_ci#define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16)
7622851890Sopenharmony_ci#endif
77