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 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef __LINUX_MSM_AUDIO_H 13 #define __LINUX_MSM_AUDIO_H 14 15 #include <linux/types.h> 16 #include <linux/ioctl.h> 17 #include <asm/sizes.h> 18 19 #define AUDIO_IOCTL_MAGIC 'a' 20 21 #define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned) 22 #define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned) 23 #define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned) 24 #define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned) 25 #define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, unsigned) 26 #define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, unsigned) 27 #define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned) 28 #define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned) 29 #define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned) 30 #define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned) 31 #define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned) 32 #define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned) 33 #define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned) 34 #define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 13, unsigned) 35 #define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned) 36 #define AUDIO_SET_AAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 15, unsigned) 37 #define AUDIO_WAIT_ADSP_DONE _IOR(AUDIO_IOCTL_MAGIC, 16, unsigned) 38 #define AUDIO_ADSP_PAUSE _IOR(AUDIO_IOCTL_MAGIC, 17, unsigned) 39 #define AUDIO_ADSP_RESUME _IOR(AUDIO_IOCTL_MAGIC, 18, unsigned) 40 #define AUDIO_PLAY_DTMF _IOW(AUDIO_IOCTL_MAGIC, 19, unsigned) 41 #define AUDIO_GET_AAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 20, unsigned) 42 #define AUDIO_GET_AMRNB_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 21, unsigned) 43 #define AUDIO_SET_AMRNB_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 22, unsigned) 44 #define AUDIO_GET_PCM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 30, unsigned) 45 #define AUDIO_SET_PCM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 31, unsigned) 46 #define AUDIO_SWITCH_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned) 47 #define AUDIO_SET_MUTE _IOW(AUDIO_IOCTL_MAGIC, 33, unsigned) 48 #define AUDIO_UPDATE_ACDB _IOW(AUDIO_IOCTL_MAGIC, 34, unsigned) 49 #define AUDIO_START_VOICE _IOW(AUDIO_IOCTL_MAGIC, 35, unsigned) 50 #define AUDIO_STOP_VOICE _IOW(AUDIO_IOCTL_MAGIC, 36, unsigned) 51 52 struct msm_audio_config { 53 uint32_t buffer_size; 54 uint32_t buffer_count; 55 uint32_t channel_count; 56 uint32_t sample_rate; 57 uint32_t type; 58 uint32_t unused[3]; 59 }; 60 61 struct msm_audio_stats { 62 uint32_t byte_count; 63 uint32_t sample_count; 64 uint32_t unused[2]; 65 }; 66 67 #define SND_IOCTL_MAGIC 's' 68 69 #define SND_MUTE_UNMUTED 0 70 #define SND_MUTE_MUTED 1 71 72 struct msm_snd_device_config { 73 uint32_t device; 74 uint32_t ear_mute; 75 uint32_t mic_mute; 76 }; 77 78 #define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *) 79 80 #define SND_METHOD_VOICE 0 81 82 struct msm_snd_volume_config { 83 uint32_t device; 84 uint32_t method; 85 uint32_t volume; 86 }; 87 88 #define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *) 89 90 #define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *) 91 92 struct msm_snd_endpoint { 93 int id; 94 char name[64]; 95 }; 96 97 #define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *) 98 99 #endif 100