diff options
author | Robin Peng <robinpeng@google.com> | 2018-07-05 23:21:23 +0800 |
---|---|---|
committer | Roger Liao <rogerliao@google.com> | 2018-07-12 21:02:08 +0800 |
commit | 0beab3880dbd3bdd45bd8b4e7229578f5716bc1f (patch) | |
tree | bcb2e75b8d02bdab11b58d4a6ab632886e10f0a1 /sdm710/kernel-headers | |
parent | 2a0b37c9335ea1ceddc77f98a3a5e735d613d62f (diff) | |
download | bonito-0beab3880dbd3bdd45bd8b4e7229578f5716bc1f.tar.gz |
Update kernel headers
Bug: 111163725
Change-Id: Ib84c319ea95c37b3c090ce089e0b4d67c8a8a5ba
Signed-off-by: Robin Peng <robinpeng@google.com>
Diffstat (limited to 'sdm710/kernel-headers')
26 files changed, 2004 insertions, 1666 deletions
diff --git a/sdm710/kernel-headers/linux/avtimer.h b/sdm710/kernel-headers/linux/avtimer.h index 81b03a6e..cbcd8247 100644 --- a/sdm710/kernel-headers/linux/avtimer.h +++ b/sdm710/kernel-headers/linux/avtimer.h @@ -1,25 +1,10 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _AVTIMER_H #define _AVTIMER_H + #include <linux/ioctl.h> + #define MAJOR_NUM 100 + #define IOCTL_GET_AVTIMER_TICK _IOR(MAJOR_NUM, 0, uint64_t) -#endif +#endif diff --git a/sdm710/kernel-headers/linux/msm_audio.h b/sdm710/kernel-headers/linux/msm_audio.h index 586738a2..f2f2ce3d 100644 --- a/sdm710/kernel-headers/linux/msm_audio.h +++ b/sdm710/kernel-headers/linux/msm_audio.h @@ -1,353 +1,475 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ +/* include/linux/msm_audio.h + * + * Copyright (C) 2008 Google, Inc. + * Copyright (c) 2012, 2014, 2017 The Linux Foundation. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + #ifndef _LINUX_MSM_AUDIO_H #define _LINUX_MSM_AUDIO_H + #include <linux/types.h> #include <linux/ioctl.h> + +/* PCM Audio */ + #define AUDIO_IOCTL_MAGIC 'a' -#define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned int) -#define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned int) -#define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned int) -#define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, struct msm_audio_config) -#define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, struct msm_audio_config) -#define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, struct msm_audio_stats) + +#define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned int) +#define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned int) +#define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned int) +#define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, \ + struct msm_audio_config) +#define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, \ + struct msm_audio_config) +#define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, \ + struct msm_audio_stats) #define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned int) -#define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned int) -#define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned int) -#define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned int) -#define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned int) -#define AUDIO_PAUSE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned int) -#define AUDIO_PLAY_DTMF _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned int) -#define AUDIO_GET_EVENT _IOR(AUDIO_IOCTL_MAGIC, 13, struct msm_audio_event) +#define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned int) +#define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned int) +#define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned int) +#define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned int) +#define AUDIO_PAUSE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned int) +#define AUDIO_PLAY_DTMF _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned int) +#define AUDIO_GET_EVENT _IOR(AUDIO_IOCTL_MAGIC, 13, \ + struct msm_audio_event) #define AUDIO_ABORT_GET_EVENT _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned int) #define AUDIO_REGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 15, unsigned int) #define AUDIO_DEREGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 16, unsigned int) -#define AUDIO_ASYNC_WRITE _IOW(AUDIO_IOCTL_MAGIC, 17, struct msm_audio_aio_buf) -#define AUDIO_ASYNC_READ _IOW(AUDIO_IOCTL_MAGIC, 18, struct msm_audio_aio_buf) +#define AUDIO_ASYNC_WRITE _IOW(AUDIO_IOCTL_MAGIC, 17, \ + struct msm_audio_aio_buf) +#define AUDIO_ASYNC_READ _IOW(AUDIO_IOCTL_MAGIC, 18, \ + struct msm_audio_aio_buf) #define AUDIO_SET_INCALL _IOW(AUDIO_IOCTL_MAGIC, 19, struct msm_voicerec_mode) #define AUDIO_GET_NUM_SND_DEVICE _IOR(AUDIO_IOCTL_MAGIC, 20, unsigned int) -#define AUDIO_GET_SND_DEVICES _IOWR(AUDIO_IOCTL_MAGIC, 21, struct msm_snd_device_list) +#define AUDIO_GET_SND_DEVICES _IOWR(AUDIO_IOCTL_MAGIC, 21, \ + struct msm_snd_device_list) #define AUDIO_ENABLE_SND_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 22, unsigned int) #define AUDIO_DISABLE_SND_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 23, unsigned int) -#define AUDIO_ROUTE_STREAM _IOW(AUDIO_IOCTL_MAGIC, 24, struct msm_audio_route_config) +#define AUDIO_ROUTE_STREAM _IOW(AUDIO_IOCTL_MAGIC, 24, \ + struct msm_audio_route_config) #define AUDIO_GET_PCM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 30, unsigned int) #define AUDIO_SET_PCM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 31, unsigned int) -#define AUDIO_SWITCH_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned int) -#define AUDIO_SET_MUTE _IOW(AUDIO_IOCTL_MAGIC, 33, unsigned int) -#define AUDIO_UPDATE_ACDB _IOW(AUDIO_IOCTL_MAGIC, 34, unsigned int) -#define AUDIO_START_VOICE _IOW(AUDIO_IOCTL_MAGIC, 35, unsigned int) -#define AUDIO_STOP_VOICE _IOW(AUDIO_IOCTL_MAGIC, 36, unsigned int) -#define AUDIO_REINIT_ACDB _IOW(AUDIO_IOCTL_MAGIC, 39, unsigned int) -#define AUDIO_OUTPORT_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 40, unsigned short) -#define AUDIO_SET_ERR_THRESHOLD_VALUE _IOW(AUDIO_IOCTL_MAGIC, 41, unsigned short) -#define AUDIO_GET_BITSTREAM_ERROR_INFO _IOR(AUDIO_IOCTL_MAGIC, 42, struct msm_audio_bitstream_error_info) +#define AUDIO_SWITCH_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned int) +#define AUDIO_SET_MUTE _IOW(AUDIO_IOCTL_MAGIC, 33, unsigned int) +#define AUDIO_UPDATE_ACDB _IOW(AUDIO_IOCTL_MAGIC, 34, unsigned int) +#define AUDIO_START_VOICE _IOW(AUDIO_IOCTL_MAGIC, 35, unsigned int) +#define AUDIO_STOP_VOICE _IOW(AUDIO_IOCTL_MAGIC, 36, unsigned int) +#define AUDIO_REINIT_ACDB _IOW(AUDIO_IOCTL_MAGIC, 39, unsigned int) +#define AUDIO_OUTPORT_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 40, unsigned short) +#define AUDIO_SET_ERR_THRESHOLD_VALUE _IOW(AUDIO_IOCTL_MAGIC, 41, \ + unsigned short) +#define AUDIO_GET_BITSTREAM_ERROR_INFO _IOR(AUDIO_IOCTL_MAGIC, 42, \ + struct msm_audio_bitstream_error_info) + #define AUDIO_SET_SRS_TRUMEDIA_PARAM _IOW(AUDIO_IOCTL_MAGIC, 43, unsigned int) -#define AUDIO_SET_STREAM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 80, struct msm_audio_stream_config) -#define AUDIO_GET_STREAM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 81, struct msm_audio_stream_config) + +/* Qualcomm technologies inc extensions */ +#define AUDIO_SET_STREAM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 80, \ + struct msm_audio_stream_config) +#define AUDIO_GET_STREAM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 81, \ + struct msm_audio_stream_config) #define AUDIO_GET_SESSION_ID _IOR(AUDIO_IOCTL_MAGIC, 82, unsigned short) -#define AUDIO_GET_STREAM_INFO _IOR(AUDIO_IOCTL_MAGIC, 83, struct msm_audio_bitstream_info) -#define AUDIO_SET_PAN _IOW(AUDIO_IOCTL_MAGIC, 84, unsigned int) -#define AUDIO_SET_QCONCERT_PLUS _IOW(AUDIO_IOCTL_MAGIC, 85, unsigned int) -#define AUDIO_SET_MBADRC _IOW(AUDIO_IOCTL_MAGIC, 86, unsigned int) -#define AUDIO_SET_VOLUME_PATH _IOW(AUDIO_IOCTL_MAGIC, 87, struct msm_vol_info) +#define AUDIO_GET_STREAM_INFO _IOR(AUDIO_IOCTL_MAGIC, 83, \ + struct msm_audio_bitstream_info) +#define AUDIO_SET_PAN _IOW(AUDIO_IOCTL_MAGIC, 84, unsigned int) +#define AUDIO_SET_QCONCERT_PLUS _IOW(AUDIO_IOCTL_MAGIC, 85, unsigned int) +#define AUDIO_SET_MBADRC _IOW(AUDIO_IOCTL_MAGIC, 86, unsigned int) +#define AUDIO_SET_VOLUME_PATH _IOW(AUDIO_IOCTL_MAGIC, 87, \ + struct msm_vol_info) #define AUDIO_SET_MAX_VOL_ALL _IOW(AUDIO_IOCTL_MAGIC, 88, unsigned int) -#define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 89, unsigned int) -#define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 90, unsigned int) -#define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 91, unsigned int) -#define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 92, unsigned int) -#define AUDIO_GET_BUF_CFG _IOW(AUDIO_IOCTL_MAGIC, 93, struct msm_audio_buf_cfg) -#define AUDIO_SET_BUF_CFG _IOW(AUDIO_IOCTL_MAGIC, 94, struct msm_audio_buf_cfg) -#define AUDIO_SET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 95, struct msm_acdb_cmd_device) -#define AUDIO_GET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 96, struct msm_acdb_cmd_device) -#define AUDIO_REGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 97, struct msm_audio_ion_info) -#define AUDIO_DEREGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 98, struct msm_audio_ion_info) -#define AUDIO_SET_EFFECTS_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 99, struct msm_hwacc_effects_config) -#define AUDIO_EFFECTS_SET_BUF_LEN _IOW(AUDIO_IOCTL_MAGIC, 100, struct msm_hwacc_buf_cfg) -#define AUDIO_EFFECTS_GET_BUF_AVAIL _IOW(AUDIO_IOCTL_MAGIC, 101, struct msm_hwacc_buf_avail) +#define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 89, unsigned int) +#define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 90, unsigned int) +#define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 91, unsigned int) +#define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 92, unsigned int) +#define AUDIO_GET_BUF_CFG _IOW(AUDIO_IOCTL_MAGIC, 93, \ + struct msm_audio_buf_cfg) +#define AUDIO_SET_BUF_CFG _IOW(AUDIO_IOCTL_MAGIC, 94, \ + struct msm_audio_buf_cfg) +#define AUDIO_SET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 95, \ + struct msm_acdb_cmd_device) +#define AUDIO_GET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 96, \ + struct msm_acdb_cmd_device) + +#define AUDIO_REGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 97, \ + struct msm_audio_ion_info) +#define AUDIO_DEREGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 98, \ + struct msm_audio_ion_info) +#define AUDIO_SET_EFFECTS_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 99, \ + struct msm_hwacc_effects_config) +#define AUDIO_EFFECTS_SET_BUF_LEN _IOW(AUDIO_IOCTL_MAGIC, 100, \ + struct msm_hwacc_buf_cfg) +#define AUDIO_EFFECTS_GET_BUF_AVAIL _IOW(AUDIO_IOCTL_MAGIC, 101, \ + struct msm_hwacc_buf_avail) #define AUDIO_EFFECTS_WRITE _IOW(AUDIO_IOCTL_MAGIC, 102, void *) #define AUDIO_EFFECTS_READ _IOWR(AUDIO_IOCTL_MAGIC, 103, void *) #define AUDIO_EFFECTS_SET_PP_PARAMS _IOW(AUDIO_IOCTL_MAGIC, 104, void *) -#define AUDIO_PM_AWAKE _IOW(AUDIO_IOCTL_MAGIC, 105, unsigned int) -#define AUDIO_PM_RELAX _IOW(AUDIO_IOCTL_MAGIC, 106, unsigned int) -#define AUDIO_MAX_COMMON_IOCTL_NUM 107 -#define HANDSET_MIC 0x01 -#define HANDSET_SPKR 0x02 -#define HEADSET_MIC 0x03 -#define HEADSET_SPKR_MONO 0x04 -#define HEADSET_SPKR_STEREO 0x05 -#define SPKR_PHONE_MIC 0x06 -#define SPKR_PHONE_MONO 0x07 -#define SPKR_PHONE_STEREO 0x08 -#define BT_SCO_MIC 0x09 -#define BT_SCO_SPKR 0x0A -#define BT_A2DP_SPKR 0x0B -#define TTY_HEADSET_MIC 0x0C -#define TTY_HEADSET_SPKR 0x0D -#define DEFAULT_TX 0x0E -#define DEFAULT_RX 0x0F -#define BT_A2DP_TX 0x10 -#define HEADSET_MONO_PLUS_SPKR_MONO_RX 0x11 -#define HEADSET_MONO_PLUS_SPKR_STEREO_RX 0x12 -#define HEADSET_STEREO_PLUS_SPKR_MONO_RX 0x13 -#define HEADSET_STEREO_PLUS_SPKR_STEREO_RX 0x14 -#define I2S_RX 0x20 -#define I2S_TX 0x21 -#define ADRC_ENABLE 0x0001 -#define EQUALIZER_ENABLE 0x0002 -#define IIR_ENABLE 0x0004 -#define QCONCERT_PLUS_ENABLE 0x0008 -#define MBADRC_ENABLE 0x0010 -#define SRS_ENABLE 0x0020 -#define SRS_DISABLE 0x0040 -#define AGC_ENABLE 0x0001 -#define NS_ENABLE 0x0002 -#define TX_IIR_ENABLE 0x0004 -#define FLUENCE_ENABLE 0x0008 -#define VOC_REC_UPLINK 0x00 -#define VOC_REC_DOWNLINK 0x01 -#define VOC_REC_BOTH 0x02 + +#define AUDIO_PM_AWAKE _IOW(AUDIO_IOCTL_MAGIC, 105, unsigned int) +#define AUDIO_PM_RELAX _IOW(AUDIO_IOCTL_MAGIC, 106, unsigned int) + +#define AUDIO_MAX_COMMON_IOCTL_NUM 107 + + +#define HANDSET_MIC 0x01 +#define HANDSET_SPKR 0x02 +#define HEADSET_MIC 0x03 +#define HEADSET_SPKR_MONO 0x04 +#define HEADSET_SPKR_STEREO 0x05 +#define SPKR_PHONE_MIC 0x06 +#define SPKR_PHONE_MONO 0x07 +#define SPKR_PHONE_STEREO 0x08 +#define BT_SCO_MIC 0x09 +#define BT_SCO_SPKR 0x0A +#define BT_A2DP_SPKR 0x0B +#define TTY_HEADSET_MIC 0x0C +#define TTY_HEADSET_SPKR 0x0D + +/* Default devices are not supported in a */ +/* device switching context. Only supported */ +/* for stream devices. */ +/* DO NOT USE */ +#define DEFAULT_TX 0x0E +#define DEFAULT_RX 0x0F + +#define BT_A2DP_TX 0x10 + +#define HEADSET_MONO_PLUS_SPKR_MONO_RX 0x11 +#define HEADSET_MONO_PLUS_SPKR_STEREO_RX 0x12 +#define HEADSET_STEREO_PLUS_SPKR_MONO_RX 0x13 +#define HEADSET_STEREO_PLUS_SPKR_STEREO_RX 0x14 + +#define I2S_RX 0x20 +#define I2S_TX 0x21 + +#define ADRC_ENABLE 0x0001 +#define EQUALIZER_ENABLE 0x0002 +#define IIR_ENABLE 0x0004 +#define QCONCERT_PLUS_ENABLE 0x0008 +#define MBADRC_ENABLE 0x0010 +#define SRS_ENABLE 0x0020 +#define SRS_DISABLE 0x0040 + +#define AGC_ENABLE 0x0001 +#define NS_ENABLE 0x0002 +#define TX_IIR_ENABLE 0x0004 +#define FLUENCE_ENABLE 0x0008 + +#define VOC_REC_UPLINK 0x00 +#define VOC_REC_DOWNLINK 0x01 +#define VOC_REC_BOTH 0x02 + struct msm_audio_config { - uint32_t buffer_size; - uint32_t buffer_count; - uint32_t channel_count; - uint32_t sample_rate; - uint32_t type; - uint32_t meta_field; - uint32_t bits; - uint32_t unused[3]; + uint32_t buffer_size; + uint32_t buffer_count; + uint32_t channel_count; + uint32_t sample_rate; + uint32_t type; + uint32_t meta_field; + uint32_t bits; + uint32_t unused[3]; }; + struct msm_audio_stream_config { - uint32_t buffer_size; - uint32_t buffer_count; + uint32_t buffer_size; + uint32_t buffer_count; }; + struct msm_audio_buf_cfg { - uint32_t meta_info_enable; - uint32_t frames_per_buf; + uint32_t meta_info_enable; + uint32_t frames_per_buf; }; + struct msm_audio_stats { - uint32_t byte_count; - uint32_t sample_count; - uint32_t unused[2]; + uint32_t byte_count; + uint32_t sample_count; + uint32_t unused[2]; }; + struct msm_audio_ion_info { - int fd; - void * vaddr; + int fd; + void *vaddr; }; + struct msm_audio_pmem_info { - int fd; - void * vaddr; + int fd; + void *vaddr; }; + struct msm_audio_aio_buf { - void * buf_addr; - uint32_t buf_len; - uint32_t data_len; - void * private_data; - unsigned short mfield_sz; + void *buf_addr; + uint32_t buf_len; + uint32_t data_len; + void *private_data; + unsigned short mfield_sz; /*only useful for data has meta field */ }; + +/* Audio routing */ + #define SND_IOCTL_MAGIC 's' + #define SND_MUTE_UNMUTED 0 -#define SND_MUTE_MUTED 1 +#define SND_MUTE_MUTED 1 + struct msm_mute_info { - uint32_t mute; - uint32_t path; + uint32_t mute; + uint32_t path; }; + struct msm_vol_info { - uint32_t vol; - uint32_t path; + uint32_t vol; + uint32_t path; }; + struct msm_voicerec_mode { - uint32_t rec_mode; + uint32_t rec_mode; }; + struct msm_snd_device_config { - uint32_t device; - uint32_t ear_mute; - uint32_t mic_mute; + uint32_t device; + uint32_t ear_mute; + uint32_t mic_mute; }; + #define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *) + enum cad_device_path_type { - CAD_DEVICE_PATH_RX, - CAD_DEVICE_PATH_TX, - CAD_DEVICE_PATH_RX_TX, - CAD_DEVICE_PATH_LB, - CAD_DEVICE_PATH_MAX + CAD_DEVICE_PATH_RX, /*For Decoding session*/ + CAD_DEVICE_PATH_TX, /* For Encoding session*/ + CAD_DEVICE_PATH_RX_TX, /* For Voice call */ + CAD_DEVICE_PATH_LB, /* For loopback (FM Analog)*/ + CAD_DEVICE_PATH_MAX }; + struct cad_devices_type { - uint32_t rx_device; - uint32_t tx_device; - enum cad_device_path_type pathtype; + uint32_t rx_device; + uint32_t tx_device; + enum cad_device_path_type pathtype; }; + struct msm_cad_device_config { - struct cad_devices_type device; - uint32_t ear_mute; - uint32_t mic_mute; + struct cad_devices_type device; + uint32_t ear_mute; + uint32_t mic_mute; }; + #define CAD_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_cad_device_config *) + #define SND_METHOD_VOICE 0 #define SND_METHOD_MIDI 4 + struct msm_snd_volume_config { - uint32_t device; - uint32_t method; - uint32_t volume; + uint32_t device; + uint32_t method; + uint32_t volume; }; + #define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *) + struct msm_cad_volume_config { - struct cad_devices_type device; - uint32_t method; - uint32_t volume; + struct cad_devices_type device; + uint32_t method; + uint32_t volume; }; + #define CAD_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_cad_volume_config *) + +/* Returns the number of SND endpoints supported. */ + #define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned int *) + struct msm_snd_endpoint { - int id; - char name[64]; + int id; /* input and output */ + char name[64]; /* output only */ }; + +/* Takes an index between 0 and one less than the number returned by + * SND_GET_NUM_ENDPOINTS, and returns the SND index and name of a + * SND endpoint. On input, the .id field contains the number of the + * endpoint, and on exit it contains the SND index, while .name contains + * the description of the endpoint. + */ + #define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *) + + #define SND_AVC_CTL _IOW(SND_IOCTL_MAGIC, 6, unsigned int *) #define SND_AGC_CTL _IOW(SND_IOCTL_MAGIC, 7, unsigned int *) + +/*return the number of CAD endpoints supported. */ + #define CAD_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned int *) + struct msm_cad_endpoint { - int id; - char name[64]; + int id; /* input and output */ + char name[64]; /* output only */ }; + +/* Takes an index between 0 and one less than the number returned by + * SND_GET_NUM_ENDPOINTS, and returns the CAD index and name of a + * CAD endpoint. On input, the .id field contains the number of the + * endpoint, and on exit it contains the SND index, while .name contains + * the description of the endpoint. + */ + #define CAD_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_cad_endpoint *) + struct msm_audio_pcm_config { - uint32_t pcm_feedback; - uint32_t buffer_count; - uint32_t buffer_size; + uint32_t pcm_feedback; /* 0 - disable > 0 - enable */ + uint32_t buffer_count; /* Number of buffers to allocate */ + uint32_t buffer_size; /* Size of buffer for capturing of + * PCM samples + */ }; + #define AUDIO_EVENT_SUSPEND 0 #define AUDIO_EVENT_RESUME 1 #define AUDIO_EVENT_WRITE_DONE 2 -#define AUDIO_EVENT_READ_DONE 3 +#define AUDIO_EVENT_READ_DONE 3 #define AUDIO_EVENT_STREAM_INFO 4 #define AUDIO_EVENT_BITSTREAM_ERROR_INFO 5 + #define AUDIO_CODEC_TYPE_MP3 0 #define AUDIO_CODEC_TYPE_AAC 1 + struct msm_audio_bitstream_info { - uint32_t codec_type; - uint32_t chan_info; - uint32_t sample_rate; - uint32_t bit_stream_info; - uint32_t bit_rate; - uint32_t unused[3]; + uint32_t codec_type; + uint32_t chan_info; + uint32_t sample_rate; + uint32_t bit_stream_info; + uint32_t bit_rate; + uint32_t unused[3]; }; + struct msm_audio_bitstream_error_info { - uint32_t dec_id; - uint32_t err_msg_indicator; - uint32_t err_type; + uint32_t dec_id; + uint32_t err_msg_indicator; + uint32_t err_type; }; + union msm_audio_event_payload { - struct msm_audio_aio_buf aio_buf; - struct msm_audio_bitstream_info stream_info; - struct msm_audio_bitstream_error_info error_info; - int reserved; + struct msm_audio_aio_buf aio_buf; + struct msm_audio_bitstream_info stream_info; + struct msm_audio_bitstream_error_info error_info; + int reserved; }; + struct msm_audio_event { - int event_type; - int timeout_ms; - union msm_audio_event_payload event_payload; + int event_type; + int timeout_ms; + union msm_audio_event_payload event_payload; }; + #define MSM_SNDDEV_CAP_RX 0x1 #define MSM_SNDDEV_CAP_TX 0x2 #define MSM_SNDDEV_CAP_VOICE 0x4 + struct msm_snd_device_info { - uint32_t dev_id; - uint32_t dev_cap; - char dev_name[64]; + uint32_t dev_id; + uint32_t dev_cap; /* bitmask describe capability of device */ + char dev_name[64]; }; + struct msm_snd_device_list { - uint32_t num_dev; - struct msm_snd_device_info * list; + uint32_t num_dev; /* Indicate number of device info to be retrieved */ + struct msm_snd_device_info *list; }; + struct msm_dtmf_config { - uint16_t path; - uint16_t dtmf_hi; - uint16_t dtmf_low; - uint16_t duration; - uint16_t tx_gain; - uint16_t rx_gain; - uint16_t mixing; + uint16_t path; + uint16_t dtmf_hi; + uint16_t dtmf_low; + uint16_t duration; + uint16_t tx_gain; + uint16_t rx_gain; + uint16_t mixing; }; + #define AUDIO_ROUTE_STREAM_VOICE_RX 0 #define AUDIO_ROUTE_STREAM_VOICE_TX 1 #define AUDIO_ROUTE_STREAM_PLAYBACK 2 -#define AUDIO_ROUTE_STREAM_REC 3 +#define AUDIO_ROUTE_STREAM_REC 3 + struct msm_audio_route_config { - uint32_t stream_type; - uint32_t stream_id; - uint32_t dev_id; + uint32_t stream_type; + uint32_t stream_id; + uint32_t dev_id; }; + #define AUDIO_MAX_EQ_BANDS 12 + struct msm_audio_eq_band { - uint16_t band_idx; - uint32_t filter_type; - uint32_t center_freq_hz; - uint32_t filter_gain; - uint32_t q_factor; -} __attribute__((packed)); + uint16_t band_idx; /* The band index, 0 .. 11 */ + uint32_t filter_type; /* Filter band type */ + uint32_t center_freq_hz; /* Filter band center frequency */ + uint32_t filter_gain; /* Filter band initial gain (dB) */ + /* Range is +12 dB to -12 dB with 1dB increments. */ + uint32_t q_factor; +} __attribute__ ((packed)); + struct msm_audio_eq_stream_config { - uint32_t enable; - uint32_t num_bands; - struct msm_audio_eq_band eq_bands[AUDIO_MAX_EQ_BANDS]; -} __attribute__((packed)); + uint32_t enable; /* Number of consequtive bands specified */ + uint32_t num_bands; + struct msm_audio_eq_band eq_bands[AUDIO_MAX_EQ_BANDS]; +} __attribute__ ((packed)); + struct msm_acdb_cmd_device { - uint32_t command_id; - uint32_t device_id; - uint32_t network_id; - uint32_t sample_rate_id; - uint32_t interface_id; - uint32_t algorithm_block_id; - uint32_t total_bytes; - uint32_t * phys_buf; + uint32_t command_id; + uint32_t device_id; + uint32_t network_id; + uint32_t sample_rate_id; /* Actual sample rate value */ + uint32_t interface_id; /* See interface id's above */ + uint32_t algorithm_block_id; /* See enumerations above */ + uint32_t total_bytes; /* Length in bytes used by buffer */ + uint32_t *phys_buf; /* Physical Address of data */ }; + struct msm_hwacc_data_config { - __u32 buf_size; - __u32 num_buf; - __u32 num_channels; - __u8 channel_map[8]; - __u32 sample_rate; - __u32 bits_per_sample; + __u32 buf_size; + __u32 num_buf; + __u32 num_channels; + __u8 channel_map[8]; + __u32 sample_rate; + __u32 bits_per_sample; }; + struct msm_hwacc_buf_cfg { - __u32 input_len; - __u32 output_len; + __u32 input_len; + __u32 output_len; }; + struct msm_hwacc_buf_avail { - __u32 input_num_avail; - __u32 output_num_avail; + __u32 input_num_avail; + __u32 output_num_avail; }; + struct msm_hwacc_effects_config { - struct msm_hwacc_data_config input; - struct msm_hwacc_data_config output; - struct msm_hwacc_buf_cfg buf_cfg; - __u32 meta_mode_enabled; - __u32 overwrite_topology; - __s32 topology; -}; -#define ADSP_STREAM_PP_EVENT 0 -#define ADSP_STREAM_ENCDEC_EVENT 1 -#define ADSP_STREAM_IEC_61937_FMT_UPDATE_EVENT 2 -#define ADSP_STREAM_EVENT_MAX 3 + struct msm_hwacc_data_config input; + struct msm_hwacc_data_config output; + struct msm_hwacc_buf_cfg buf_cfg; + __u32 meta_mode_enabled; + __u32 overwrite_topology; + __s32 topology; +}; + +#define ADSP_STREAM_PP_EVENT 0 +#define ADSP_STREAM_ENCDEC_EVENT 1 +#define ADSP_STREAM_IEC_61937_FMT_UPDATE_EVENT 2 +#define ADSP_STREAM_EVENT_MAX 3 + struct msm_adsp_event_data { - __u32 event_type; - __u32 payload_len; - __u8 payload[0]; + __u32 event_type; + __u32 payload_len; + __u8 payload[0]; }; -#endif +#endif diff --git a/sdm710/kernel-headers/linux/msm_audio_aac.h b/sdm710/kernel-headers/linux/msm_audio_aac.h index 3e58aa99..8499ac48 100644 --- a/sdm710/kernel-headers/linux/msm_audio_aac.h +++ b/sdm710/kernel-headers/linux/msm_audio_aac.h @@ -1,70 +1,76 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_AAC_H #define _MSM_AUDIO_AAC_H + #include <linux/msm_audio.h> -#define AUDIO_SET_AAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), struct msm_audio_aac_config) -#define AUDIO_GET_AAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), struct msm_audio_aac_config) -#define AUDIO_SET_AAC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 3), struct msm_audio_aac_enc_config) -#define AUDIO_GET_AAC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 4), struct msm_audio_aac_enc_config) -#define AUDIO_SET_AAC_MIX_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 5), uint32_t) -#define AUDIO_AAC_FORMAT_ADTS - 1 -#define AUDIO_AAC_FORMAT_RAW 0x0000 -#define AUDIO_AAC_FORMAT_PSUEDO_RAW 0x0001 -#define AUDIO_AAC_FORMAT_LOAS 0x0002 -#define AUDIO_AAC_FORMAT_ADIF 0x0003 -#define AUDIO_AAC_OBJECT_LC 0x0002 -#define AUDIO_AAC_OBJECT_LTP 0x0004 -#define AUDIO_AAC_OBJECT_ERLC 0x0011 -#define AUDIO_AAC_OBJECT_BSAC 0x0016 -#define AUDIO_AAC_SEC_DATA_RES_ON 0x0001 -#define AUDIO_AAC_SEC_DATA_RES_OFF 0x0000 -#define AUDIO_AAC_SCA_DATA_RES_ON 0x0001 -#define AUDIO_AAC_SCA_DATA_RES_OFF 0x0000 -#define AUDIO_AAC_SPEC_DATA_RES_ON 0x0001 -#define AUDIO_AAC_SPEC_DATA_RES_OFF 0x0000 -#define AUDIO_AAC_SBR_ON_FLAG_ON 0x0001 -#define AUDIO_AAC_SBR_ON_FLAG_OFF 0x0000 -#define AUDIO_AAC_SBR_PS_ON_FLAG_ON 0x0001 -#define AUDIO_AAC_SBR_PS_ON_FLAG_OFF 0x0000 -#define AUDIO_AAC_DUAL_MONO_PL_PR 0 -#define AUDIO_AAC_DUAL_MONO_SL_SR 1 -#define AUDIO_AAC_DUAL_MONO_SL_PR 2 -#define AUDIO_AAC_DUAL_MONO_PL_SR 3 + +#define AUDIO_SET_AAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_aac_config) +#define AUDIO_GET_AAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_aac_config) + +#define AUDIO_SET_AAC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+3), struct msm_audio_aac_enc_config) + +#define AUDIO_GET_AAC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+4), struct msm_audio_aac_enc_config) + +#define AUDIO_SET_AAC_MIX_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+5), uint32_t) + +#define AUDIO_AAC_FORMAT_ADTS -1 +#define AUDIO_AAC_FORMAT_RAW 0x0000 +#define AUDIO_AAC_FORMAT_PSUEDO_RAW 0x0001 +#define AUDIO_AAC_FORMAT_LOAS 0x0002 +#define AUDIO_AAC_FORMAT_ADIF 0x0003 + +#define AUDIO_AAC_OBJECT_LC 0x0002 +#define AUDIO_AAC_OBJECT_LTP 0x0004 +#define AUDIO_AAC_OBJECT_ERLC 0x0011 +#define AUDIO_AAC_OBJECT_BSAC 0x0016 + +#define AUDIO_AAC_SEC_DATA_RES_ON 0x0001 +#define AUDIO_AAC_SEC_DATA_RES_OFF 0x0000 + +#define AUDIO_AAC_SCA_DATA_RES_ON 0x0001 +#define AUDIO_AAC_SCA_DATA_RES_OFF 0x0000 + +#define AUDIO_AAC_SPEC_DATA_RES_ON 0x0001 +#define AUDIO_AAC_SPEC_DATA_RES_OFF 0x0000 + +#define AUDIO_AAC_SBR_ON_FLAG_ON 0x0001 +#define AUDIO_AAC_SBR_ON_FLAG_OFF 0x0000 + +#define AUDIO_AAC_SBR_PS_ON_FLAG_ON 0x0001 +#define AUDIO_AAC_SBR_PS_ON_FLAG_OFF 0x0000 + +/* Primary channel on both left and right channels */ +#define AUDIO_AAC_DUAL_MONO_PL_PR 0 +/* Secondary channel on both left and right channels */ +#define AUDIO_AAC_DUAL_MONO_SL_SR 1 +/* Primary channel on right channel and 2nd on left channel */ +#define AUDIO_AAC_DUAL_MONO_SL_PR 2 +/* 2nd channel on right channel and primary on left channel */ +#define AUDIO_AAC_DUAL_MONO_PL_SR 3 + struct msm_audio_aac_config { - signed short format; - unsigned short audio_object; - unsigned short ep_config; - unsigned short aac_section_data_resilience_flag; - unsigned short aac_scalefactor_data_resilience_flag; - unsigned short aac_spectral_data_resilience_flag; - unsigned short sbr_on_flag; - unsigned short sbr_ps_on_flag; - unsigned short dual_mono_mode; - unsigned short channel_configuration; - unsigned short sample_rate; + signed short format; + unsigned short audio_object; + unsigned short ep_config; /* 0 ~ 3 useful only obj = ERLC */ + unsigned short aac_section_data_resilience_flag; + unsigned short aac_scalefactor_data_resilience_flag; + unsigned short aac_spectral_data_resilience_flag; + unsigned short sbr_on_flag; + unsigned short sbr_ps_on_flag; + unsigned short dual_mono_mode; + unsigned short channel_configuration; + unsigned short sample_rate; }; + struct msm_audio_aac_enc_config { - uint32_t channels; - uint32_t sample_rate; - uint32_t bit_rate; - uint32_t stream_format; + uint32_t channels; + uint32_t sample_rate; + uint32_t bit_rate; + uint32_t stream_format; }; -#endif +#endif /* _MSM_AUDIO_AAC_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_ac3.h b/sdm710/kernel-headers/linux/msm_audio_ac3.h index 7c2a6a79..2203d9e4 100644 --- a/sdm710/kernel-headers/linux/msm_audio_ac3.h +++ b/sdm710/kernel-headers/linux/msm_audio_ac3.h @@ -1,53 +1,41 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_AC3_H #define _MSM_AUDIO_AC3_H + #include <linux/msm_audio.h> -#define AUDIO_SET_AC3_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned int) -#define AUDIO_GET_AC3_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned int) + +#define AUDIO_SET_AC3_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned int) +#define AUDIO_GET_AC3_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned int) + #define AUDAC3_DEF_WORDSIZE 0 #define AUDAC3_DEF_USER_DOWNMIX_FLAG 0x0 #define AUDAC3_DEF_USER_KARAOKE_FLAG 0x0 #define AUDAC3_DEF_ERROR_CONCEALMENT 0 -#define AUDAC3_DEF_MAX_REPEAT_COUNT 0 +#define AUDAC3_DEF_MAX_REPEAT_COUNT 0 + struct msm_audio_ac3_config { - unsigned short numChans; - unsigned short wordSize; - unsigned short kCapableMode; - unsigned short compMode; - unsigned short outLfeOn; - unsigned short outputMode; - unsigned short stereoMode; - unsigned short dualMonoMode; - unsigned short fsCod; - unsigned short pcmScaleFac; - unsigned short dynRngScaleHi; - unsigned short dynRngScaleLow; - unsigned short user_downmix_flag; - unsigned short user_karaoke_flag; - unsigned short dm_address_high; - unsigned short dm_address_low; - unsigned short ko_address_high; - unsigned short ko_address_low; - unsigned short error_concealment; - unsigned short max_rep_count; - unsigned short channel_routing_mode[6]; + unsigned short numChans; + unsigned short wordSize; + unsigned short kCapableMode; + unsigned short compMode; + unsigned short outLfeOn; + unsigned short outputMode; + unsigned short stereoMode; + unsigned short dualMonoMode; + unsigned short fsCod; + unsigned short pcmScaleFac; + unsigned short dynRngScaleHi; + unsigned short dynRngScaleLow; + unsigned short user_downmix_flag; + unsigned short user_karaoke_flag; + unsigned short dm_address_high; + unsigned short dm_address_low; + unsigned short ko_address_high; + unsigned short ko_address_low; + unsigned short error_concealment; + unsigned short max_rep_count; + unsigned short channel_routing_mode[6]; }; -#endif +#endif /* _MSM_AUDIO_AC3_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_alac.h b/sdm710/kernel-headers/linux/msm_audio_alac.h index b0b83009..36b96567 100644 --- a/sdm710/kernel-headers/linux/msm_audio_alac.h +++ b/sdm710/kernel-headers/linux/msm_audio_alac.h @@ -1,38 +1,24 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_ALAC_H #define _MSM_AUDIO_ALAC_H -#define AUDIO_GET_ALAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), struct msm_audio_alac_config) -#define AUDIO_SET_ALAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), struct msm_audio_alac_config) + +#define AUDIO_GET_ALAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_alac_config) +#define AUDIO_SET_ALAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_alac_config) + struct msm_audio_alac_config { - uint32_t frameLength; - uint8_t compatVersion; - uint8_t bitDepth; - uint8_t pb; - uint8_t mb; - uint8_t kb; - uint8_t channelCount; - uint16_t maxRun; - uint32_t maxSize; - uint32_t averageBitRate; - uint32_t sampleRate; - uint32_t channelLayout; + uint32_t frameLength; + uint8_t compatVersion; + uint8_t bitDepth; + uint8_t pb; /* currently unused */ + uint8_t mb; /* currently unused */ + uint8_t kb; /* currently unused */ + uint8_t channelCount; + uint16_t maxRun; /* currently unused */ + uint32_t maxSize; + uint32_t averageBitRate; + uint32_t sampleRate; + uint32_t channelLayout; }; -#endif +#endif /* _MSM_AUDIO_ALAC_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_amrnb.h b/sdm710/kernel-headers/linux/msm_audio_amrnb.h index bfdd3e85..04099835 100644 --- a/sdm710/kernel-headers/linux/msm_audio_amrnb.h +++ b/sdm710/kernel-headers/linux/msm_audio_amrnb.h @@ -1,41 +1,34 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_AMRNB_H #define _MSM_AUDIO_AMRNB_H + #include <linux/msm_audio.h> -#define AUDIO_GET_AMRNB_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned int) -#define AUDIO_SET_AMRNB_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned int) -#define AUDIO_GET_AMRNB_ENC_CONFIG_V2 _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 2), struct msm_audio_amrnb_enc_config_v2) -#define AUDIO_SET_AMRNB_ENC_CONFIG_V2 _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 3), struct msm_audio_amrnb_enc_config_v2) + +#define AUDIO_GET_AMRNB_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned int) +#define AUDIO_SET_AMRNB_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned int) +#define AUDIO_GET_AMRNB_ENC_CONFIG_V2 _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+2), \ + struct msm_audio_amrnb_enc_config_v2) +#define AUDIO_SET_AMRNB_ENC_CONFIG_V2 _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+3), \ + struct msm_audio_amrnb_enc_config_v2) + struct msm_audio_amrnb_enc_config { - unsigned short voicememoencweight1; - unsigned short voicememoencweight2; - unsigned short voicememoencweight3; - unsigned short voicememoencweight4; - unsigned short dtx_mode_enable; - unsigned short test_mode_enable; - unsigned short enc_mode; + unsigned short voicememoencweight1; + unsigned short voicememoencweight2; + unsigned short voicememoencweight3; + unsigned short voicememoencweight4; + unsigned short dtx_mode_enable; /* 0xFFFF - enable, 0- disable */ + unsigned short test_mode_enable; /* 0xFFFF - enable, 0- disable */ + unsigned short enc_mode; /* 0-MR475,1-MR515,2-MR59,3-MR67,4-MR74 + * 5-MR795, 6- MR102, 7- MR122(default) + */ }; + struct msm_audio_amrnb_enc_config_v2 { - uint32_t band_mode; - uint32_t dtx_enable; - uint32_t frame_format; + uint32_t band_mode; + uint32_t dtx_enable; + uint32_t frame_format; }; -#endif - +#endif /* _MSM_AUDIO_AMRNB_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_amrwb.h b/sdm710/kernel-headers/linux/msm_audio_amrwb.h index d034961a..0d55397d 100644 --- a/sdm710/kernel-headers/linux/msm_audio_amrwb.h +++ b/sdm710/kernel-headers/linux/msm_audio_amrwb.h @@ -1,30 +1,18 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_AMRWB_H #define _MSM_AUDIO_AMRWB_H + #include <linux/msm_audio.h> -#define AUDIO_GET_AMRWB_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), struct msm_audio_amrwb_enc_config) -#define AUDIO_SET_AMRWB_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), struct msm_audio_amrwb_enc_config) + +#define AUDIO_GET_AMRWB_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), \ + struct msm_audio_amrwb_enc_config) +#define AUDIO_SET_AMRWB_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), \ + struct msm_audio_amrwb_enc_config) + struct msm_audio_amrwb_enc_config { - uint32_t band_mode; - uint32_t dtx_enable; - uint32_t frame_format; + uint32_t band_mode; + uint32_t dtx_enable; + uint32_t frame_format; }; -#endif - +#endif /* _MSM_AUDIO_AMRWB_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_amrwbplus.h b/sdm710/kernel-headers/linux/msm_audio_amrwbplus.h index bfb4d8b9..5b8a980a 100644 --- a/sdm710/kernel-headers/linux/msm_audio_amrwbplus.h +++ b/sdm710/kernel-headers/linux/msm_audio_amrwbplus.h @@ -1,33 +1,18 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_AMR_WB_PLUS_H #define _MSM_AUDIO_AMR_WB_PLUS_H -#define AUDIO_GET_AMRWBPLUS_CONFIG_V2 _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 2), struct msm_audio_amrwbplus_config_v2) -#define AUDIO_SET_AMRWBPLUS_CONFIG_V2 _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 3), struct msm_audio_amrwbplus_config_v2) + +#define AUDIO_GET_AMRWBPLUS_CONFIG_V2 _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+2), struct msm_audio_amrwbplus_config_v2) +#define AUDIO_SET_AMRWBPLUS_CONFIG_V2 _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+3), struct msm_audio_amrwbplus_config_v2) + struct msm_audio_amrwbplus_config_v2 { - unsigned int size_bytes; - unsigned int version; - unsigned int num_channels; - unsigned int amr_band_mode; - unsigned int amr_dtx_mode; - unsigned int amr_frame_fmt; - unsigned int amr_lsf_idx; + unsigned int size_bytes; + unsigned int version; + unsigned int num_channels; + unsigned int amr_band_mode; + unsigned int amr_dtx_mode; + unsigned int amr_frame_fmt; + unsigned int amr_lsf_idx; }; -#endif - +#endif /* _MSM_AUDIO_AMR_WB_PLUS_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_ape.h b/sdm710/kernel-headers/linux/msm_audio_ape.h index a2e8ea19..b14f6852 100644 --- a/sdm710/kernel-headers/linux/msm_audio_ape.h +++ b/sdm710/kernel-headers/linux/msm_audio_ape.h @@ -1,36 +1,26 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ +/* The following structure has been taken + * from Monkey's Audio SDK with permission + */ + #ifndef _MSM_AUDIO_APE_H #define _MSM_AUDIO_APE_H -#define AUDIO_GET_APE_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), struct msm_audio_ape_config) -#define AUDIO_SET_APE_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), struct msm_audio_ape_config) + +#define AUDIO_GET_APE_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_ape_config) +#define AUDIO_SET_APE_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_ape_config) + struct msm_audio_ape_config { - uint16_t compatibleVersion; - uint16_t compressionLevel; - uint32_t formatFlags; - uint32_t blocksPerFrame; - uint32_t finalFrameBlocks; - uint32_t totalFrames; - uint16_t bitsPerSample; - uint16_t numChannels; - uint32_t sampleRate; - uint32_t seekTablePresent; + uint16_t compatibleVersion; + uint16_t compressionLevel; + uint32_t formatFlags; + uint32_t blocksPerFrame; + uint32_t finalFrameBlocks; + uint32_t totalFrames; + uint16_t bitsPerSample; + uint16_t numChannels; + uint32_t sampleRate; + uint32_t seekTablePresent; }; -#endif +#endif /* _MSM_AUDIO_APE_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_calibration.h b/sdm710/kernel-headers/linux/msm_audio_calibration.h index 5ec1c8a2..42800d7b 100644 --- a/sdm710/kernel-headers/linux/msm_audio_calibration.h +++ b/sdm710/kernel-headers/linux/msm_audio_calibration.h @@ -1,583 +1,742 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_CALIBRATION_H #define _MSM_AUDIO_CALIBRATION_H + #include <linux/types.h> #include <linux/ioctl.h> + #define CAL_IOCTL_MAGIC 'a' -#define AUDIO_ALLOCATE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, 200, void *) -#define AUDIO_DEALLOCATE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, 201, void *) -#define AUDIO_PREPARE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, 202, void *) -#define AUDIO_SET_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, 203, void *) -#define AUDIO_GET_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, 204, void *) -#define AUDIO_POST_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, 205, void *) -#define AUDIO_GET_RTAC_ADM_INFO _IOR(CAL_IOCTL_MAGIC, 207, void *) -#define AUDIO_GET_RTAC_VOICE_INFO _IOR(CAL_IOCTL_MAGIC, 208, void *) -#define AUDIO_GET_RTAC_ADM_CAL _IOWR(CAL_IOCTL_MAGIC, 209, void *) -#define AUDIO_SET_RTAC_ADM_CAL _IOWR(CAL_IOCTL_MAGIC, 210, void *) -#define AUDIO_GET_RTAC_ASM_CAL _IOWR(CAL_IOCTL_MAGIC, 211, void *) -#define AUDIO_SET_RTAC_ASM_CAL _IOWR(CAL_IOCTL_MAGIC, 212, void *) -#define AUDIO_GET_RTAC_CVS_CAL _IOWR(CAL_IOCTL_MAGIC, 213, void *) -#define AUDIO_SET_RTAC_CVS_CAL _IOWR(CAL_IOCTL_MAGIC, 214, void *) -#define AUDIO_GET_RTAC_CVP_CAL _IOWR(CAL_IOCTL_MAGIC, 215, void *) -#define AUDIO_SET_RTAC_CVP_CAL _IOWR(CAL_IOCTL_MAGIC, 216, void *) -#define AUDIO_GET_RTAC_AFE_CAL _IOWR(CAL_IOCTL_MAGIC, 217, void *) -#define AUDIO_SET_RTAC_AFE_CAL _IOWR(CAL_IOCTL_MAGIC, 218, void *) + +#define AUDIO_ALLOCATE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \ + 200, void *) +#define AUDIO_DEALLOCATE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \ + 201, void *) +#define AUDIO_PREPARE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \ + 202, void *) +#define AUDIO_SET_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \ + 203, void *) +#define AUDIO_GET_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \ + 204, void *) +#define AUDIO_POST_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \ + 205, void *) + +/* For Real-Time Audio Calibration */ +#define AUDIO_GET_RTAC_ADM_INFO _IOR(CAL_IOCTL_MAGIC, \ + 207, void *) +#define AUDIO_GET_RTAC_VOICE_INFO _IOR(CAL_IOCTL_MAGIC, \ + 208, void *) +#define AUDIO_GET_RTAC_ADM_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 209, void *) +#define AUDIO_SET_RTAC_ADM_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 210, void *) +#define AUDIO_GET_RTAC_ASM_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 211, void *) +#define AUDIO_SET_RTAC_ASM_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 212, void *) +#define AUDIO_GET_RTAC_CVS_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 213, void *) +#define AUDIO_SET_RTAC_CVS_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 214, void *) +#define AUDIO_GET_RTAC_CVP_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 215, void *) +#define AUDIO_SET_RTAC_CVP_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 216, void *) +#define AUDIO_GET_RTAC_AFE_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 217, void *) +#define AUDIO_SET_RTAC_AFE_CAL _IOWR(CAL_IOCTL_MAGIC, \ + 218, void *) enum { - CVP_VOC_RX_TOPOLOGY_CAL_TYPE = 0, - CVP_VOC_TX_TOPOLOGY_CAL_TYPE, - CVP_VOCPROC_STATIC_CAL_TYPE, - CVP_VOCPROC_DYNAMIC_CAL_TYPE, - CVS_VOCSTRM_STATIC_CAL_TYPE, - CVP_VOCDEV_CFG_CAL_TYPE, - CVP_VOCPROC_STATIC_COL_CAL_TYPE, - CVP_VOCPROC_DYNAMIC_COL_CAL_TYPE, - CVS_VOCSTRM_STATIC_COL_CAL_TYPE, - ADM_TOPOLOGY_CAL_TYPE, - ADM_CUST_TOPOLOGY_CAL_TYPE, - ADM_AUDPROC_CAL_TYPE, - ADM_AUDVOL_CAL_TYPE, - ASM_TOPOLOGY_CAL_TYPE, - ASM_CUST_TOPOLOGY_CAL_TYPE, - ASM_AUDSTRM_CAL_TYPE, - AFE_COMMON_RX_CAL_TYPE, - AFE_COMMON_TX_CAL_TYPE, - AFE_ANC_CAL_TYPE, - AFE_AANC_CAL_TYPE, - AFE_FB_SPKR_PROT_CAL_TYPE, - AFE_HW_DELAY_CAL_TYPE, - AFE_SIDETONE_CAL_TYPE, - AFE_TOPOLOGY_CAL_TYPE, - AFE_CUST_TOPOLOGY_CAL_TYPE, - LSM_CUST_TOPOLOGY_CAL_TYPE, - LSM_TOPOLOGY_CAL_TYPE, - LSM_CAL_TYPE, - ADM_RTAC_INFO_CAL_TYPE, - VOICE_RTAC_INFO_CAL_TYPE, - ADM_RTAC_APR_CAL_TYPE, - ASM_RTAC_APR_CAL_TYPE, - VOICE_RTAC_APR_CAL_TYPE, - MAD_CAL_TYPE, - ULP_AFE_CAL_TYPE, - ULP_LSM_CAL_TYPE, - DTS_EAGLE_CAL_TYPE, - AUDIO_CORE_METAINFO_CAL_TYPE, - SRS_TRUMEDIA_CAL_TYPE, - CORE_CUSTOM_TOPOLOGIES_CAL_TYPE, - ADM_RTAC_AUDVOL_CAL_TYPE, - ULP_LSM_TOPOLOGY_ID_CAL_TYPE, - AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE, - AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE, - AFE_SIDETONE_IIR_CAL_TYPE, - AFE_LSM_TOPOLOGY_CAL_TYPE, - AFE_LSM_TX_CAL_TYPE, - ADM_LSM_TOPOLOGY_CAL_TYPE, - ADM_LSM_AUDPROC_CAL_TYPE, - MAX_CAL_TYPES, + CVP_VOC_RX_TOPOLOGY_CAL_TYPE = 0, + CVP_VOC_TX_TOPOLOGY_CAL_TYPE, + CVP_VOCPROC_STATIC_CAL_TYPE, + CVP_VOCPROC_DYNAMIC_CAL_TYPE, + CVS_VOCSTRM_STATIC_CAL_TYPE, + CVP_VOCDEV_CFG_CAL_TYPE, + CVP_VOCPROC_STATIC_COL_CAL_TYPE, + CVP_VOCPROC_DYNAMIC_COL_CAL_TYPE, + CVS_VOCSTRM_STATIC_COL_CAL_TYPE, + + ADM_TOPOLOGY_CAL_TYPE, + ADM_CUST_TOPOLOGY_CAL_TYPE, + ADM_AUDPROC_CAL_TYPE, + ADM_AUDVOL_CAL_TYPE, + + ASM_TOPOLOGY_CAL_TYPE, + ASM_CUST_TOPOLOGY_CAL_TYPE, + ASM_AUDSTRM_CAL_TYPE, + + AFE_COMMON_RX_CAL_TYPE, + AFE_COMMON_TX_CAL_TYPE, + AFE_ANC_CAL_TYPE, + AFE_AANC_CAL_TYPE, + AFE_FB_SPKR_PROT_CAL_TYPE, + AFE_HW_DELAY_CAL_TYPE, + AFE_SIDETONE_CAL_TYPE, + AFE_TOPOLOGY_CAL_TYPE, + AFE_CUST_TOPOLOGY_CAL_TYPE, + + LSM_CUST_TOPOLOGY_CAL_TYPE, + LSM_TOPOLOGY_CAL_TYPE, + LSM_CAL_TYPE, + + ADM_RTAC_INFO_CAL_TYPE, + VOICE_RTAC_INFO_CAL_TYPE, + ADM_RTAC_APR_CAL_TYPE, + ASM_RTAC_APR_CAL_TYPE, + VOICE_RTAC_APR_CAL_TYPE, + + MAD_CAL_TYPE, + ULP_AFE_CAL_TYPE, + ULP_LSM_CAL_TYPE, + + DTS_EAGLE_CAL_TYPE, + AUDIO_CORE_METAINFO_CAL_TYPE, + SRS_TRUMEDIA_CAL_TYPE, + + CORE_CUSTOM_TOPOLOGIES_CAL_TYPE, + ADM_RTAC_AUDVOL_CAL_TYPE, + + ULP_LSM_TOPOLOGY_ID_CAL_TYPE, + AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE, + AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE, + AFE_SIDETONE_IIR_CAL_TYPE, + AFE_LSM_TOPOLOGY_CAL_TYPE, + AFE_LSM_TX_CAL_TYPE, + ADM_LSM_TOPOLOGY_CAL_TYPE, + ADM_LSM_AUDPROC_CAL_TYPE, + MAX_CAL_TYPES, }; + #define AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE #define AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE + #define AFE_SIDETONE_IIR_CAL_TYPE AFE_SIDETONE_IIR_CAL_TYPE + #define AFE_LSM_TOPOLOGY_CAL_TYPE AFE_LSM_TOPOLOGY_CAL_TYPE #define AFE_LSM_TX_CAL_TYPE AFE_LSM_TX_CAL_TYPE #define ADM_LSM_TOPOLOGY_CAL_TYPE ADM_LSM_TOPOLOGY_CAL_TYPE #define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE #define LSM_CAL_TYPES + #define TOPOLOGY_SPECIFIC_CHANNEL_INFO #define MSM_SPKR_PROT_SPV3 + enum { - VERSION_0_0, + VERSION_0_0, }; + enum { - PER_VOCODER_CAL_BIT_MASK = 0x10000, + PER_VOCODER_CAL_BIT_MASK = 0x10000, }; -#define MAX_IOCTL_CMD_SIZE 512 + +#define MAX_IOCTL_CMD_SIZE 512 + +/* common structures */ + struct audio_cal_header { - int32_t data_size; - int32_t version; - int32_t cal_type; - int32_t cal_type_size; + int32_t data_size; + int32_t version; + int32_t cal_type; + int32_t cal_type_size; }; + struct audio_cal_type_header { - int32_t version; - int32_t buffer_number; + int32_t version; + int32_t buffer_number; }; + struct audio_cal_data { - int32_t cal_size; - int32_t mem_handle; + /* Size of cal data at mem_handle allocation or at vaddr */ + int32_t cal_size; + /* If mem_handle if shared memory is used*/ + int32_t mem_handle; + /* size of virtual memory if shared memory not used */ }; + + +/* AUDIO_ALLOCATE_CALIBRATION */ struct audio_cal_type_alloc { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; }; + struct audio_cal_alloc { - struct audio_cal_header hdr; - struct audio_cal_type_alloc cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_alloc cal_type; }; + + +/* AUDIO_DEALLOCATE_CALIBRATION */ struct audio_cal_type_dealloc { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; }; + struct audio_cal_dealloc { - struct audio_cal_header hdr; - struct audio_cal_type_dealloc cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_dealloc cal_type; }; + + +/* AUDIO_PREPARE_CALIBRATION */ struct audio_cal_type_prepare { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; }; + struct audio_cal_prepare { - struct audio_cal_header hdr; - struct audio_cal_type_prepare cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_prepare cal_type; }; + + +/* AUDIO_POST_CALIBRATION */ struct audio_cal_type_post { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; }; + struct audio_cal_post { - struct audio_cal_header hdr; - struct audio_cal_type_post cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_post cal_type; }; + +/*AUDIO_CORE_META_INFO */ + struct audio_cal_info_metainfo { - uint32_t nKey; + uint32_t nKey; }; + +/* Cal info types */ enum { - RX_DEVICE, - TX_DEVICE, - MAX_PATH_TYPE + RX_DEVICE, + TX_DEVICE, + MAX_PATH_TYPE }; + struct audio_cal_info_adm_top { - int32_t topology; - int32_t acdb_id; - int32_t path; - int32_t app_type; - int32_t sample_rate; + int32_t topology; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t app_type; + int32_t sample_rate; }; + struct audio_cal_info_audproc { - int32_t acdb_id; - int32_t path; - int32_t app_type; - int32_t sample_rate; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t app_type; + int32_t sample_rate; }; + struct audio_cal_info_audvol { - int32_t acdb_id; - int32_t path; - int32_t app_type; - int32_t vol_index; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t app_type; + int32_t vol_index; }; + struct audio_cal_info_afe { - int32_t acdb_id; - int32_t path; - int32_t sample_rate; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t sample_rate; }; + struct audio_cal_info_afe_top { - int32_t topology; - int32_t acdb_id; - int32_t path; - int32_t sample_rate; + int32_t topology; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t sample_rate; }; + struct audio_cal_info_asm_top { - int32_t topology; - int32_t app_type; + int32_t topology; + int32_t app_type; }; + struct audio_cal_info_audstrm { - int32_t app_type; + int32_t app_type; }; + struct audio_cal_info_aanc { - int32_t acdb_id; + int32_t acdb_id; }; -#define MAX_HW_DELAY_ENTRIES 25 + +#define MAX_HW_DELAY_ENTRIES 25 + struct audio_cal_hw_delay_entry { - uint32_t sample_rate; - uint32_t delay_usec; + uint32_t sample_rate; + uint32_t delay_usec; }; + struct audio_cal_hw_delay_data { - uint32_t num_entries; - struct audio_cal_hw_delay_entry entry[MAX_HW_DELAY_ENTRIES]; + uint32_t num_entries; + struct audio_cal_hw_delay_entry entry[MAX_HW_DELAY_ENTRIES]; }; + struct audio_cal_info_hw_delay { - int32_t acdb_id; - int32_t path; - int32_t property_type; - struct audio_cal_hw_delay_data data; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t property_type; + struct audio_cal_hw_delay_data data; }; + enum msm_spkr_prot_states { - MSM_SPKR_PROT_CALIBRATED, - MSM_SPKR_PROT_CALIBRATION_IN_PROGRESS, - MSM_SPKR_PROT_DISABLED, - MSM_SPKR_PROT_NOT_CALIBRATED, - MSM_SPKR_PROT_PRE_CALIBRATED, - MSM_SPKR_PROT_IN_FTM_MODE + MSM_SPKR_PROT_CALIBRATED, + MSM_SPKR_PROT_CALIBRATION_IN_PROGRESS, + MSM_SPKR_PROT_DISABLED, + MSM_SPKR_PROT_NOT_CALIBRATED, + MSM_SPKR_PROT_PRE_CALIBRATED, + MSM_SPKR_PROT_IN_FTM_MODE }; #define MSM_SPKR_PROT_IN_FTM_MODE MSM_SPKR_PROT_IN_FTM_MODE + enum msm_spkr_count { - SP_V2_SPKR_1, - SP_V2_SPKR_2, - SP_V2_NUM_MAX_SPKRS + SP_V2_SPKR_1, + SP_V2_SPKR_2, + SP_V2_NUM_MAX_SPKRS }; + struct audio_cal_info_spk_prot_cfg { - int32_t r0[SP_V2_NUM_MAX_SPKRS]; - int32_t t0[SP_V2_NUM_MAX_SPKRS]; - uint32_t quick_calib_flag; - uint32_t mode; + int32_t r0[SP_V2_NUM_MAX_SPKRS]; + int32_t t0[SP_V2_NUM_MAX_SPKRS]; + uint32_t quick_calib_flag; + uint32_t mode; + /* + * 0 - Start spk prot + * 1 - Start calib + * 2 - Disable spk prot + */ #ifdef MSM_SPKR_PROT_SPV3 - uint32_t sp_version; - int32_t limiter_th[SP_V2_NUM_MAX_SPKRS]; + uint32_t sp_version; + int32_t limiter_th[SP_V2_NUM_MAX_SPKRS]; #endif }; + struct audio_cal_info_sp_th_vi_ftm_cfg { - uint32_t wait_time[SP_V2_NUM_MAX_SPKRS]; - uint32_t ftm_time[SP_V2_NUM_MAX_SPKRS]; - uint32_t mode; + uint32_t wait_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t ftm_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t mode; + /* + * 0 - normal running mode + * 1 - Calibration + * 2 - FTM mode + */ }; + struct audio_cal_info_sp_ex_vi_ftm_cfg { - uint32_t wait_time[SP_V2_NUM_MAX_SPKRS]; - uint32_t ftm_time[SP_V2_NUM_MAX_SPKRS]; - uint32_t mode; + uint32_t wait_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t ftm_time[SP_V2_NUM_MAX_SPKRS]; + uint32_t mode; + /* + * 0 - normal running mode + * 2 - FTM mode + */ }; + struct audio_cal_info_sp_ex_vi_param { - int32_t freq_q20[SP_V2_NUM_MAX_SPKRS]; - int32_t resis_q24[SP_V2_NUM_MAX_SPKRS]; - int32_t qmct_q24[SP_V2_NUM_MAX_SPKRS]; - int32_t status[SP_V2_NUM_MAX_SPKRS]; + int32_t freq_q20[SP_V2_NUM_MAX_SPKRS]; + int32_t resis_q24[SP_V2_NUM_MAX_SPKRS]; + int32_t qmct_q24[SP_V2_NUM_MAX_SPKRS]; + int32_t status[SP_V2_NUM_MAX_SPKRS]; }; + struct audio_cal_info_sp_th_vi_param { - int32_t r_dc_q24[SP_V2_NUM_MAX_SPKRS]; - int32_t temp_q22[SP_V2_NUM_MAX_SPKRS]; - int32_t status[SP_V2_NUM_MAX_SPKRS]; + int32_t r_dc_q24[SP_V2_NUM_MAX_SPKRS]; + int32_t temp_q22[SP_V2_NUM_MAX_SPKRS]; + int32_t status[SP_V2_NUM_MAX_SPKRS]; }; + struct audio_cal_info_msm_spk_prot_status { - int32_t r0[SP_V2_NUM_MAX_SPKRS]; - int32_t status; + int32_t r0[SP_V2_NUM_MAX_SPKRS]; + int32_t status; }; + struct audio_cal_info_sidetone { - uint16_t enable; - uint16_t gain; - int32_t tx_acdb_id; - int32_t rx_acdb_id; - int32_t mid; - int32_t pid; -}; -#define MAX_SIDETONE_IIR_DATA_SIZE 224 -#define MAX_NO_IIR_FILTER_STAGE 10 + uint16_t enable; + uint16_t gain; + int32_t tx_acdb_id; + int32_t rx_acdb_id; + int32_t mid; + int32_t pid; +}; + +#define MAX_SIDETONE_IIR_DATA_SIZE 224 +#define MAX_NO_IIR_FILTER_STAGE 10 + struct audio_cal_info_sidetone_iir { - uint16_t iir_enable; - uint16_t num_biquad_stages; - uint16_t pregain; - int32_t tx_acdb_id; - int32_t rx_acdb_id; - int32_t mid; - int32_t pid; - uint8_t iir_config[MAX_SIDETONE_IIR_DATA_SIZE]; + uint16_t iir_enable; + uint16_t num_biquad_stages; + uint16_t pregain; + int32_t tx_acdb_id; + int32_t rx_acdb_id; + int32_t mid; + int32_t pid; + uint8_t iir_config[MAX_SIDETONE_IIR_DATA_SIZE]; }; struct audio_cal_info_lsm_top { - int32_t topology; - int32_t acdb_id; - int32_t app_type; + int32_t topology; + int32_t acdb_id; + int32_t app_type; }; + + struct audio_cal_info_lsm { - int32_t acdb_id; - int32_t path; - int32_t app_type; + int32_t acdb_id; + /* RX_DEVICE or TX_DEVICE */ + int32_t path; + int32_t app_type; }; -#define VSS_NUM_CHANNELS_MAX 8 + +#define VSS_NUM_CHANNELS_MAX 8 + struct audio_cal_info_voc_top { - int32_t topology; - int32_t acdb_id; + int32_t topology; + int32_t acdb_id; #ifdef TOPOLOGY_SPECIFIC_CHANNEL_INFO - uint32_t num_channels; - uint8_t channel_mapping[VSS_NUM_CHANNELS_MAX]; + uint32_t num_channels; + uint8_t channel_mapping[VSS_NUM_CHANNELS_MAX]; #endif }; + struct audio_cal_info_vocproc { - int32_t tx_acdb_id; - int32_t rx_acdb_id; - int32_t tx_sample_rate; - int32_t rx_sample_rate; + int32_t tx_acdb_id; + int32_t rx_acdb_id; + int32_t tx_sample_rate; + int32_t rx_sample_rate; }; + enum { - DEFAULT_FEATURE_SET, - VOL_BOOST_FEATURE_SET, + DEFAULT_FEATURE_SET, + VOL_BOOST_FEATURE_SET, }; + struct audio_cal_info_vocvol { - int32_t tx_acdb_id; - int32_t rx_acdb_id; - int32_t feature_set; + int32_t tx_acdb_id; + int32_t rx_acdb_id; + /* DEFAULT_ or VOL_BOOST_FEATURE_SET */ + int32_t feature_set; }; + struct audio_cal_info_vocdev_cfg { - int32_t tx_acdb_id; - int32_t rx_acdb_id; + int32_t tx_acdb_id; + int32_t rx_acdb_id; }; -#define MAX_VOICE_COLUMNS 20 + +#define MAX_VOICE_COLUMNS 20 + union audio_cal_col_na { - uint8_t val8; - uint16_t val16; - uint32_t val32; - uint64_t val64; + uint8_t val8; + uint16_t val16; + uint32_t val32; + uint64_t val64; } __attribute__((packed)); + struct audio_cal_col { - uint32_t id; - uint32_t type; - union audio_cal_col_na na_value; + uint32_t id; + uint32_t type; + union audio_cal_col_na na_value; } __attribute__((packed)); + struct audio_cal_col_data { - uint32_t num_columns; - struct audio_cal_col column[MAX_VOICE_COLUMNS]; + uint32_t num_columns; + struct audio_cal_col column[MAX_VOICE_COLUMNS]; } __attribute__((packed)); + struct audio_cal_info_voc_col { - int32_t table_id; - int32_t tx_acdb_id; - int32_t rx_acdb_id; - struct audio_cal_col_data data; + int32_t table_id; + int32_t tx_acdb_id; + int32_t rx_acdb_id; + struct audio_cal_col_data data; }; + +/* AUDIO_SET_CALIBRATION & */ struct audio_cal_type_basic { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; }; + struct audio_cal_basic { - struct audio_cal_header hdr; - struct audio_cal_type_basic cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_basic cal_type; }; + struct audio_cal_type_adm_top { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_adm_top cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_adm_top cal_info; }; + struct audio_cal_adm_top { - struct audio_cal_header hdr; - struct audio_cal_type_adm_top cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_adm_top cal_type; }; + struct audio_cal_type_metainfo { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_metainfo cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_metainfo cal_info; }; + struct audio_core_metainfo { - struct audio_cal_header hdr; - struct audio_cal_type_metainfo cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_metainfo cal_type; }; + struct audio_cal_type_audproc { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_audproc cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_audproc cal_info; }; + struct audio_cal_audproc { - struct audio_cal_header hdr; - struct audio_cal_type_audproc cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_audproc cal_type; }; + struct audio_cal_type_audvol { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_audvol cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_audvol cal_info; }; + struct audio_cal_audvol { - struct audio_cal_header hdr; - struct audio_cal_type_audvol cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_audvol cal_type; }; + struct audio_cal_type_asm_top { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_asm_top cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_asm_top cal_info; }; + struct audio_cal_asm_top { - struct audio_cal_header hdr; - struct audio_cal_type_asm_top cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_asm_top cal_type; }; + struct audio_cal_type_audstrm { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_audstrm cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_audstrm cal_info; }; + struct audio_cal_audstrm { - struct audio_cal_header hdr; - struct audio_cal_type_audstrm cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_audstrm cal_type; }; + struct audio_cal_type_afe { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_afe cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_afe cal_info; }; + struct audio_cal_afe { - struct audio_cal_header hdr; - struct audio_cal_type_afe cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_afe cal_type; }; + struct audio_cal_type_afe_top { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_afe_top cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_afe_top cal_info; }; + struct audio_cal_afe_top { - struct audio_cal_header hdr; - struct audio_cal_type_afe_top cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_afe_top cal_type; }; + struct audio_cal_type_aanc { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_aanc cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_aanc cal_info; }; + struct audio_cal_aanc { - struct audio_cal_header hdr; - struct audio_cal_type_aanc cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_aanc cal_type; }; + struct audio_cal_type_fb_spk_prot_cfg { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_spk_prot_cfg cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_spk_prot_cfg cal_info; }; + struct audio_cal_fb_spk_prot_cfg { - struct audio_cal_header hdr; - struct audio_cal_type_fb_spk_prot_cfg cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_fb_spk_prot_cfg cal_type; }; + struct audio_cal_type_sp_th_vi_ftm_cfg { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_sp_th_vi_ftm_cfg cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_th_vi_ftm_cfg cal_info; }; + struct audio_cal_sp_th_vi_ftm_cfg { - struct audio_cal_header hdr; - struct audio_cal_type_sp_th_vi_ftm_cfg cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_sp_th_vi_ftm_cfg cal_type; }; + struct audio_cal_type_sp_ex_vi_ftm_cfg { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_sp_ex_vi_ftm_cfg cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_ex_vi_ftm_cfg cal_info; }; + struct audio_cal_sp_ex_vi_ftm_cfg { - struct audio_cal_header hdr; - struct audio_cal_type_sp_ex_vi_ftm_cfg cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_sp_ex_vi_ftm_cfg cal_type; }; struct audio_cal_type_hw_delay { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_hw_delay cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_hw_delay cal_info; }; + struct audio_cal_hw_delay { - struct audio_cal_header hdr; - struct audio_cal_type_hw_delay cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_hw_delay cal_type; }; + struct audio_cal_type_sidetone { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_sidetone cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sidetone cal_info; }; + struct audio_cal_sidetone { - struct audio_cal_header hdr; - struct audio_cal_type_sidetone cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_sidetone cal_type; }; + struct audio_cal_type_sidetone_iir { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_sidetone_iir cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sidetone_iir cal_info; }; + struct audio_cal_sidetone_iir { - struct audio_cal_header hdr; - struct audio_cal_type_sidetone_iir cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_sidetone_iir cal_type; }; + struct audio_cal_type_lsm_top { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_lsm_top cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_lsm_top cal_info; }; + struct audio_cal_lsm_top { - struct audio_cal_header hdr; - struct audio_cal_type_lsm_top cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_lsm_top cal_type; }; + struct audio_cal_type_lsm { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_lsm cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_lsm cal_info; }; + struct audio_cal_lsm { - struct audio_cal_header hdr; - struct audio_cal_type_lsm cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_lsm cal_type; }; + struct audio_cal_type_voc_top { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_voc_top cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_voc_top cal_info; }; + struct audio_cal_voc_top { - struct audio_cal_header hdr; - struct audio_cal_type_voc_top cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_voc_top cal_type; }; + struct audio_cal_type_vocproc { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_vocproc cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_vocproc cal_info; }; + struct audio_cal_vocproc { - struct audio_cal_header hdr; - struct audio_cal_type_vocproc cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_vocproc cal_type; }; + struct audio_cal_type_vocvol { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_vocvol cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_vocvol cal_info; }; + struct audio_cal_vocvol { - struct audio_cal_header hdr; - struct audio_cal_type_vocvol cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_vocvol cal_type; }; + struct audio_cal_type_vocdev_cfg { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_vocdev_cfg cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_vocdev_cfg cal_info; }; + struct audio_cal_vocdev_cfg { - struct audio_cal_header hdr; - struct audio_cal_type_vocdev_cfg cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_vocdev_cfg cal_type; }; + struct audio_cal_type_voc_col { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_voc_col cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_voc_col cal_info; }; + struct audio_cal_voc_col { - struct audio_cal_header hdr; - struct audio_cal_type_voc_col cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_voc_col cal_type; }; + +/* AUDIO_GET_CALIBRATION */ struct audio_cal_type_fb_spk_prot_status { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_msm_spk_prot_status cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_msm_spk_prot_status cal_info; }; + struct audio_cal_fb_spk_prot_status { - struct audio_cal_header hdr; - struct audio_cal_type_fb_spk_prot_status cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_fb_spk_prot_status cal_type; }; + struct audio_cal_type_sp_th_vi_param { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_sp_th_vi_param cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_th_vi_param cal_info; }; + struct audio_cal_sp_th_vi_param { - struct audio_cal_header hdr; - struct audio_cal_type_sp_th_vi_param cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_sp_th_vi_param cal_type; }; struct audio_cal_type_sp_ex_vi_param { - struct audio_cal_type_header cal_hdr; - struct audio_cal_data cal_data; - struct audio_cal_info_sp_ex_vi_param cal_info; + struct audio_cal_type_header cal_hdr; + struct audio_cal_data cal_data; + struct audio_cal_info_sp_ex_vi_param cal_info; }; + struct audio_cal_sp_ex_vi_param { - struct audio_cal_header hdr; - struct audio_cal_type_sp_ex_vi_param cal_type; + struct audio_cal_header hdr; + struct audio_cal_type_sp_ex_vi_param cal_type; }; -#endif - +#endif /* _MSM_AUDIO_CALIBRATION_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_g711.h b/sdm710/kernel-headers/linux/msm_audio_g711.h new file mode 100644 index 00000000..658c1a59 --- /dev/null +++ b/sdm710/kernel-headers/linux/msm_audio_g711.h @@ -0,0 +1,17 @@ +#ifndef _MSM_AUDIO_G711_H +#define _MSM_AUDIO_G711_H + +#include <linux/msm_audio.h> + +struct msm_audio_g711_enc_config { + uint32_t sample_rate; +}; + +#define AUDIO_SET_G711_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_g711_enc_config) + +#define AUDIO_GET_G711_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_g711_enc_config) + + +#endif /* _MSM_AUDIO_G711_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_g711_dec.h b/sdm710/kernel-headers/linux/msm_audio_g711_dec.h new file mode 100644 index 00000000..a597a94f --- /dev/null +++ b/sdm710/kernel-headers/linux/msm_audio_g711_dec.h @@ -0,0 +1,16 @@ +#ifndef _MSM_AUDIO_G711_H +#define _MSM_AUDIO_G711_H + +#include <linux/msm_audio.h> + +struct msm_audio_g711_dec_config { + uint32_t sample_rate; +}; + +#define AUDIO_SET_G711_DEC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_g711_dec_config) + +#define AUDIO_GET_G711_DEC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_g711_dec_config) + +#endif /* _MSM_AUDIO_G711_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_mvs.h b/sdm710/kernel-headers/linux/msm_audio_mvs.h index b27205e8..36d3b55b 100644 --- a/sdm710/kernel-headers/linux/msm_audio_mvs.h +++ b/sdm710/kernel-headers/linux/msm_audio_mvs.h @@ -1,30 +1,18 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_MVS_H #define _MSM_AUDIO_MVS_H + #include <linux/msm_audio.h> -#define AUDIO_GET_MVS_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned int) -#define AUDIO_SET_MVS_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned int) -#define MVS_MODE_IS733 0x1 -#define MVS_MODE_IS127 0x2 -#define MVS_MODE_4GV_NB 0x3 -#define MVS_MODE_4GV_WB 0x4 + +#define AUDIO_GET_MVS_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned int) +#define AUDIO_SET_MVS_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned int) + +/* MVS modes */ +#define MVS_MODE_IS733 0x1 /*QCELP 13K*/ +#define MVS_MODE_IS127 0x2 /*EVRC-8k*/ +#define MVS_MODE_4GV_NB 0x3 /*EVRC-B*/ +#define MVS_MODE_4GV_WB 0x4 /*EVRC-WB*/ #define MVS_MODE_AMR 0x5 #define MVS_MODE_EFR 0x6 #define MVS_MODE_FR 0x7 @@ -37,110 +25,131 @@ #define MVS_MODE_G711A 0xF #define MVS_MODE_G722 0x10 #define MVS_MODE_PCM_WB 0x12 + enum msm_audio_amr_mode { - MVS_AMR_MODE_0475, - MVS_AMR_MODE_0515, - MVS_AMR_MODE_0590, - MVS_AMR_MODE_0670, - MVS_AMR_MODE_0740, - MVS_AMR_MODE_0795, - MVS_AMR_MODE_1020, - MVS_AMR_MODE_1220, - MVS_AMR_MODE_0660, - MVS_AMR_MODE_0885, - MVS_AMR_MODE_1265, - MVS_AMR_MODE_1425, - MVS_AMR_MODE_1585, - MVS_AMR_MODE_1825, - MVS_AMR_MODE_1985, - MVS_AMR_MODE_2305, - MVS_AMR_MODE_2385, - MVS_AMR_MODE_UNDEF + MVS_AMR_MODE_0475, /* AMR 4.75 kbps */ + MVS_AMR_MODE_0515, /* AMR 5.15 kbps */ + MVS_AMR_MODE_0590, /* AMR 5.90 kbps */ + MVS_AMR_MODE_0670, /* AMR 6.70 kbps */ + MVS_AMR_MODE_0740, /* AMR 7.40 kbps */ + MVS_AMR_MODE_0795, /* AMR 7.95 kbps */ + MVS_AMR_MODE_1020, /* AMR 10.20 kbps */ + MVS_AMR_MODE_1220, /* AMR 12.20 kbps */ + MVS_AMR_MODE_0660, /* AMR-WB 6.60 kbps */ + MVS_AMR_MODE_0885, /* AMR-WB 8.85 kbps */ + MVS_AMR_MODE_1265, /* AMR-WB 12.65 kbps */ + MVS_AMR_MODE_1425, /* AMR-WB 14.25 kbps */ + MVS_AMR_MODE_1585, /* AMR-WB 15.85 kbps */ + MVS_AMR_MODE_1825, /* AMR-WB 18.25 kbps */ + MVS_AMR_MODE_1985, /* AMR-WB 19.85 kbps */ + MVS_AMR_MODE_2305, /* AMR-WB 23.05 kbps */ + MVS_AMR_MODE_2385, /* AMR-WB 23.85 kbps */ + MVS_AMR_MODE_UNDEF }; + +/* The MVS VOC rate type is used to identify the rate of QCELP 13K(IS733), + * EVRC(IS127), 4GV, or 4GV-WB frame. + */ enum msm_audio_voc_rate { - MVS_VOC_0_RATE, - MVS_VOC_8_RATE, - MVS_VOC_4_RATE, - MVS_VOC_2_RATE, - MVS_VOC_1_RATE, - MVS_VOC_ERASURE, - MVS_VOC_RATE_MAX, - MVS_VOC_RATE_UNDEF = MVS_VOC_RATE_MAX + MVS_VOC_0_RATE, /* Blank frame */ + MVS_VOC_8_RATE, /* 1/8 rate */ + MVS_VOC_4_RATE, /* 1/4 rate */ + MVS_VOC_2_RATE, /* 1/2 rate */ + MVS_VOC_1_RATE, /* Full rate */ + MVS_VOC_ERASURE, /* erasure frame */ + MVS_VOC_RATE_MAX, + MVS_VOC_RATE_UNDEF = MVS_VOC_RATE_MAX }; + enum msm_audio_amr_frame_type { - MVS_AMR_SPEECH_GOOD, - MVS_AMR_SPEECH_DEGRADED, - MVS_AMR_ONSET, - MVS_AMR_SPEECH_BAD, - MVS_AMR_SID_FIRST, - MVS_AMR_SID_UPDATE, - MVS_AMR_SID_BAD, - MVS_AMR_NO_DATA, - MVS_AMR_SPEECH_LOST + MVS_AMR_SPEECH_GOOD, /* Good speech frame */ + MVS_AMR_SPEECH_DEGRADED, /* Speech degraded */ + MVS_AMR_ONSET, /* Onset */ + MVS_AMR_SPEECH_BAD, /* Corrupt speech frame (bad CRC) */ + MVS_AMR_SID_FIRST, /* First silence descriptor */ + MVS_AMR_SID_UPDATE, /* Comfort noise frame */ + MVS_AMR_SID_BAD, /* Corrupt SID frame (bad CRC) */ + MVS_AMR_NO_DATA, /* Nothing to transmit */ + MVS_AMR_SPEECH_LOST /* Downlink speech lost */ }; + enum msm_audio_g711a_mode { - MVS_G711A_MODE_MULAW, - MVS_G711A_MODE_ALAW + MVS_G711A_MODE_MULAW, + MVS_G711A_MODE_ALAW }; + enum msm_audio_g711_mode { - MVS_G711_MODE_MULAW, - MVS_G711_MODE_ALAW + MVS_G711_MODE_MULAW, + MVS_G711_MODE_ALAW }; + enum mvs_g722_mode_type { - MVS_G722_MODE_01, - MVS_G722_MODE_02, - MVS_G722_MODE_03, - MVS_G722_MODE_MAX, - MVS_G722_MODE_UNDEF + MVS_G722_MODE_01, + MVS_G722_MODE_02, + MVS_G722_MODE_03, + MVS_G722_MODE_MAX, + MVS_G722_MODE_UNDEF }; + enum msm_audio_g711a_frame_type { - MVS_G711A_SPEECH_GOOD, - MVS_G711A_SID, - MVS_G711A_NO_DATA, - MVS_G711A_ERASURE + MVS_G711A_SPEECH_GOOD, + MVS_G711A_SID, + MVS_G711A_NO_DATA, + MVS_G711A_ERASURE }; + enum msm_audio_g729a_frame_type { - MVS_G729A_NO_DATA, - MVS_G729A_SPEECH_GOOD, - MVS_G729A_SID, - MVS_G729A_ERASURE + MVS_G729A_NO_DATA, + MVS_G729A_SPEECH_GOOD, + MVS_G729A_SID, + MVS_G729A_ERASURE }; + struct min_max_rate { - uint32_t min_rate; - uint32_t max_rate; + uint32_t min_rate; + uint32_t max_rate; }; + struct msm_audio_mvs_config { - uint32_t mvs_mode; - uint32_t rate_type; - struct min_max_rate min_max_rate; - uint32_t dtx_mode; + uint32_t mvs_mode; + uint32_t rate_type; + struct min_max_rate min_max_rate; + uint32_t dtx_mode; }; + #define MVS_MAX_VOC_PKT_SIZE 640 + struct gsm_header { - uint8_t bfi; - uint8_t sid; - uint8_t taf; - uint8_t ufi; + uint8_t bfi; + uint8_t sid; + uint8_t taf; + uint8_t ufi; }; + struct q6_msm_audio_mvs_frame { - union { - uint32_t frame_type; - uint32_t packet_rate; - struct gsm_header gsm_frame_type; - } header; - uint32_t len; - uint8_t voc_pkt[MVS_MAX_VOC_PKT_SIZE]; + union { + uint32_t frame_type; + uint32_t packet_rate; + struct gsm_header gsm_frame_type; + } header; + uint32_t len; + uint8_t voc_pkt[MVS_MAX_VOC_PKT_SIZE]; + }; + struct msm_audio_mvs_frame { - uint32_t frame_type; - uint32_t len; - uint8_t voc_pkt[MVS_MAX_VOC_PKT_SIZE]; + uint32_t frame_type; + uint32_t len; + uint8_t voc_pkt[MVS_MAX_VOC_PKT_SIZE]; + }; + #define Q5V2_MVS_MAX_VOC_PKT_SIZE 320 + struct q5v2_msm_audio_mvs_frame { - uint32_t frame_type; - uint32_t len; - uint8_t voc_pkt[Q5V2_MVS_MAX_VOC_PKT_SIZE]; -}; -#endif + uint32_t frame_type; + uint32_t len; + uint8_t voc_pkt[Q5V2_MVS_MAX_VOC_PKT_SIZE]; +}; +#endif /* _MSM_AUDIO_MVS_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_qcp.h b/sdm710/kernel-headers/linux/msm_audio_qcp.h index 5f517973..de8552a2 100644 --- a/sdm710/kernel-headers/linux/msm_audio_qcp.h +++ b/sdm710/kernel-headers/linux/msm_audio_qcp.h @@ -1,43 +1,37 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_QCP_H #define _MSM_AUDIO_QCP_H + #include <linux/msm_audio.h> -#define AUDIO_SET_QCELP_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 0, struct msm_audio_qcelp_enc_config) -#define AUDIO_GET_QCELP_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 1, struct msm_audio_qcelp_enc_config) -#define AUDIO_SET_EVRC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 2, struct msm_audio_evrc_enc_config) -#define AUDIO_GET_EVRC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, struct msm_audio_evrc_enc_config) -#define CDMA_RATE_BLANK 0x00 -#define CDMA_RATE_EIGHTH 0x01 -#define CDMA_RATE_QUARTER 0x02 -#define CDMA_RATE_HALF 0x03 -#define CDMA_RATE_FULL 0x04 -#define CDMA_RATE_ERASURE 0x05 + +#define AUDIO_SET_QCELP_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + 0, struct msm_audio_qcelp_enc_config) + +#define AUDIO_GET_QCELP_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + 1, struct msm_audio_qcelp_enc_config) + +#define AUDIO_SET_EVRC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + 2, struct msm_audio_evrc_enc_config) + +#define AUDIO_GET_EVRC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + 3, struct msm_audio_evrc_enc_config) + +#define CDMA_RATE_BLANK 0x00 +#define CDMA_RATE_EIGHTH 0x01 +#define CDMA_RATE_QUARTER 0x02 +#define CDMA_RATE_HALF 0x03 +#define CDMA_RATE_FULL 0x04 +#define CDMA_RATE_ERASURE 0x05 + struct msm_audio_qcelp_enc_config { - uint32_t cdma_rate; - uint32_t min_bit_rate; - uint32_t max_bit_rate; + uint32_t cdma_rate; + uint32_t min_bit_rate; + uint32_t max_bit_rate; }; + struct msm_audio_evrc_enc_config { - uint32_t cdma_rate; - uint32_t min_bit_rate; - uint32_t max_bit_rate; + uint32_t cdma_rate; + uint32_t min_bit_rate; + uint32_t max_bit_rate; }; -#endif +#endif /* _MSM_AUDIO_QCP_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_sbc.h b/sdm710/kernel-headers/linux/msm_audio_sbc.h index bb829d78..206b183c 100644 --- a/sdm710/kernel-headers/linux/msm_audio_sbc.h +++ b/sdm710/kernel-headers/linux/msm_audio_sbc.h @@ -1,45 +1,36 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_SBC_H #define _MSM_AUDIO_SBC_H + #include <linux/msm_audio.h> -#define AUDIO_SET_SBC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), struct msm_audio_sbc_enc_config) -#define AUDIO_GET_SBC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), struct msm_audio_sbc_enc_config) -#define AUDIO_SBC_BA_LOUDNESS 0x0 -#define AUDIO_SBC_BA_SNR 0x1 -#define AUDIO_SBC_MODE_MONO 0x0 -#define AUDIO_SBC_MODE_DUAL 0x1 -#define AUDIO_SBC_MODE_STEREO 0x2 -#define AUDIO_SBC_MODE_JSTEREO 0x3 -#define AUDIO_SBC_BANDS_8 0x1 -#define AUDIO_SBC_BLOCKS_4 0x0 -#define AUDIO_SBC_BLOCKS_8 0x1 -#define AUDIO_SBC_BLOCKS_12 0x2 -#define AUDIO_SBC_BLOCKS_16 0x3 + +#define AUDIO_SET_SBC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_sbc_enc_config) + +#define AUDIO_GET_SBC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_sbc_enc_config) + +#define AUDIO_SBC_BA_LOUDNESS 0x0 +#define AUDIO_SBC_BA_SNR 0x1 + +#define AUDIO_SBC_MODE_MONO 0x0 +#define AUDIO_SBC_MODE_DUAL 0x1 +#define AUDIO_SBC_MODE_STEREO 0x2 +#define AUDIO_SBC_MODE_JSTEREO 0x3 + +#define AUDIO_SBC_BANDS_8 0x1 + +#define AUDIO_SBC_BLOCKS_4 0x0 +#define AUDIO_SBC_BLOCKS_8 0x1 +#define AUDIO_SBC_BLOCKS_12 0x2 +#define AUDIO_SBC_BLOCKS_16 0x3 + struct msm_audio_sbc_enc_config { - uint32_t channels; - uint32_t sample_rate; - uint32_t bit_allocation; - uint32_t number_of_subbands; - uint32_t number_of_blocks; - uint32_t bit_rate; - uint32_t mode; + uint32_t channels; + uint32_t sample_rate; + uint32_t bit_allocation; + uint32_t number_of_subbands; + uint32_t number_of_blocks; + uint32_t bit_rate; + uint32_t mode; }; -#endif - +#endif /* _MSM_AUDIO_SBC_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_voicememo.h b/sdm710/kernel-headers/linux/msm_audio_voicememo.h index c16268c6..50e1696f 100644 --- a/sdm710/kernel-headers/linux/msm_audio_voicememo.h +++ b/sdm710/kernel-headers/linux/msm_audio_voicememo.h @@ -1,71 +1,66 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_VOICEMEMO_H #define _MSM_AUDIO_VOICEMEMO_H + #include <linux/msm_audio.h> -#define AUDIO_GET_VOICEMEMO_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned int) -#define AUDIO_SET_VOICEMEMO_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned int) + +#define AUDIO_GET_VOICEMEMO_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned int) +#define AUDIO_SET_VOICEMEMO_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned int) + +/* rec_type */ enum rpc_voc_rec_dir_type { - RPC_VOC_REC_NONE, - RPC_VOC_REC_FORWARD, - RPC_VOC_REC_REVERSE, - RPC_VOC_REC_BOTH, - RPC_VOC_MAX_REC_TYPE + RPC_VOC_REC_NONE, + RPC_VOC_REC_FORWARD, + RPC_VOC_REC_REVERSE, + RPC_VOC_REC_BOTH, + RPC_VOC_MAX_REC_TYPE }; + +/* capability */ enum rpc_voc_capability_type { - RPC_VOC_CAP_IS733 = 4, - RPC_VOC_CAP_IS127 = 8, - RPC_VOC_CAP_AMR = 64, - RPC_VOC_CAP_32BIT_DUMMY = 2147483647 + RPC_VOC_CAP_IS733 = 4, + RPC_VOC_CAP_IS127 = 8, + RPC_VOC_CAP_AMR = 64, + RPC_VOC_CAP_32BIT_DUMMY = 2147483647 }; + +/* Rate */ enum rpc_voc_rate_type { - RPC_VOC_0_RATE = 0, - RPC_VOC_8_RATE, - RPC_VOC_4_RATE, - RPC_VOC_2_RATE, - RPC_VOC_1_RATE, - RPC_VOC_ERASURE, - RPC_VOC_ERR_RATE, - RPC_VOC_AMR_RATE_475 = 0, - RPC_VOC_AMR_RATE_515 = 1, - RPC_VOC_AMR_RATE_590 = 2, - RPC_VOC_AMR_RATE_670 = 3, - RPC_VOC_AMR_RATE_740 = 4, - RPC_VOC_AMR_RATE_795 = 5, - RPC_VOC_AMR_RATE_1020 = 6, - RPC_VOC_AMR_RATE_1220 = 7, + RPC_VOC_0_RATE = 0, + RPC_VOC_8_RATE, + RPC_VOC_4_RATE, + RPC_VOC_2_RATE, + RPC_VOC_1_RATE, + RPC_VOC_ERASURE, + RPC_VOC_ERR_RATE, + RPC_VOC_AMR_RATE_475 = 0, + RPC_VOC_AMR_RATE_515 = 1, + RPC_VOC_AMR_RATE_590 = 2, + RPC_VOC_AMR_RATE_670 = 3, + RPC_VOC_AMR_RATE_740 = 4, + RPC_VOC_AMR_RATE_795 = 5, + RPC_VOC_AMR_RATE_1020 = 6, + RPC_VOC_AMR_RATE_1220 = 7, }; + +/* frame_format */ enum rpc_voc_pb_len_rate_var_type { - RPC_VOC_PB_NATIVE_QCP = 3, - RPC_VOC_PB_AMR, - RPC_VOC_PB_EVB + RPC_VOC_PB_NATIVE_QCP = 3, + RPC_VOC_PB_AMR, + RPC_VOC_PB_EVB }; + struct msm_audio_voicememo_config { - uint32_t rec_type; - uint32_t rec_interval_ms; - uint32_t auto_stop_ms; - uint32_t capability; - uint32_t max_rate; - uint32_t min_rate; - uint32_t frame_format; - uint32_t dtx_enable; - uint32_t data_req_ms; + uint32_t rec_type; + uint32_t rec_interval_ms; + uint32_t auto_stop_ms; + uint32_t capability; + uint32_t max_rate; + uint32_t min_rate; + uint32_t frame_format; + uint32_t dtx_enable; + uint32_t data_req_ms; }; -#endif +#endif /* _MSM_AUDIO_VOICEMEMO_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_wma.h b/sdm710/kernel-headers/linux/msm_audio_wma.h index 10f2600a..8f46f2c6 100644 --- a/sdm710/kernel-headers/linux/msm_audio_wma.h +++ b/sdm710/kernel-headers/linux/msm_audio_wma.h @@ -1,43 +1,33 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_WMA_H #define _MSM_AUDIO_WMA_H -#define AUDIO_GET_WMA_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned int) -#define AUDIO_SET_WMA_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned int) -#define AUDIO_GET_WMA_CONFIG_V2 _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 2), struct msm_audio_wma_config_v2) -#define AUDIO_SET_WMA_CONFIG_V2 _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 3), struct msm_audio_wma_config_v2) + +#define AUDIO_GET_WMA_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned int) +#define AUDIO_SET_WMA_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned int) + +#define AUDIO_GET_WMA_CONFIG_V2 _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+2), struct msm_audio_wma_config_v2) +#define AUDIO_SET_WMA_CONFIG_V2 _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+3), struct msm_audio_wma_config_v2) + struct msm_audio_wma_config { - unsigned short armdatareqthr; - unsigned short channelsdecoded; - unsigned short wmabytespersec; - unsigned short wmasamplingfreq; - unsigned short wmaencoderopts; + unsigned short armdatareqthr; + unsigned short channelsdecoded; + unsigned short wmabytespersec; + unsigned short wmasamplingfreq; + unsigned short wmaencoderopts; }; + struct msm_audio_wma_config_v2 { - unsigned short format_tag; - unsigned short numchannels; - uint32_t samplingrate; - uint32_t avgbytespersecond; - unsigned short block_align; - unsigned short validbitspersample; - uint32_t channelmask; - unsigned short encodeopt; + unsigned short format_tag; + unsigned short numchannels; + uint32_t samplingrate; + uint32_t avgbytespersecond; + unsigned short block_align; + unsigned short validbitspersample; + uint32_t channelmask; + unsigned short encodeopt; }; -#endif +#endif /* _MSM_AUDIO_WMA_H */ diff --git a/sdm710/kernel-headers/linux/msm_audio_wmapro.h b/sdm710/kernel-headers/linux/msm_audio_wmapro.h index 2fa45cc9..7559a877 100644 --- a/sdm710/kernel-headers/linux/msm_audio_wmapro.h +++ b/sdm710/kernel-headers/linux/msm_audio_wmapro.h @@ -1,37 +1,22 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _MSM_AUDIO_WMAPRO_H #define _MSM_AUDIO_WMAPRO_H -#define AUDIO_GET_WMAPRO_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), struct msm_audio_wmapro_config) -#define AUDIO_SET_WMAPRO_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), struct msm_audio_wmapro_config) + +#define AUDIO_GET_WMAPRO_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_wmapro_config) +#define AUDIO_SET_WMAPRO_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_wmapro_config) + struct msm_audio_wmapro_config { - unsigned short armdatareqthr; - uint8_t validbitspersample; - uint8_t numchannels; - unsigned short formattag; - uint32_t samplingrate; - uint32_t avgbytespersecond; - unsigned short asfpacketlength; - uint32_t channelmask; - unsigned short encodeopt; - unsigned short advancedencodeopt; - uint32_t advancedencodeopt2; + unsigned short armdatareqthr; + uint8_t validbitspersample; + uint8_t numchannels; + unsigned short formattag; + uint32_t samplingrate; + uint32_t avgbytespersecond; + unsigned short asfpacketlength; + uint32_t channelmask; + unsigned short encodeopt; + unsigned short advancedencodeopt; + uint32_t advancedencodeopt2; }; -#endif - +#endif /* _MSM_AUDIO_WMAPRO_H */ diff --git a/sdm710/kernel-headers/media/msm_media_info.h b/sdm710/kernel-headers/media/msm_media_info.h index c4981dea..0f4d7f75 100644 --- a/sdm710/kernel-headers/media/msm_media_info.h +++ b/sdm710/kernel-headers/media/msm_media_info.h @@ -1261,8 +1261,11 @@ static __inline__ unsigned int VENUS_BUFFER_SIZE( size = MSM_MEDIA_ALIGN(size, 4096); /* Additional size to cover last row of non-aligned frame */ - size += MSM_MEDIA_ALIGN(width, w_alignment) * w_alignment; - size = MSM_MEDIA_ALIGN(size, 4096); + if (width >= 2400 && height >= 2400) { + size += MSM_MEDIA_ALIGN(width, w_alignment) * + w_alignment; + size = MSM_MEDIA_ALIGN(size, 4096); + } break; case COLOR_FMT_P010: uv_alignment = 4096; @@ -1302,8 +1305,11 @@ static __inline__ unsigned int VENUS_BUFFER_SIZE( size = MSM_MEDIA_ALIGN(size, 4096); /* Additional size to cover last row of non-aligned frame */ - size += MSM_MEDIA_ALIGN(width, w_alignment) * w_alignment; - size = MSM_MEDIA_ALIGN(size, 4096); + if (width >= 2400 && height >= 2400) { + size += MSM_MEDIA_ALIGN(width, w_alignment) * + w_alignment; + size = MSM_MEDIA_ALIGN(size, 4096); + } break; case COLOR_FMT_NV12_BPP10_UBWC: y_ubwc_plane = MSM_MEDIA_ALIGN(y_stride * y_sclines, 4096); diff --git a/sdm710/kernel-headers/sound/audio_effects.h b/sdm710/kernel-headers/sound/audio_effects.h index 39742c0d..0ac887cd 100644 --- a/sdm710/kernel-headers/sound/audio_effects.h +++ b/sdm710/kernel-headers/sound/audio_effects.h @@ -1,286 +1,361 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _AUDIO_EFFECTS_H #define _AUDIO_EFFECTS_H -#define CONFIG_CACHE 0 -#define CONFIG_SET 1 -#define CONFIG_GET 2 -#define VIRTUALIZER_MODULE 0x00001000 -#define VIRTUALIZER_ENABLE 0x00001001 -#define VIRTUALIZER_STRENGTH 0x00001002 -#define VIRTUALIZER_OUT_TYPE 0x00001003 -#define VIRTUALIZER_GAIN_ADJUST 0x00001004 -#define VIRTUALIZER_ENABLE_PARAM_LEN 1 -#define VIRTUALIZER_STRENGTH_PARAM_LEN 1 -#define VIRTUALIZER_OUT_TYPE_PARAM_LEN 1 -#define VIRTUALIZER_GAIN_ADJUST_PARAM_LEN 1 -#define REVERB_MODULE 0x00002000 -#define REVERB_ENABLE 0x00002001 -#define REVERB_MODE 0x00002002 -#define REVERB_PRESET 0x00002003 -#define REVERB_WET_MIX 0x00002004 -#define REVERB_GAIN_ADJUST 0x00002005 -#define REVERB_ROOM_LEVEL 0x00002006 -#define REVERB_ROOM_HF_LEVEL 0x00002007 -#define REVERB_DECAY_TIME 0x00002008 -#define REVERB_DECAY_HF_RATIO 0x00002009 -#define REVERB_REFLECTIONS_LEVEL 0x0000200a -#define REVERB_REFLECTIONS_DELAY 0x0000200b -#define REVERB_LEVEL 0x0000200c -#define REVERB_DELAY 0x0000200d -#define REVERB_DIFFUSION 0x0000200e -#define REVERB_DENSITY 0x0000200f -#define REVERB_ENABLE_PARAM_LEN 1 -#define REVERB_MODE_PARAM_LEN 1 -#define REVERB_PRESET_PARAM_LEN 1 -#define REVERB_WET_MIX_PARAM_LEN 1 -#define REVERB_GAIN_ADJUST_PARAM_LEN 1 -#define REVERB_ROOM_LEVEL_PARAM_LEN 1 -#define REVERB_ROOM_HF_LEVEL_PARAM_LEN 1 -#define REVERB_DECAY_TIME_PARAM_LEN 1 -#define REVERB_DECAY_HF_RATIO_PARAM_LEN 1 -#define REVERB_REFLECTIONS_LEVEL_PARAM_LEN 1 -#define REVERB_REFLECTIONS_DELAY_PARAM_LEN 1 -#define REVERB_LEVEL_PARAM_LEN 1 -#define REVERB_DELAY_PARAM_LEN 1 -#define REVERB_DIFFUSION_PARAM_LEN 1 -#define REVERB_DENSITY_PARAM_LEN 1 -#define BASS_BOOST_MODULE 0x00003000 -#define BASS_BOOST_ENABLE 0x00003001 -#define BASS_BOOST_MODE 0x00003002 -#define BASS_BOOST_STRENGTH 0x00003003 -#define BASS_BOOST_ENABLE_PARAM_LEN 1 -#define BASS_BOOST_MODE_PARAM_LEN 1 -#define BASS_BOOST_STRENGTH_PARAM_LEN 1 -#define EQ_MODULE 0x00004000 -#define EQ_ENABLE 0x00004001 -#define EQ_CONFIG 0x00004002 -#define EQ_NUM_BANDS 0x00004003 -#define EQ_BAND_LEVELS 0x00004004 -#define EQ_BAND_LEVEL_RANGE 0x00004005 -#define EQ_BAND_FREQS 0x00004006 -#define EQ_SINGLE_BAND_FREQ_RANGE 0x00004007 -#define EQ_SINGLE_BAND_FREQ 0x00004008 -#define EQ_BAND_INDEX 0x00004009 -#define EQ_PRESET_ID 0x0000400a -#define EQ_NUM_PRESETS 0x0000400b -#define EQ_PRESET_NAME 0x0000400c -#define EQ_ENABLE_PARAM_LEN 1 -#define EQ_CONFIG_PARAM_LEN 3 -#define EQ_CONFIG_PER_BAND_PARAM_LEN 5 -#define EQ_NUM_BANDS_PARAM_LEN 1 -#define EQ_BAND_LEVELS_PARAM_LEN 13 -#define EQ_BAND_LEVEL_RANGE_PARAM_LEN 2 -#define EQ_BAND_FREQS_PARAM_LEN 13 -#define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN 2 -#define EQ_SINGLE_BAND_FREQ_PARAM_LEN 1 -#define EQ_BAND_INDEX_PARAM_LEN 1 -#define EQ_PRESET_ID_PARAM_LEN 1 -#define EQ_NUM_PRESETS_PARAM_LEN 1 -#define EQ_PRESET_NAME_PARAM_LEN 32 -#define EQ_TYPE_NONE 0 -#define EQ_BASS_BOOST 1 -#define EQ_BASS_CUT 2 -#define EQ_TREBLE_BOOST 3 -#define EQ_TREBLE_CUT 4 -#define EQ_BAND_BOOST 5 -#define EQ_BAND_CUT 6 -#define SOFT_VOLUME_MODULE 0x00006000 -#define SOFT_VOLUME_ENABLE 0x00006001 -#define SOFT_VOLUME_GAIN_2CH 0x00006002 -#define SOFT_VOLUME_GAIN_MASTER 0x00006003 -#define SOFT_VOLUME_ENABLE_PARAM_LEN 1 -#define SOFT_VOLUME_GAIN_2CH_PARAM_LEN 2 -#define SOFT_VOLUME_GAIN_MASTER_PARAM_LEN 1 -#define SOFT_VOLUME2_MODULE 0x00007000 -#define SOFT_VOLUME2_ENABLE 0x00007001 -#define SOFT_VOLUME2_GAIN_2CH 0x00007002 -#define SOFT_VOLUME2_GAIN_MASTER 0x00007003 -#define SOFT_VOLUME2_ENABLE_PARAM_LEN SOFT_VOLUME_ENABLE_PARAM_LEN -#define SOFT_VOLUME2_GAIN_2CH_PARAM_LEN SOFT_VOLUME_GAIN_2CH_PARAM_LEN -#define SOFT_VOLUME2_GAIN_MASTER_PARAM_LEN SOFT_VOLUME_GAIN_MASTER_PARAM_LEN -#define PBE_CONF_MODULE_ID 0x00010C2A -#define PBE_CONF_PARAM_ID 0x00010C49 -#define PBE_MODULE 0x00008000 -#define PBE_ENABLE 0x00008001 -#define PBE_CONFIG 0x00008002 -#define PBE_ENABLE_PARAM_LEN 1 -#define PBE_CONFIG_PARAM_LEN 28 -#define COMMAND_PAYLOAD_LEN 3 -#define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(uint32_t)) -#define MAX_INBAND_PARAM_SZ 4096 -#define Q27_UNITY (1 << 27) -#define Q8_UNITY (1 << 8) -#define CUSTOM_OPENSL_PRESET 18 -#define VIRTUALIZER_ENABLE_PARAM_SZ (VIRTUALIZER_ENABLE_PARAM_LEN * sizeof(uint32_t)) -#define VIRTUALIZER_STRENGTH_PARAM_SZ (VIRTUALIZER_STRENGTH_PARAM_LEN * sizeof(uint32_t)) -#define VIRTUALIZER_OUT_TYPE_PARAM_SZ (VIRTUALIZER_OUT_TYPE_PARAM_LEN * sizeof(uint32_t)) -#define VIRTUALIZER_GAIN_ADJUST_PARAM_SZ (VIRTUALIZER_GAIN_ADJUST_PARAM_LEN * sizeof(uint32_t)) + +/** AUDIO EFFECTS **/ + + +/* CONFIG GET/SET */ +#define CONFIG_CACHE 0 +#define CONFIG_SET 1 +#define CONFIG_GET 2 + +/* CONFIG HEADER */ +/* + * MODULE_ID, + * DEVICE, + * NUM_COMMANDS, + * COMMAND_ID_1, + * CONFIG_CACHE/SET/GET, + * OFFSET_1, + * LENGTH_1, + * VALUES_1, + * ..., + * ..., + * COMMAND_ID_2, + * CONFIG_CACHE/SET/GET, + * OFFSET_2, + * LENGTH_2, + * VALUES_2, + * ..., + * ..., + * COMMAND_ID_3, + * ... + */ + + +/* CONFIG PARAM IDs */ +#define VIRTUALIZER_MODULE 0x00001000 +#define VIRTUALIZER_ENABLE 0x00001001 +#define VIRTUALIZER_STRENGTH 0x00001002 +#define VIRTUALIZER_OUT_TYPE 0x00001003 +#define VIRTUALIZER_GAIN_ADJUST 0x00001004 +#define VIRTUALIZER_ENABLE_PARAM_LEN 1 +#define VIRTUALIZER_STRENGTH_PARAM_LEN 1 +#define VIRTUALIZER_OUT_TYPE_PARAM_LEN 1 +#define VIRTUALIZER_GAIN_ADJUST_PARAM_LEN 1 + +#define REVERB_MODULE 0x00002000 +#define REVERB_ENABLE 0x00002001 +#define REVERB_MODE 0x00002002 +#define REVERB_PRESET 0x00002003 +#define REVERB_WET_MIX 0x00002004 +#define REVERB_GAIN_ADJUST 0x00002005 +#define REVERB_ROOM_LEVEL 0x00002006 +#define REVERB_ROOM_HF_LEVEL 0x00002007 +#define REVERB_DECAY_TIME 0x00002008 +#define REVERB_DECAY_HF_RATIO 0x00002009 +#define REVERB_REFLECTIONS_LEVEL 0x0000200a +#define REVERB_REFLECTIONS_DELAY 0x0000200b +#define REVERB_LEVEL 0x0000200c +#define REVERB_DELAY 0x0000200d +#define REVERB_DIFFUSION 0x0000200e +#define REVERB_DENSITY 0x0000200f +#define REVERB_ENABLE_PARAM_LEN 1 +#define REVERB_MODE_PARAM_LEN 1 +#define REVERB_PRESET_PARAM_LEN 1 +#define REVERB_WET_MIX_PARAM_LEN 1 +#define REVERB_GAIN_ADJUST_PARAM_LEN 1 +#define REVERB_ROOM_LEVEL_PARAM_LEN 1 +#define REVERB_ROOM_HF_LEVEL_PARAM_LEN 1 +#define REVERB_DECAY_TIME_PARAM_LEN 1 +#define REVERB_DECAY_HF_RATIO_PARAM_LEN 1 +#define REVERB_REFLECTIONS_LEVEL_PARAM_LEN 1 +#define REVERB_REFLECTIONS_DELAY_PARAM_LEN 1 +#define REVERB_LEVEL_PARAM_LEN 1 +#define REVERB_DELAY_PARAM_LEN 1 +#define REVERB_DIFFUSION_PARAM_LEN 1 +#define REVERB_DENSITY_PARAM_LEN 1 + +#define BASS_BOOST_MODULE 0x00003000 +#define BASS_BOOST_ENABLE 0x00003001 +#define BASS_BOOST_MODE 0x00003002 +#define BASS_BOOST_STRENGTH 0x00003003 +#define BASS_BOOST_ENABLE_PARAM_LEN 1 +#define BASS_BOOST_MODE_PARAM_LEN 1 +#define BASS_BOOST_STRENGTH_PARAM_LEN 1 + +#define EQ_MODULE 0x00004000 +#define EQ_ENABLE 0x00004001 +#define EQ_CONFIG 0x00004002 +#define EQ_NUM_BANDS 0x00004003 +#define EQ_BAND_LEVELS 0x00004004 +#define EQ_BAND_LEVEL_RANGE 0x00004005 +#define EQ_BAND_FREQS 0x00004006 +#define EQ_SINGLE_BAND_FREQ_RANGE 0x00004007 +#define EQ_SINGLE_BAND_FREQ 0x00004008 +#define EQ_BAND_INDEX 0x00004009 +#define EQ_PRESET_ID 0x0000400a +#define EQ_NUM_PRESETS 0x0000400b +#define EQ_PRESET_NAME 0x0000400c +#define EQ_ENABLE_PARAM_LEN 1 +#define EQ_CONFIG_PARAM_LEN 3 +#define EQ_CONFIG_PER_BAND_PARAM_LEN 5 +#define EQ_NUM_BANDS_PARAM_LEN 1 +#define EQ_BAND_LEVELS_PARAM_LEN 13 +#define EQ_BAND_LEVEL_RANGE_PARAM_LEN 2 +#define EQ_BAND_FREQS_PARAM_LEN 13 +#define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN 2 +#define EQ_SINGLE_BAND_FREQ_PARAM_LEN 1 +#define EQ_BAND_INDEX_PARAM_LEN 1 +#define EQ_PRESET_ID_PARAM_LEN 1 +#define EQ_NUM_PRESETS_PARAM_LEN 1 +#define EQ_PRESET_NAME_PARAM_LEN 32 + +#define EQ_TYPE_NONE 0 +#define EQ_BASS_BOOST 1 +#define EQ_BASS_CUT 2 +#define EQ_TREBLE_BOOST 3 +#define EQ_TREBLE_CUT 4 +#define EQ_BAND_BOOST 5 +#define EQ_BAND_CUT 6 + +#define SOFT_VOLUME_MODULE 0x00006000 +#define SOFT_VOLUME_ENABLE 0x00006001 +#define SOFT_VOLUME_GAIN_2CH 0x00006002 +#define SOFT_VOLUME_GAIN_MASTER 0x00006003 +#define SOFT_VOLUME_ENABLE_PARAM_LEN 1 +#define SOFT_VOLUME_GAIN_2CH_PARAM_LEN 2 +#define SOFT_VOLUME_GAIN_MASTER_PARAM_LEN 1 + +#define SOFT_VOLUME2_MODULE 0x00007000 +#define SOFT_VOLUME2_ENABLE 0x00007001 +#define SOFT_VOLUME2_GAIN_2CH 0x00007002 +#define SOFT_VOLUME2_GAIN_MASTER 0x00007003 +#define SOFT_VOLUME2_ENABLE_PARAM_LEN SOFT_VOLUME_ENABLE_PARAM_LEN +#define SOFT_VOLUME2_GAIN_2CH_PARAM_LEN SOFT_VOLUME_GAIN_2CH_PARAM_LEN +#define SOFT_VOLUME2_GAIN_MASTER_PARAM_LEN \ + SOFT_VOLUME_GAIN_MASTER_PARAM_LEN + +#define PBE_CONF_MODULE_ID 0x00010C2A +#define PBE_CONF_PARAM_ID 0x00010C49 + +#define PBE_MODULE 0x00008000 +#define PBE_ENABLE 0x00008001 +#define PBE_CONFIG 0x00008002 +#define PBE_ENABLE_PARAM_LEN 1 +#define PBE_CONFIG_PARAM_LEN 28 + +#define COMMAND_PAYLOAD_LEN 3 +#define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(uint32_t)) +#define MAX_INBAND_PARAM_SZ 4096 +#define Q27_UNITY (1 << 27) +#define Q8_UNITY (1 << 8) +#define CUSTOM_OPENSL_PRESET 18 + +#define VIRTUALIZER_ENABLE_PARAM_SZ \ + (VIRTUALIZER_ENABLE_PARAM_LEN*sizeof(uint32_t)) +#define VIRTUALIZER_STRENGTH_PARAM_SZ \ + (VIRTUALIZER_STRENGTH_PARAM_LEN*sizeof(uint32_t)) +#define VIRTUALIZER_OUT_TYPE_PARAM_SZ \ + (VIRTUALIZER_OUT_TYPE_PARAM_LEN*sizeof(uint32_t)) +#define VIRTUALIZER_GAIN_ADJUST_PARAM_SZ \ + (VIRTUALIZER_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t)) struct virtualizer_params { - uint32_t device; - uint32_t enable_flag; - uint32_t strength; - uint32_t out_type; - int32_t gain_adjust; + uint32_t device; + uint32_t enable_flag; + uint32_t strength; + uint32_t out_type; + int32_t gain_adjust; }; -#define NUM_OSL_REVERB_PRESETS_SUPPORTED 6 -#define REVERB_ENABLE_PARAM_SZ (REVERB_ENABLE_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_MODE_PARAM_SZ (REVERB_MODE_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_PRESET_PARAM_SZ (REVERB_PRESET_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_WET_MIX_PARAM_SZ (REVERB_WET_MIX_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_GAIN_ADJUST_PARAM_SZ (REVERB_GAIN_ADJUST_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_ROOM_LEVEL_PARAM_SZ (REVERB_ROOM_LEVEL_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_ROOM_HF_LEVEL_PARAM_SZ (REVERB_ROOM_HF_LEVEL_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_DECAY_TIME_PARAM_SZ (REVERB_DECAY_TIME_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_DECAY_HF_RATIO_PARAM_SZ (REVERB_DECAY_HF_RATIO_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_REFLECTIONS_LEVEL_PARAM_SZ (REVERB_REFLECTIONS_LEVEL_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_REFLECTIONS_DELAY_PARAM_SZ (REVERB_REFLECTIONS_DELAY_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_LEVEL_PARAM_SZ (REVERB_LEVEL_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_DELAY_PARAM_SZ (REVERB_DELAY_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_DIFFUSION_PARAM_SZ (REVERB_DIFFUSION_PARAM_LEN * sizeof(uint32_t)) -#define REVERB_DENSITY_PARAM_SZ (REVERB_DENSITY_PARAM_LEN * sizeof(uint32_t)) + +#define NUM_OSL_REVERB_PRESETS_SUPPORTED 6 +#define REVERB_ENABLE_PARAM_SZ \ + (REVERB_ENABLE_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_MODE_PARAM_SZ \ + (REVERB_MODE_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_PRESET_PARAM_SZ \ + (REVERB_PRESET_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_WET_MIX_PARAM_SZ \ + (REVERB_WET_MIX_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_GAIN_ADJUST_PARAM_SZ \ + (REVERB_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_ROOM_LEVEL_PARAM_SZ \ + (REVERB_ROOM_LEVEL_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_ROOM_HF_LEVEL_PARAM_SZ \ + (REVERB_ROOM_HF_LEVEL_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_DECAY_TIME_PARAM_SZ \ + (REVERB_DECAY_TIME_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_DECAY_HF_RATIO_PARAM_SZ \ + (REVERB_DECAY_HF_RATIO_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_REFLECTIONS_LEVEL_PARAM_SZ \ + (REVERB_REFLECTIONS_LEVEL_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_REFLECTIONS_DELAY_PARAM_SZ \ + (REVERB_REFLECTIONS_DELAY_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_LEVEL_PARAM_SZ \ + (REVERB_LEVEL_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_DELAY_PARAM_SZ \ + (REVERB_DELAY_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_DIFFUSION_PARAM_SZ \ + (REVERB_DIFFUSION_PARAM_LEN*sizeof(uint32_t)) +#define REVERB_DENSITY_PARAM_SZ \ + (REVERB_DENSITY_PARAM_LEN*sizeof(uint32_t)) struct reverb_params { - uint32_t device; - uint32_t enable_flag; - uint32_t mode; - uint32_t preset; - uint32_t wet_mix; - int32_t gain_adjust; - int32_t room_level; - int32_t room_hf_level; - uint32_t decay_time; - uint32_t decay_hf_ratio; - int32_t reflections_level; - uint32_t reflections_delay; - int32_t level; - uint32_t delay; - uint32_t diffusion; - uint32_t density; + uint32_t device; + uint32_t enable_flag; + uint32_t mode; + uint32_t preset; + uint32_t wet_mix; + int32_t gain_adjust; + int32_t room_level; + int32_t room_hf_level; + uint32_t decay_time; + uint32_t decay_hf_ratio; + int32_t reflections_level; + uint32_t reflections_delay; + int32_t level; + uint32_t delay; + uint32_t diffusion; + uint32_t density; }; -#define BASS_BOOST_ENABLE_PARAM_SZ (BASS_BOOST_ENABLE_PARAM_LEN * sizeof(uint32_t)) -#define BASS_BOOST_MODE_PARAM_SZ (BASS_BOOST_MODE_PARAM_LEN * sizeof(uint32_t)) -#define BASS_BOOST_STRENGTH_PARAM_SZ (BASS_BOOST_STRENGTH_PARAM_LEN * sizeof(uint32_t)) + +#define BASS_BOOST_ENABLE_PARAM_SZ \ + (BASS_BOOST_ENABLE_PARAM_LEN*sizeof(uint32_t)) +#define BASS_BOOST_MODE_PARAM_SZ \ + (BASS_BOOST_MODE_PARAM_LEN*sizeof(uint32_t)) +#define BASS_BOOST_STRENGTH_PARAM_SZ \ + (BASS_BOOST_STRENGTH_PARAM_LEN*sizeof(uint32_t)) struct bass_boost_params { - uint32_t device; - uint32_t enable_flag; - uint32_t mode; - uint32_t strength; + uint32_t device; + uint32_t enable_flag; + uint32_t mode; + uint32_t strength; }; + + #define MAX_EQ_BANDS 12 #define MAX_OSL_EQ_BANDS 5 -#define EQ_ENABLE_PARAM_SZ (EQ_ENABLE_PARAM_LEN * sizeof(uint32_t)) -#define EQ_CONFIG_PARAM_SZ (EQ_CONFIG_PARAM_LEN * sizeof(uint32_t)) -#define EQ_CONFIG_PER_BAND_PARAM_SZ (EQ_CONFIG_PER_BAND_PARAM_LEN * sizeof(uint32_t)) -#define EQ_CONFIG_PARAM_MAX_LEN (EQ_CONFIG_PARAM_LEN + MAX_EQ_BANDS * EQ_CONFIG_PER_BAND_PARAM_LEN) -#define EQ_CONFIG_PARAM_MAX_SZ (EQ_CONFIG_PARAM_MAX_LEN * sizeof(uint32_t)) -#define EQ_NUM_BANDS_PARAM_SZ (EQ_NUM_BANDS_PARAM_LEN * sizeof(uint32_t)) -#define EQ_BAND_LEVELS_PARAM_SZ (EQ_BAND_LEVELS_PARAM_LEN * sizeof(uint32_t)) -#define EQ_BAND_LEVEL_RANGE_PARAM_SZ (EQ_BAND_LEVEL_RANGE_PARAM_LEN * sizeof(uint32_t)) -#define EQ_BAND_FREQS_PARAM_SZ (EQ_BAND_FREQS_PARAM_LEN * sizeof(uint32_t)) -#define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_SZ (EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN * sizeof(uint32_t)) -#define EQ_SINGLE_BAND_FREQ_PARAM_SZ (EQ_SINGLE_BAND_FREQ_PARAM_LEN * sizeof(uint32_t)) -#define EQ_BAND_INDEX_PARAM_SZ (EQ_BAND_INDEX_PARAM_LEN * sizeof(uint32_t)) -#define EQ_PRESET_ID_PARAM_SZ (EQ_PRESET_ID_PARAM_LEN * sizeof(uint32_t)) -#define EQ_NUM_PRESETS_PARAM_SZ (EQ_NUM_PRESETS_PARAM_LEN * sizeof(uint8_t)) +#define EQ_ENABLE_PARAM_SZ \ + (EQ_ENABLE_PARAM_LEN*sizeof(uint32_t)) +#define EQ_CONFIG_PARAM_SZ \ + (EQ_CONFIG_PARAM_LEN*sizeof(uint32_t)) +#define EQ_CONFIG_PER_BAND_PARAM_SZ \ + (EQ_CONFIG_PER_BAND_PARAM_LEN*sizeof(uint32_t)) +#define EQ_CONFIG_PARAM_MAX_LEN (EQ_CONFIG_PARAM_LEN+\ + MAX_EQ_BANDS*EQ_CONFIG_PER_BAND_PARAM_LEN) +#define EQ_CONFIG_PARAM_MAX_SZ \ + (EQ_CONFIG_PARAM_MAX_LEN*sizeof(uint32_t)) +#define EQ_NUM_BANDS_PARAM_SZ \ + (EQ_NUM_BANDS_PARAM_LEN*sizeof(uint32_t)) +#define EQ_BAND_LEVELS_PARAM_SZ \ + (EQ_BAND_LEVELS_PARAM_LEN*sizeof(uint32_t)) +#define EQ_BAND_LEVEL_RANGE_PARAM_SZ \ + (EQ_BAND_LEVEL_RANGE_PARAM_LEN*sizeof(uint32_t)) +#define EQ_BAND_FREQS_PARAM_SZ \ + (EQ_BAND_FREQS_PARAM_LEN*sizeof(uint32_t)) +#define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_SZ \ + (EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN*sizeof(uint32_t)) +#define EQ_SINGLE_BAND_FREQ_PARAM_SZ \ + (EQ_SINGLE_BAND_FREQ_PARAM_LEN*sizeof(uint32_t)) +#define EQ_BAND_INDEX_PARAM_SZ \ + (EQ_BAND_INDEX_PARAM_LEN*sizeof(uint32_t)) +#define EQ_PRESET_ID_PARAM_SZ \ + (EQ_PRESET_ID_PARAM_LEN*sizeof(uint32_t)) +#define EQ_NUM_PRESETS_PARAM_SZ \ + (EQ_NUM_PRESETS_PARAM_LEN*sizeof(uint8_t)) struct eq_config_t { - int32_t eq_pregain; - int32_t preset_id; - uint32_t num_bands; + int32_t eq_pregain; + int32_t preset_id; + uint32_t num_bands; }; struct eq_per_band_config_t { - int32_t band_idx; - uint32_t filter_type; - uint32_t freq_millihertz; - int32_t gain_millibels; - uint32_t quality_factor; + int32_t band_idx; + uint32_t filter_type; + uint32_t freq_millihertz; + int32_t gain_millibels; + uint32_t quality_factor; }; struct eq_per_band_freq_range_t { - uint32_t band_index; - uint32_t min_freq_millihertz; - uint32_t max_freq_millihertz; + uint32_t band_index; + uint32_t min_freq_millihertz; + uint32_t max_freq_millihertz; }; + struct eq_params { - uint32_t device; - uint32_t enable_flag; - struct eq_config_t config; - struct eq_per_band_config_t per_band_cfg[MAX_EQ_BANDS]; - struct eq_per_band_freq_range_t per_band_freq_range[MAX_EQ_BANDS]; - uint32_t band_index; - uint32_t freq_millihertz; + uint32_t device; + uint32_t enable_flag; + struct eq_config_t config; + struct eq_per_band_config_t per_band_cfg[MAX_EQ_BANDS]; + struct eq_per_band_freq_range_t per_band_freq_range[MAX_EQ_BANDS]; + uint32_t band_index; + uint32_t freq_millihertz; }; -#define PBE_ENABLE_PARAM_SZ (PBE_ENABLE_PARAM_LEN * sizeof(uint32_t)) -#define PBE_CONFIG_PARAM_SZ (PBE_CONFIG_PARAM_LEN * sizeof(uint16_t)) + +#define PBE_ENABLE_PARAM_SZ \ + (PBE_ENABLE_PARAM_LEN*sizeof(uint32_t)) +#define PBE_CONFIG_PARAM_SZ \ + (PBE_CONFIG_PARAM_LEN*sizeof(uint16_t)) struct pbe_config_t { - int16_t real_bass_mix; - int16_t bass_color_control; - uint16_t main_chain_delay; - uint16_t xover_filter_order; - uint16_t bandpass_filter_order; - int16_t drc_delay; - uint16_t rms_tav; - int16_t exp_threshold; - uint16_t exp_slope; - int16_t comp_threshold; - uint16_t comp_slope; - uint16_t makeup_gain; - uint32_t comp_attack; - uint32_t comp_release; - uint32_t exp_attack; - uint32_t exp_release; - int16_t limiter_bass_threshold; - int16_t limiter_high_threshold; - int16_t limiter_bass_makeup_gain; - int16_t limiter_high_makeup_gain; - int16_t limiter_bass_gc; - int16_t limiter_high_gc; - int16_t limiter_delay; - uint16_t reserved; - int32_t p1LowPassCoeffs[5 * 2]; - int32_t p1HighPassCoeffs[5 * 2]; - int32_t p1BandPassCoeffs[5 * 3]; - int32_t p1BassShelfCoeffs[5]; - int32_t p1TrebleShelfCoeffs[5]; + int16_t real_bass_mix; + int16_t bass_color_control; + uint16_t main_chain_delay; + uint16_t xover_filter_order; + uint16_t bandpass_filter_order; + int16_t drc_delay; + uint16_t rms_tav; + int16_t exp_threshold; + uint16_t exp_slope; + int16_t comp_threshold; + uint16_t comp_slope; + uint16_t makeup_gain; + uint32_t comp_attack; + uint32_t comp_release; + uint32_t exp_attack; + uint32_t exp_release; + int16_t limiter_bass_threshold; + int16_t limiter_high_threshold; + int16_t limiter_bass_makeup_gain; + int16_t limiter_high_makeup_gain; + int16_t limiter_bass_gc; + int16_t limiter_high_gc; + int16_t limiter_delay; + uint16_t reserved; + /* place holder for filter coeffs to be followed */ + int32_t p1LowPassCoeffs[5*2]; + int32_t p1HighPassCoeffs[5*2]; + int32_t p1BandPassCoeffs[5*3]; + int32_t p1BassShelfCoeffs[5]; + int32_t p1TrebleShelfCoeffs[5]; } __attribute__((packed)); + struct pbe_params { - uint32_t device; - uint32_t enable_flag; - uint32_t cfg_len; - struct pbe_config_t config; + uint32_t device; + uint32_t enable_flag; + uint32_t cfg_len; + struct pbe_config_t config; }; -#define SOFT_VOLUME_ENABLE_PARAM_SZ (SOFT_VOLUME_ENABLE_PARAM_LEN * sizeof(uint32_t)) -#define SOFT_VOLUME_GAIN_MASTER_PARAM_SZ (SOFT_VOLUME_GAIN_MASTER_PARAM_LEN * sizeof(uint32_t)) -#define SOFT_VOLUME_GAIN_2CH_PARAM_SZ (SOFT_VOLUME_GAIN_2CH_PARAM_LEN * sizeof(uint16_t)) + +#define SOFT_VOLUME_ENABLE_PARAM_SZ \ + (SOFT_VOLUME_ENABLE_PARAM_LEN*sizeof(uint32_t)) +#define SOFT_VOLUME_GAIN_MASTER_PARAM_SZ \ + (SOFT_VOLUME_GAIN_MASTER_PARAM_LEN*sizeof(uint32_t)) +#define SOFT_VOLUME_GAIN_2CH_PARAM_SZ \ + (SOFT_VOLUME_GAIN_2CH_PARAM_LEN*sizeof(uint16_t)) struct soft_volume_params { - uint32_t device; - uint32_t enable_flag; - uint32_t master_gain; - uint32_t left_gain; - uint32_t right_gain; + uint32_t device; + uint32_t enable_flag; + uint32_t master_gain; + uint32_t left_gain; + uint32_t right_gain; }; + struct msm_nt_eff_all_config { - struct bass_boost_params bass_boost; - struct pbe_params pbe; - struct virtualizer_params virtualizer; - struct reverb_params reverb; - struct eq_params equalizer; - struct soft_volume_params saplus_vol; - struct soft_volume_params topo_switch_vol; + struct bass_boost_params bass_boost; + struct pbe_params pbe; + struct virtualizer_params virtualizer; + struct reverb_params reverb; + struct eq_params equalizer; + struct soft_volume_params saplus_vol; + struct soft_volume_params topo_switch_vol; }; -#endif +#endif /*_MSM_AUDIO_EFFECTS_H*/ diff --git a/sdm710/kernel-headers/sound/audio_slimslave.h b/sdm710/kernel-headers/sound/audio_slimslave.h new file mode 100644 index 00000000..316a5573 --- /dev/null +++ b/sdm710/kernel-headers/sound/audio_slimslave.h @@ -0,0 +1,18 @@ +#ifndef __AUDIO_SLIMSLAVE_H__ +#define __AUDIO_SLIMSLAVE_H__ + +#include <linux/types.h> +#include <linux/ioctl.h> + +#define AUDIO_SLIMSLAVE_IOCTL_NAME "audio_slimslave" +#define AUDIO_SLIMSLAVE_MAGIC 'S' + +#define AUDIO_SLIMSLAVE_IOCTL_UNVOTE _IO(AUDIO_SLIMSLAVE_MAGIC, 0x00) +#define AUDIO_SLIMSLAVE_IOCTL_VOTE _IO(AUDIO_SLIMSLAVE_MAGIC, 0x01) + +enum { + AUDIO_SLIMSLAVE_UNVOTE, + AUDIO_SLIMSLAVE_VOTE +}; + +#endif diff --git a/sdm710/kernel-headers/sound/devdep_params.h b/sdm710/kernel-headers/sound/devdep_params.h index cdbdba63..b4a185f7 100644 --- a/sdm710/kernel-headers/sound/devdep_params.h +++ b/sdm710/kernel-headers/sound/devdep_params.h @@ -1,71 +1,66 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _DEV_DEP_H #define _DEV_DEP_H + struct dolby_param_data { - int32_t version; - int32_t device_id; - int32_t be_id; - int32_t param_id; - int32_t length; - int32_t * data; + int32_t version; + int32_t device_id; + int32_t be_id; + int32_t param_id; + int32_t length; + int32_t *data; }; + struct dolby_param_license { - int32_t dmid; - int32_t license_key; + int32_t dmid; + int32_t license_key; }; -#define SNDRV_DEVDEP_DAP_IOCTL_SET_PARAM _IOWR('U', 0x10, struct dolby_param_data) -#define SNDRV_DEVDEP_DAP_IOCTL_GET_PARAM _IOR('U', 0x11, struct dolby_param_data) -#define SNDRV_DEVDEP_DAP_IOCTL_DAP_COMMAND _IOWR('U', 0x13, struct dolby_param_data) -#define SNDRV_DEVDEP_DAP_IOCTL_DAP_LICENSE _IOWR('U', 0x14, struct dolby_param_license) -#define SNDRV_DEVDEP_DAP_IOCTL_GET_VISUALIZER _IOR('U', 0x15, struct dolby_param_data) -#define DTS_EAGLE_MODULE 0x00005000 -#define DTS_EAGLE_MODULE_ENABLE 0x00005001 -#define EAGLE_DRIVER_ID 0xF2 -#define DTS_EAGLE_IOCTL_GET_CACHE_SIZE _IOR(EAGLE_DRIVER_ID, 0, int) -#define DTS_EAGLE_IOCTL_SET_CACHE_SIZE _IOW(EAGLE_DRIVER_ID, 1, int) -#define DTS_EAGLE_IOCTL_GET_PARAM _IOR(EAGLE_DRIVER_ID, 2, void *) -#define DTS_EAGLE_IOCTL_SET_PARAM _IOW(EAGLE_DRIVER_ID, 3, void *) -#define DTS_EAGLE_IOCTL_SET_CACHE_BLOCK _IOW(EAGLE_DRIVER_ID, 4, void *) -#define DTS_EAGLE_IOCTL_SET_ACTIVE_DEVICE _IOW(EAGLE_DRIVER_ID, 5, void *) -#define DTS_EAGLE_IOCTL_GET_LICENSE _IOR(EAGLE_DRIVER_ID, 6, void *) -#define DTS_EAGLE_IOCTL_SET_LICENSE _IOW(EAGLE_DRIVER_ID, 7, void *) -#define DTS_EAGLE_IOCTL_SEND_LICENSE _IOW(EAGLE_DRIVER_ID, 8, int) -#define DTS_EAGLE_IOCTL_SET_VOLUME_COMMANDS _IOW(EAGLE_DRIVER_ID, 9, void *) -#define DTS_EAGLE_FLAG_IOCTL_PRE (1 << 30) -#define DTS_EAGLE_FLAG_IOCTL_JUSTSETCACHE (1 << 31) -#define DTS_EAGLE_FLAG_IOCTL_GETFROMCORE DTS_EAGLE_FLAG_IOCTL_JUSTSETCACHE -#define DTS_EAGLE_FLAG_IOCTL_MASK (~(DTS_EAGLE_FLAG_IOCTL_PRE | DTS_EAGLE_FLAG_IOCTL_JUSTSETCACHE)) -#define DTS_EAGLE_FLAG_ALSA_GET (1 << 31) + +#define SNDRV_DEVDEP_DAP_IOCTL_SET_PARAM\ + _IOWR('U', 0x10, struct dolby_param_data) +#define SNDRV_DEVDEP_DAP_IOCTL_GET_PARAM\ + _IOR('U', 0x11, struct dolby_param_data) +#define SNDRV_DEVDEP_DAP_IOCTL_DAP_COMMAND\ + _IOWR('U', 0x13, struct dolby_param_data) +#define SNDRV_DEVDEP_DAP_IOCTL_DAP_LICENSE\ + _IOWR('U', 0x14, struct dolby_param_license) +#define SNDRV_DEVDEP_DAP_IOCTL_GET_VISUALIZER\ + _IOR('U', 0x15, struct dolby_param_data) + +#define DTS_EAGLE_MODULE 0x00005000 +#define DTS_EAGLE_MODULE_ENABLE 0x00005001 +#define EAGLE_DRIVER_ID 0xF2 +#define DTS_EAGLE_IOCTL_GET_CACHE_SIZE _IOR(EAGLE_DRIVER_ID, 0, int) +#define DTS_EAGLE_IOCTL_SET_CACHE_SIZE _IOW(EAGLE_DRIVER_ID, 1, int) +#define DTS_EAGLE_IOCTL_GET_PARAM _IOR(EAGLE_DRIVER_ID, 2, void*) +#define DTS_EAGLE_IOCTL_SET_PARAM _IOW(EAGLE_DRIVER_ID, 3, void*) +#define DTS_EAGLE_IOCTL_SET_CACHE_BLOCK _IOW(EAGLE_DRIVER_ID, 4, void*) +#define DTS_EAGLE_IOCTL_SET_ACTIVE_DEVICE _IOW(EAGLE_DRIVER_ID, 5, void*) +#define DTS_EAGLE_IOCTL_GET_LICENSE _IOR(EAGLE_DRIVER_ID, 6, void*) +#define DTS_EAGLE_IOCTL_SET_LICENSE _IOW(EAGLE_DRIVER_ID, 7, void*) +#define DTS_EAGLE_IOCTL_SEND_LICENSE _IOW(EAGLE_DRIVER_ID, 8, int) +#define DTS_EAGLE_IOCTL_SET_VOLUME_COMMANDS _IOW(EAGLE_DRIVER_ID, 9, void*) +#define DTS_EAGLE_FLAG_IOCTL_PRE (1<<30) +#define DTS_EAGLE_FLAG_IOCTL_JUSTSETCACHE (1<<31) +#define DTS_EAGLE_FLAG_IOCTL_GETFROMCORE DTS_EAGLE_FLAG_IOCTL_JUSTSETCACHE +#define DTS_EAGLE_FLAG_IOCTL_MASK (~(DTS_EAGLE_FLAG_IOCTL_PRE | \ + DTS_EAGLE_FLAG_IOCTL_JUSTSETCACHE)) +#define DTS_EAGLE_FLAG_ALSA_GET (1<<31) + struct dts_eagle_param_desc { - uint32_t id; - uint32_t size; - int32_t offset; - uint32_t device; + uint32_t id; + uint32_t size; + int32_t offset; + uint32_t device; } __attribute__((packed)); -#define HWDEP_FE_BASE 3000 + +#define HWDEP_FE_BASE 3000 /*unique base for FE hw dep nodes*/ struct snd_pcm_mmap_fd { - int32_t dir; - int32_t fd; - int32_t size; - int32_t actual_size; + int32_t dir; + int32_t fd; + int32_t size; + int32_t actual_size; }; -#define SNDRV_PCM_IOCTL_MMAP_DATA_FD _IOWR('U', 0xd2, struct snd_pcm_mmap_fd) -#endif +#define SNDRV_PCM_IOCTL_MMAP_DATA_FD _IOWR('U', 0xd2, struct snd_pcm_mmap_fd) + +#endif diff --git a/sdm710/kernel-headers/sound/lsm_params.h b/sdm710/kernel-headers/sound/lsm_params.h index 8502810d..50ec97a0 100644 --- a/sdm710/kernel-headers/sound/lsm_params.h +++ b/sdm710/kernel-headers/sound/lsm_params.h @@ -1,36 +1,26 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _LSM_PARAMS_H__ #define _LSM_PARAMS_H__ + #define LSM_POLLING_ENABLE_SUPPORT #define LSM_EVENT_TIMESTAMP_MODE_SUPPORT + #include <linux/types.h> #include <sound/asound.h> + #define SNDRV_LSM_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0) + #define LSM_OUT_FORMAT_PCM (0) #define LSM_OUT_FORMAT_ADPCM (1 << 0) + #define LSM_OUT_DATA_RAW (0) #define LSM_OUT_DATA_PACKED (1) + #define LSM_OUT_DATA_EVENTS_DISABLED (0) #define LSM_OUT_DATA_EVENTS_ENABLED (1) + #define LSM_OUT_TRANSFER_MODE_RT (0) #define LSM_OUT_TRANSFER_MODE_FTRT (1) + #define LSM_ENDPOINT_DETECT_THRESHOLD (0) #define LSM_OPERATION_MODE (1) #define LSM_GAIN (2) @@ -40,98 +30,171 @@ #define LSM_CUSTOM_PARAMS (6) #define LSM_POLLING_ENABLE (7) #define LSM_PARAMS_MAX (LSM_POLLING_ENABLE + 1) + #define LSM_EVENT_NON_TIME_STAMP_MODE (0) #define LSM_EVENT_TIME_STAMP_MODE (1) + enum lsm_app_id { - LSM_VOICE_WAKEUP_APP_ID = 1, - LSM_VOICE_WAKEUP_APP_ID_V2 = 2, + LSM_VOICE_WAKEUP_APP_ID = 1, + LSM_VOICE_WAKEUP_APP_ID_V2 = 2, }; + enum lsm_detection_mode { - LSM_MODE_KEYWORD_ONLY_DETECTION = 1, - LSM_MODE_USER_KEYWORD_DETECTION + LSM_MODE_KEYWORD_ONLY_DETECTION = 1, + LSM_MODE_USER_KEYWORD_DETECTION }; + enum lsm_vw_status { - LSM_VOICE_WAKEUP_STATUS_RUNNING = 1, - LSM_VOICE_WAKEUP_STATUS_DETECTED, - LSM_VOICE_WAKEUP_STATUS_END_SPEECH, - LSM_VOICE_WAKEUP_STATUS_REJECTED + LSM_VOICE_WAKEUP_STATUS_RUNNING = 1, + LSM_VOICE_WAKEUP_STATUS_DETECTED, + LSM_VOICE_WAKEUP_STATUS_END_SPEECH, + LSM_VOICE_WAKEUP_STATUS_REJECTED }; + +/* + * Data for LSM_ENDPOINT_DETECT_THRESHOLD param_type + * @epd_begin: Begin threshold + * @epd_end: End threshold + */ struct snd_lsm_ep_det_thres { - __u32 epd_begin; - __u32 epd_end; + __u32 epd_begin; + __u32 epd_end; }; + +/* + * Data for LSM_OPERATION_MODE param_type + * @mode: The detection mode to be used + * @detect_failure: Setting to enable failure detections. + */ struct snd_lsm_detect_mode { - enum lsm_detection_mode mode; - bool detect_failure; + enum lsm_detection_mode mode; + bool detect_failure; }; + +/* + * Data for LSM_GAIN param_type + * @gain: The gain to be applied on LSM + */ struct snd_lsm_gain { - __u16 gain; + __u16 gain; }; + +/* + * Data for LSM_POLLING_ENABLE param_type + * @poll_en: Polling enable or disable + */ struct snd_lsm_poll_enable { - bool poll_en; + bool poll_en; }; + + struct snd_lsm_sound_model_v2 { - __u8 * data; - __u8 * confidence_level; - __u32 data_size; - enum lsm_detection_mode detection_mode; - __u8 num_confidence_levels; - bool detect_failure; + __u8 *data; + __u8 *confidence_level; + __u32 data_size; + enum lsm_detection_mode detection_mode; + __u8 num_confidence_levels; + bool detect_failure; }; + struct snd_lsm_session_data { - enum lsm_app_id app_id; + enum lsm_app_id app_id; }; + struct snd_lsm_event_status { - __u16 status; - __u16 payload_size; - __u8 payload[0]; + __u16 status; + __u16 payload_size; + __u8 payload[0]; }; + struct snd_lsm_event_status_v3 { - __u32 timestamp_lsw; - __u32 timestamp_msw; - __u16 status; - __u16 payload_size; - __u8 payload[0]; + __u32 timestamp_lsw; + __u32 timestamp_msw; + __u16 status; + __u16 payload_size; + __u8 payload[0]; }; + struct snd_lsm_detection_params { - __u8 * conf_level; - enum lsm_detection_mode detect_mode; - __u8 num_confidence_levels; - bool detect_failure; - bool poll_enable; + __u8 *conf_level; + enum lsm_detection_mode detect_mode; + __u8 num_confidence_levels; + bool detect_failure; + bool poll_enable; }; + +/* + * Param info for each parameter type + * @module_id: Module to which parameter is to be set + * @param_id: Parameter that is to be set + * @param_size: size (in number of bytes) for the data + * in param_data. + * For confidence levels, this is num_conf_levels + * For REG_SND_MODEL, this is size of sound model + * For CUSTOM_PARAMS, this is size of the entire blob of data + * @param_data: Data for the parameter. + * For some param_types this is a structure defined, ex: LSM_GAIN + * For CONFIDENCE_LEVELS, this is array of confidence levels + * For REG_SND_MODEL, this is the sound model data + * For CUSTOM_PARAMS, this is the blob of custom data. + */ struct lsm_params_info { - __u32 module_id; - __u32 param_id; - __u32 param_size; - __u8 * param_data; - uint32_t param_type; + __u32 module_id; + __u32 param_id; + __u32 param_size; + __u8 *param_data; + uint32_t param_type; }; + +/* + * Data passed to the SET_PARAM_V2 IOCTL + * @num_params: Number of params that are to be set + * should not be greater than LSM_PARAMS_MAX + * @params: Points to an array of lsm_params_info + * Each entry points to one parameter to set + * @data_size: size (in bytes) for params + * should be equal to + * num_params * sizeof(struct lsm_parms_info) + */ struct snd_lsm_module_params { - __u8 * params; - __u32 num_params; - __u32 data_size; + __u8 *params; + __u32 num_params; + __u32 data_size; }; + +/* + * Data passed to LSM_OUT_FORMAT_CFG IOCTL + * @format: The media format enum + * @packing: indicates the packing method used for data path + * @events: indicates whether data path events need to be enabled + * @transfer_mode: indicates whether FTRT mode or RT mode. + */ struct snd_lsm_output_format_cfg { - __u8 format; - __u8 packing; - __u8 events; - __u8 mode; + __u8 format; + __u8 packing; + __u8 events; + __u8 mode; }; + #define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int) -#define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status) -#define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int) -#define SNDRV_LSM_START _IOW('U', 0x04, int) -#define SNDRV_LSM_STOP _IOW('U', 0x05, int) +#define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status) +#define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int) +#define SNDRV_LSM_START _IOW('U', 0x04, int) +#define SNDRV_LSM_STOP _IOW('U', 0x05, int) #define SNDRV_LSM_SET_SESSION_DATA _IOW('U', 0x06, struct snd_lsm_session_data) -#define SNDRV_LSM_REG_SND_MODEL_V2 _IOW('U', 0x07, struct snd_lsm_sound_model_v2) -#define SNDRV_LSM_LAB_CONTROL _IOW('U', 0x08, uint32_t) -#define SNDRV_LSM_STOP_LAB _IO('U', 0x09) -#define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A, struct snd_lsm_detection_params) -#define SNDRV_LSM_SET_MODULE_PARAMS _IOW('U', 0x0B, struct snd_lsm_module_params) -#define SNDRV_LSM_OUT_FORMAT_CFG _IOW('U', 0x0C, struct snd_lsm_output_format_cfg) -#define SNDRV_LSM_SET_PORT _IO('U', 0x0D) -#define SNDRV_LSM_SET_FWK_MODE_CONFIG _IOW('U', 0x0E, uint32_t) -#define SNDRV_LSM_EVENT_STATUS_V3 _IOW('U', 0x0F, struct snd_lsm_event_status_v3) -#endif +#define SNDRV_LSM_REG_SND_MODEL_V2 _IOW('U', 0x07,\ + struct snd_lsm_sound_model_v2) +#define SNDRV_LSM_LAB_CONTROL _IOW('U', 0x08, uint32_t) +#define SNDRV_LSM_STOP_LAB _IO('U', 0x09) +#define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A, \ + struct snd_lsm_detection_params) +#define SNDRV_LSM_SET_MODULE_PARAMS _IOW('U', 0x0B, \ + struct snd_lsm_module_params) +#define SNDRV_LSM_OUT_FORMAT_CFG _IOW('U', 0x0C, \ + struct snd_lsm_output_format_cfg) +#define SNDRV_LSM_SET_PORT _IO('U', 0x0D) +#define SNDRV_LSM_SET_FWK_MODE_CONFIG _IOW('U', 0x0E, uint32_t) +#define SNDRV_LSM_EVENT_STATUS_V3 _IOW('U', 0x0F, \ + struct snd_lsm_event_status_v3) +#endif diff --git a/sdm710/kernel-headers/sound/msmcal-hwdep.h b/sdm710/kernel-headers/sound/msmcal-hwdep.h index 1cb2c3fc..b9c801d4 100644 --- a/sdm710/kernel-headers/sound/msmcal-hwdep.h +++ b/sdm710/kernel-headers/sound/msmcal-hwdep.h @@ -1,40 +1,26 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _CALIB_HWDEP_H #define _CALIB_HWDEP_H -#define WCD9XXX_CODEC_HWDEP_NODE 1000 + +#define WCD9XXX_CODEC_HWDEP_NODE 1000 enum wcd_cal_type { - WCD9XXX_MIN_CAL, - WCD9XXX_ANC_CAL = WCD9XXX_MIN_CAL, - WCD9XXX_MAD_CAL, - WCD9XXX_MBHC_CAL, - WCD9XXX_VBAT_CAL, - BG_CODEC_MIC_CAL, - BG_CODEC_SPEAKER_CAL, - WCD9XXX_MAX_CAL, + WCD9XXX_MIN_CAL, + WCD9XXX_ANC_CAL = WCD9XXX_MIN_CAL, + WCD9XXX_MAD_CAL, + WCD9XXX_MBHC_CAL, + WCD9XXX_VBAT_CAL, + BG_CODEC_MIC_CAL, + BG_CODEC_SPEAKER_CAL, + WCD9XXX_MAX_CAL, }; + #define BG_CAL_SUPPORT BG_CODEC_SPEAKER_CAL struct wcdcal_ioctl_buffer { - __u32 size; - __u8 * buffer; - enum wcd_cal_type cal_type; + __u32 size; + __u8 *buffer; + enum wcd_cal_type cal_type; }; -#define SNDRV_CTL_IOCTL_HWDEP_CAL_TYPE _IOW('U', 0x1, struct wcdcal_ioctl_buffer) -#endif +#define SNDRV_CTL_IOCTL_HWDEP_CAL_TYPE \ + _IOW('U', 0x1, struct wcdcal_ioctl_buffer) + +#endif /*_CALIB_HWDEP_H*/ diff --git a/sdm710/kernel-headers/sound/voice_params.h b/sdm710/kernel-headers/sound/voice_params.h index 565177ff..43e3b9d0 100644 --- a/sdm710/kernel-headers/sound/voice_params.h +++ b/sdm710/kernel-headers/sound/voice_params.h @@ -1,29 +1,14 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef __VOICE_PARAMS_H__ #define __VOICE_PARAMS_H__ + #include <linux/types.h> #include <sound/asound.h> + enum voice_lch_mode { - VOICE_LCH_START = 1, - VOICE_LCH_STOP + VOICE_LCH_START = 1, + VOICE_LCH_STOP }; + #define SNDRV_VOICE_IOCTL_LCH _IOW('U', 0x00, enum voice_lch_mode) -#endif +#endif diff --git a/sdm710/kernel-headers/sound/wcd-dsp-glink.h b/sdm710/kernel-headers/sound/wcd-dsp-glink.h index d00744c2..39d128d3 100644 --- a/sdm710/kernel-headers/sound/wcd-dsp-glink.h +++ b/sdm710/kernel-headers/sound/wcd-dsp-glink.h @@ -1,49 +1,60 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ #ifndef _WCD_DSP_GLINK_H #define _WCD_DSP_GLINK_H + #include <linux/types.h> + #define WDSP_CH_NAME_MAX_LEN 50 + enum { - WDSP_REG_PKT = 1, - WDSP_CMD_PKT, - WDSP_READY_PKT, + WDSP_REG_PKT = 1, + WDSP_CMD_PKT, + WDSP_READY_PKT, }; #define WDSP_READY_PKT WDSP_READY_PKT + +/* + * struct wdsp_reg_pkt - Glink channel information structure format + * @no_of_channels: Number of glink channels to open + * @payload[0]: Dynamic array contains all the glink channels information + */ struct wdsp_reg_pkt { - __u8 no_of_channels; - __u8 payload[0]; + __u8 no_of_channels; + __u8 payload[0]; }; + +/* + * struct wdsp_cmd_pkt - WDSP command packet format + * @ch_name: Name of the glink channel + * @payload_size: Size of the payload + * @payload[0]: Actual data payload + */ struct wdsp_cmd_pkt { - char ch_name[WDSP_CH_NAME_MAX_LEN]; - __u32 payload_size; - __u8 payload[0]; + char ch_name[WDSP_CH_NAME_MAX_LEN]; + __u32 payload_size; + __u8 payload[0]; }; + +/* + * struct wdsp_write_pkt - Format that userspace send the data to driver. + * @pkt_type: Type of the packet(REG or CMD PKT) + * @payload[0]: Payload is either cmd or reg pkt structure based on pkt type + */ struct wdsp_write_pkt { - __u8 pkt_type; - __u8 payload[0]; + __u8 pkt_type; + __u8 payload[0]; }; + +/* + * struct wdsp_glink_ch_cfg - Defines the glink channel configuration. + * @ch_name: Name of the glink channel + * @latency_in_us: Latency specified in micro seconds for QOS + * @no_of_intents: Number of intents prequeued + * @intents_size[0]: Dynamic array to specify size of each intent + */ struct wdsp_glink_ch_cfg { - char name[WDSP_CH_NAME_MAX_LEN]; - __u32 latency_in_us; - __u32 no_of_intents; - __u32 intents_size[0]; + char name[WDSP_CH_NAME_MAX_LEN]; + __u32 latency_in_us; + __u32 no_of_intents; + __u32 intents_size[0]; }; -#endif - +#endif /* _WCD_DSP_GLINK_H */ |