1772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* include/linux/msm_audio.h 2772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * 3772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * Copyright (C) 2008 Google, Inc. 4464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry * Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved. 5772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * 6772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * This software is licensed under the terms of the GNU General Public 7772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * License version 2, as published by the Free Software Foundation, and 8772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * may be copied, distributed, and modified under those terms. 9772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * 10772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * This program is distributed in the hope that it will be useful, 11772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * but WITHOUT ANY WARRANTY; without even the implied warranty of 12772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * GNU General Public License for more details. 14772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * 15772b7facf972926b14fe303d0348c200cb20a313Prashant Malani */ 16772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 17772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#ifndef _UAPI_LINUX_MSM_AUDIO_H 18772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define _UAPI_LINUX_MSM_AUDIO_H 19772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 20772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#include <linux/types.h> 21772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#include <linux/ioctl.h> 22772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 23772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* PCM Audio */ 24772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 25772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_IOCTL_MAGIC 'a' 26772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 27772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned) 28772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned) 29772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned) 30772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, \ 31772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_config) 32772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, \ 33772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_config) 34772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, \ 35772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_stats) 36772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned) 37772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned) 38772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned) 39772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned) 40772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned) 41772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_PAUSE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned) 42772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_PLAY_DTMF _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned) 43772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_EVENT _IOR(AUDIO_IOCTL_MAGIC, 13, \ 44772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_event) 45772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ABORT_GET_EVENT _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned) 46772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_REGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 15, unsigned) 47772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_DEREGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 16, unsigned) 48772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ASYNC_WRITE _IOW(AUDIO_IOCTL_MAGIC, 17, \ 49772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_aio_buf) 50772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ASYNC_READ _IOW(AUDIO_IOCTL_MAGIC, 18, \ 51772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_aio_buf) 52772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_INCALL _IOW(AUDIO_IOCTL_MAGIC, 19, struct msm_voicerec_mode) 53772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_NUM_SND_DEVICE _IOR(AUDIO_IOCTL_MAGIC, 20, unsigned) 54772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_SND_DEVICES _IOWR(AUDIO_IOCTL_MAGIC, 21, \ 55772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_snd_device_list) 56772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ENABLE_SND_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 22, unsigned) 57772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_DISABLE_SND_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 23, unsigned) 58772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ROUTE_STREAM _IOW(AUDIO_IOCTL_MAGIC, 24, \ 59772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_route_config) 60772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_PCM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 30, unsigned) 61772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_PCM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 31, unsigned) 62772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SWITCH_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned) 63772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_MUTE _IOW(AUDIO_IOCTL_MAGIC, 33, unsigned) 64772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_UPDATE_ACDB _IOW(AUDIO_IOCTL_MAGIC, 34, unsigned) 65772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_START_VOICE _IOW(AUDIO_IOCTL_MAGIC, 35, unsigned) 66772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_STOP_VOICE _IOW(AUDIO_IOCTL_MAGIC, 36, unsigned) 67772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_REINIT_ACDB _IOW(AUDIO_IOCTL_MAGIC, 39, unsigned) 68772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_OUTPORT_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 40, unsigned short) 69772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_ERR_THRESHOLD_VALUE _IOW(AUDIO_IOCTL_MAGIC, 41, \ 70772b7facf972926b14fe303d0348c200cb20a313Prashant Malani unsigned short) 71772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_BITSTREAM_ERROR_INFO _IOR(AUDIO_IOCTL_MAGIC, 42, \ 72772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_bitstream_error_info) 73772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 74772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_SRS_TRUMEDIA_PARAM _IOW(AUDIO_IOCTL_MAGIC, 43, unsigned) 75772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 76772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* Qualcomm extensions */ 77772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_STREAM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 80, \ 78772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_stream_config) 79772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_STREAM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 81, \ 80772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_stream_config) 81772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_SESSION_ID _IOR(AUDIO_IOCTL_MAGIC, 82, unsigned short) 82772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_STREAM_INFO _IOR(AUDIO_IOCTL_MAGIC, 83, \ 83772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_bitstream_info) 84772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_PAN _IOW(AUDIO_IOCTL_MAGIC, 84, unsigned) 85772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_QCONCERT_PLUS _IOW(AUDIO_IOCTL_MAGIC, 85, unsigned) 86772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_MBADRC _IOW(AUDIO_IOCTL_MAGIC, 86, unsigned) 87772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_VOLUME_PATH _IOW(AUDIO_IOCTL_MAGIC, 87, \ 88772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_vol_info) 89772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_MAX_VOL_ALL _IOW(AUDIO_IOCTL_MAGIC, 88, unsigned) 90772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 89, unsigned) 91772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 90, unsigned) 92772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 91, unsigned) 93772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 92, unsigned) 94772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_BUF_CFG _IOW(AUDIO_IOCTL_MAGIC, 93, \ 95772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_buf_cfg) 96772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_BUF_CFG _IOW(AUDIO_IOCTL_MAGIC, 94, \ 97772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_buf_cfg) 98772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_SET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 95, \ 99772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_acdb_cmd_device) 100772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_GET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 96, \ 101772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_acdb_cmd_device) 102772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 103772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_REGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 97, \ 104772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_ion_info) 105772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_DEREGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 98, \ 106772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_ion_info) 107464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_SET_EFFECTS_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 99, \ 108464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry struct msm_hwacc_effects_config) 109464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_EFFECTS_SET_BUF_LEN _IOW(AUDIO_IOCTL_MAGIC, 100, \ 110464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry struct msm_hwacc_buf_cfg) 111464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_EFFECTS_GET_BUF_AVAIL _IOW(AUDIO_IOCTL_MAGIC, 101, \ 112464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry struct msm_hwacc_buf_avail) 113464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_EFFECTS_WRITE _IOW(AUDIO_IOCTL_MAGIC, 102, void *) 114464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_EFFECTS_READ _IOWR(AUDIO_IOCTL_MAGIC, 103, void *) 115464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_EFFECTS_SET_PP_PARAMS _IOW(AUDIO_IOCTL_MAGIC, 104, void *) 116772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 117464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_PM_AWAKE _IOW(AUDIO_IOCTL_MAGIC, 105, unsigned) 118464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_PM_RELAX _IOW(AUDIO_IOCTL_MAGIC, 106, unsigned) 119464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry 120464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define AUDIO_MAX_COMMON_IOCTL_NUM 107 121772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 122772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 123772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HANDSET_MIC 0x01 124772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HANDSET_SPKR 0x02 125772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_MIC 0x03 126772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_SPKR_MONO 0x04 127772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_SPKR_STEREO 0x05 128772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SPKR_PHONE_MIC 0x06 129772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SPKR_PHONE_MONO 0x07 130772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SPKR_PHONE_STEREO 0x08 131772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define BT_SCO_MIC 0x09 132772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define BT_SCO_SPKR 0x0A 133772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define BT_A2DP_SPKR 0x0B 134772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define TTY_HEADSET_MIC 0x0C 135772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define TTY_HEADSET_SPKR 0x0D 136772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 137772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* Default devices are not supported in a */ 138772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* device switching context. Only supported */ 139772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* for stream devices. */ 140772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* DO NOT USE */ 141772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define DEFAULT_TX 0x0E 142772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define DEFAULT_RX 0x0F 143772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 144772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define BT_A2DP_TX 0x10 145772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 146772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_MONO_PLUS_SPKR_MONO_RX 0x11 147772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_MONO_PLUS_SPKR_STEREO_RX 0x12 148772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_STEREO_PLUS_SPKR_MONO_RX 0x13 149772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define HEADSET_STEREO_PLUS_SPKR_STEREO_RX 0x14 150772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 151772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define I2S_RX 0x20 152772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define I2S_TX 0x21 153772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 154772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define ADRC_ENABLE 0x0001 155464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define EQUALIZER_ENABLE 0x0002 156772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define IIR_ENABLE 0x0004 157772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define QCONCERT_PLUS_ENABLE 0x0008 158772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define MBADRC_ENABLE 0x0010 159772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SRS_ENABLE 0x0020 160772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SRS_DISABLE 0x0040 161772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 162772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AGC_ENABLE 0x0001 163772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define NS_ENABLE 0x0002 164772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define TX_IIR_ENABLE 0x0004 165772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define FLUENCE_ENABLE 0x0008 166772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 167772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define VOC_REC_UPLINK 0x00 168772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define VOC_REC_DOWNLINK 0x01 169772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define VOC_REC_BOTH 0x02 170772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 171772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_config { 172772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buffer_size; 173772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buffer_count; 174772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t channel_count; 175772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t sample_rate; 176772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t type; 177772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t meta_field; 178772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t bits; 179772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t unused[3]; 180772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 181772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 182772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_stream_config { 183772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buffer_size; 184772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buffer_count; 185772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 186772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 187772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_buf_cfg{ 188772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t meta_info_enable; 189772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t frames_per_buf; 190772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 191772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 192772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_stats { 193772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t byte_count; 194772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t sample_count; 195772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t unused[2]; 196772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 197772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 198772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_ion_info { 199772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int fd; 200772b7facf972926b14fe303d0348c200cb20a313Prashant Malani void *vaddr; 201772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 202772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 203772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_pmem_info { 204772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int fd; 205772b7facf972926b14fe303d0348c200cb20a313Prashant Malani void *vaddr; 206772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 207772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 208772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_aio_buf { 209772b7facf972926b14fe303d0348c200cb20a313Prashant Malani void *buf_addr; 210772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buf_len; 211772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t data_len; 212772b7facf972926b14fe303d0348c200cb20a313Prashant Malani void *private_data; 213772b7facf972926b14fe303d0348c200cb20a313Prashant Malani unsigned short mfield_sz; /*only useful for data has meta field */ 214772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 215772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 216772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* Audio routing */ 217772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 218772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_IOCTL_MAGIC 's' 219772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 220772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_MUTE_UNMUTED 0 221772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_MUTE_MUTED 1 222772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 223772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_mute_info { 224772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t mute; 225772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t path; 226772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 227772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 228772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_vol_info { 229772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t vol; 230772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t path; 231772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 232772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 233772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_voicerec_mode { 234772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t rec_mode; 235772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 236772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 237772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_snd_device_config { 238772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t device; 239772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t ear_mute; 240772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t mic_mute; 241772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 242772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 243772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *) 244772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 245772b7facf972926b14fe303d0348c200cb20a313Prashant Malanienum cad_device_path_type { 246772b7facf972926b14fe303d0348c200cb20a313Prashant Malani CAD_DEVICE_PATH_RX, /*For Decoding session*/ 247772b7facf972926b14fe303d0348c200cb20a313Prashant Malani CAD_DEVICE_PATH_TX, /* For Encoding session*/ 248772b7facf972926b14fe303d0348c200cb20a313Prashant Malani CAD_DEVICE_PATH_RX_TX, /* For Voice call */ 249772b7facf972926b14fe303d0348c200cb20a313Prashant Malani CAD_DEVICE_PATH_LB, /* For loopback (FM Analog)*/ 250772b7facf972926b14fe303d0348c200cb20a313Prashant Malani CAD_DEVICE_PATH_MAX 251772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 252772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 253772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct cad_devices_type { 254772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t rx_device; 255772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t tx_device; 256772b7facf972926b14fe303d0348c200cb20a313Prashant Malani enum cad_device_path_type pathtype; 257772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 258772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 259772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_cad_device_config { 260772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct cad_devices_type device; 261772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t ear_mute; 262772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t mic_mute; 263772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 264772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 265772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define CAD_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_cad_device_config *) 266772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 267772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_METHOD_VOICE 0 268772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_METHOD_MIDI 4 269772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 270772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_snd_volume_config { 271772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t device; 272772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t method; 273772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t volume; 274772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 275772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 276772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *) 277772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 278772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_cad_volume_config { 279772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct cad_devices_type device; 280772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t method; 281772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t volume; 282772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 283772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 284772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define CAD_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_cad_volume_config *) 285772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 286772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* Returns the number of SND endpoints supported. */ 287772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 288772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *) 289772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 290772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_snd_endpoint { 291772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int id; /* input and output */ 292772b7facf972926b14fe303d0348c200cb20a313Prashant Malani char name[64]; /* output only */ 293772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 294772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 295772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* Takes an index between 0 and one less than the number returned by 296772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * SND_GET_NUM_ENDPOINTS, and returns the SND index and name of a 297772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * SND endpoint. On input, the .id field contains the number of the 298772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * endpoint, and on exit it contains the SND index, while .name contains 299772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * the description of the endpoint. 300772b7facf972926b14fe303d0348c200cb20a313Prashant Malani */ 301772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 302772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *) 303772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 304772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 305772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_AVC_CTL _IOW(SND_IOCTL_MAGIC, 6, unsigned *) 306772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_AGC_CTL _IOW(SND_IOCTL_MAGIC, 7, unsigned *) 307772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 308772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/*return the number of CAD endpoints supported. */ 309772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 310772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define CAD_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *) 311772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 312772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_cad_endpoint { 313772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int id; /* input and output */ 314772b7facf972926b14fe303d0348c200cb20a313Prashant Malani char name[64]; /* output only */ 315772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 316772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 317772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* Takes an index between 0 and one less than the number returned by 318772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * SND_GET_NUM_ENDPOINTS, and returns the CAD index and name of a 319772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * CAD endpoint. On input, the .id field contains the number of the 320772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * endpoint, and on exit it contains the SND index, while .name contains 321772b7facf972926b14fe303d0348c200cb20a313Prashant Malani * the description of the endpoint. 322772b7facf972926b14fe303d0348c200cb20a313Prashant Malani */ 323772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 324772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define CAD_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_cad_endpoint *) 325772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 326772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_pcm_config { 327772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t pcm_feedback; /* 0 - disable > 0 - enable */ 328772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buffer_count; /* Number of buffers to allocate */ 329772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t buffer_size; /* Size of buffer for capturing of 330772b7facf972926b14fe303d0348c200cb20a313Prashant Malani PCM samples */ 331772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 332772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 333772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_EVENT_SUSPEND 0 334772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_EVENT_RESUME 1 335772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_EVENT_WRITE_DONE 2 336772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_EVENT_READ_DONE 3 337772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_EVENT_STREAM_INFO 4 338772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_EVENT_BITSTREAM_ERROR_INFO 5 339772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 340772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_CODEC_TYPE_MP3 0 341772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_CODEC_TYPE_AAC 1 342772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 343772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_bitstream_info { 344772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t codec_type; 345772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t chan_info; 346772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t sample_rate; 347772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t bit_stream_info; 348772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t bit_rate; 349772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t unused[3]; 350772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 351772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 352772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_bitstream_error_info { 353772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t dec_id; 354772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t err_msg_indicator; 355772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t err_type; 356772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 357772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 358772b7facf972926b14fe303d0348c200cb20a313Prashant Malaniunion msm_audio_event_payload { 359772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_aio_buf aio_buf; 360772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_bitstream_info stream_info; 361772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_bitstream_error_info error_info; 362772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int reserved; 363772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 364772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 365772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_event { 366772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int event_type; 367772b7facf972926b14fe303d0348c200cb20a313Prashant Malani int timeout_ms; 368772b7facf972926b14fe303d0348c200cb20a313Prashant Malani union msm_audio_event_payload event_payload; 369772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 370772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 371772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define MSM_SNDDEV_CAP_RX 0x1 372772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define MSM_SNDDEV_CAP_TX 0x2 373772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define MSM_SNDDEV_CAP_VOICE 0x4 374772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 375772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_snd_device_info { 376772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t dev_id; 377772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t dev_cap; /* bitmask describe capability of device */ 378772b7facf972926b14fe303d0348c200cb20a313Prashant Malani char dev_name[64]; 379772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 380772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 381772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_snd_device_list { 382772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t num_dev; /* Indicate number of device info to be retrieved */ 383772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_snd_device_info *list; 384772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 385772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 386772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_dtmf_config { 387772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t path; 388772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t dtmf_hi; 389772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t dtmf_low; 390772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t duration; 391772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t tx_gain; 392772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t rx_gain; 393772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t mixing; 394772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 395772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 396772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ROUTE_STREAM_VOICE_RX 0 397772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ROUTE_STREAM_VOICE_TX 1 398772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ROUTE_STREAM_PLAYBACK 2 399772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_ROUTE_STREAM_REC 3 400772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 401772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_route_config { 402772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t stream_type; 403772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t stream_id; 404772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t dev_id; 405772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 406772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 407772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define AUDIO_MAX_EQ_BANDS 12 408772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 409772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_eq_band { 410772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint16_t band_idx; /* The band index, 0 .. 11 */ 411772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t filter_type; /* Filter band type */ 412772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t center_freq_hz; /* Filter band center frequency */ 413772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t filter_gain; /* Filter band initial gain (dB) */ 414772b7facf972926b14fe303d0348c200cb20a313Prashant Malani /* Range is +12 dB to -12 dB with 1dB increments. */ 415772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t q_factor; 416772b7facf972926b14fe303d0348c200cb20a313Prashant Malani} __attribute__ ((packed)); 417772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 418772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_audio_eq_stream_config { 419772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t enable; /* Number of consequtive bands specified */ 420772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t num_bands; 421772b7facf972926b14fe303d0348c200cb20a313Prashant Malani struct msm_audio_eq_band eq_bands[AUDIO_MAX_EQ_BANDS]; 422772b7facf972926b14fe303d0348c200cb20a313Prashant Malani} __attribute__ ((packed)); 423772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 424772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct msm_acdb_cmd_device { 425772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t command_id; 426772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t device_id; 427772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t network_id; 428772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t sample_rate_id; /* Actual sample rate value */ 429772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t interface_id; /* See interface id's above */ 430772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t algorithm_block_id; /* See enumerations above */ 431772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t total_bytes; /* Length in bytes used by buffer */ 432772b7facf972926b14fe303d0348c200cb20a313Prashant Malani uint32_t *phys_buf; /* Physical Address of data */ 433772b7facf972926b14fe303d0348c200cb20a313Prashant Malani}; 434772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 435464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherrystruct msm_hwacc_data_config { 436464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 buf_size; 437464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 num_buf; 438464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 num_channels; 439464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u8 channel_map[8]; 440464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 sample_rate; 441464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 bits_per_sample; 442464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry}; 443464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry 444464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherrystruct msm_hwacc_buf_cfg { 445464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 input_len; 446464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 output_len; 447464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry}; 448464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry 449464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherrystruct msm_hwacc_buf_avail { 450464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 input_num_avail; 451464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 output_num_avail; 452464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry}; 453464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry 454464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherrystruct msm_hwacc_effects_config { 455464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry struct msm_hwacc_data_config input; 456464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry struct msm_hwacc_data_config output; 457464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry struct msm_hwacc_buf_cfg buf_cfg; 458464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 meta_mode_enabled; 459464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __u32 overwrite_topology; 460464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry __s32 topology; 461464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry}; 462772b7facf972926b14fe303d0348c200cb20a313Prashant Malani 463772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#endif 464