Merge "audio-kernel: remove unused uapi headers"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
8b0e3889df
19
Android.bp
19
Android.bp
@@ -3,26 +3,7 @@ headers_src = [
|
||||
]
|
||||
|
||||
audio_headers_out = [
|
||||
"linux/avtimer.h",
|
||||
"linux/msm_audio.h",
|
||||
"linux/msm_audio_aac.h",
|
||||
"linux/msm_audio_ac3.h",
|
||||
"linux/msm_audio_alac.h",
|
||||
"linux/msm_audio_amrnb.h",
|
||||
"linux/msm_audio_amrwb.h",
|
||||
"linux/msm_audio_amrwbplus.h",
|
||||
"linux/msm_audio_ape.h",
|
||||
"linux/msm_audio_calibration.h",
|
||||
"linux/msm_audio_g711.h",
|
||||
"linux/msm_audio_g711_dec.h",
|
||||
"linux/msm_audio_mvs.h",
|
||||
"linux/msm_audio_qcp.h",
|
||||
"linux/msm_audio_sbc.h",
|
||||
"linux/msm_audio_voicememo.h",
|
||||
"linux/msm_audio_wma.h",
|
||||
"linux/msm_audio_wmapro.h",
|
||||
"linux/wcd-spi-ac-params.h",
|
||||
"sound/audio_compressed_formats.h",
|
||||
"sound/audio_effects.h",
|
||||
"sound/audio_slimslave.h",
|
||||
"sound/devdep_params.h",
|
||||
|
@@ -13,7 +13,6 @@
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <dsp/apr_audio-v2.h>
|
||||
#include <bindings/qcom,audio-ext-clk.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
@@ -59,7 +58,7 @@ struct audio_ext_clk {
|
||||
struct audio_ext_clk_priv {
|
||||
struct device *dev;
|
||||
int clk_src;
|
||||
struct afe_clk_set clk_cfg;
|
||||
uint32_t enable;
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
struct clk_cfg prm_clk_cfg;
|
||||
#endif
|
||||
@@ -82,21 +81,22 @@ static int audio_ext_clk_prepare(struct clk_hw *hw)
|
||||
static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1);
|
||||
|
||||
if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) &&
|
||||
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX) && !clk_priv->clk_cfg.enable) {
|
||||
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX) && !clk_priv->enable) {
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: clk_id %x ",__func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
pr_debug("%s: clk_id %x ", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
trace_printk("%s: clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_clk_cfg(&clk_priv->prm_clk_cfg,1);
|
||||
#else
|
||||
ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg);
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
if (__ratelimit(&rtl))
|
||||
pr_err_ratelimited("%s afe_set_digital_codec_core_clock failed\n",
|
||||
pr_err_ratelimited("%s prm set lpass clk failed\n",
|
||||
__func__);
|
||||
return ret;
|
||||
}
|
||||
clk_priv->clk_cfg.enable = 1;
|
||||
clk_priv->enable = 1;
|
||||
}
|
||||
|
||||
if (pnctrl_info->pinctrl) {
|
||||
@@ -133,18 +133,19 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw)
|
||||
|
||||
if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) &&
|
||||
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) {
|
||||
clk_priv->clk_cfg.enable = 0;
|
||||
clk_priv->enable = 0;
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: clk_id %x",__func__,
|
||||
pr_debug("%s: clk_id %x", __func__,
|
||||
clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_clk_cfg(&clk_priv->prm_clk_cfg,0);
|
||||
ret = audio_prm_set_lpass_clk_cfg(&clk_priv->prm_clk_cfg, 0);
|
||||
trace_printk("%s: clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg);
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
if (__ratelimit(&rtl))
|
||||
pr_err_ratelimited("%s: afe_set_lpass_clk_cfg failed, ret = %d\n",
|
||||
pr_err_ratelimited("%s: unset lpass clk cfg failed, ret = %d\n",
|
||||
__func__, ret);
|
||||
}
|
||||
}
|
||||
@@ -179,14 +180,13 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw)
|
||||
|
||||
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_CORE_HW_VOTE) {
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: core vote clk_id %x \n",__func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
pr_debug("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_LPASS, 1);
|
||||
trace_printk("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
ret = afe_vote_lpass_core_hw(AFE_LPASS_CORE_HW_MACRO_BLOCK,
|
||||
"LPASS_HW_MACRO",
|
||||
&clk_priv->lpass_core_hwvote_client_handle);
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
if (__ratelimit(&rtl))
|
||||
@@ -198,14 +198,13 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw)
|
||||
|
||||
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_AUDIO_HW_VOTE) {
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: audio vote clk_id %x \n",__func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
pr_debug("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_DCODEC, 1);
|
||||
trace_printk("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
ret = afe_vote_lpass_core_hw(AFE_LPASS_CORE_HW_DCODEC_BLOCK,
|
||||
"LPASS_HW_DCODEC",
|
||||
&clk_priv->lpass_audio_hwvote_client_handle);
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
if (__ratelimit(&rtl))
|
||||
@@ -225,14 +224,13 @@ static void lpass_hw_vote_unprepare(struct clk_hw *hw)
|
||||
|
||||
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_CORE_HW_VOTE) {
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: core vote clk_id %x \n",__func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_LPASS, 0);
|
||||
pr_debug("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_LPASS, 0);
|
||||
trace_printk("%s: core vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
ret = afe_unvote_lpass_core_hw(
|
||||
AFE_LPASS_CORE_HW_MACRO_BLOCK,
|
||||
clk_priv->lpass_core_hwvote_client_handle);
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
pr_err("%s lpass core hw vote failed %d\n",
|
||||
@@ -243,14 +241,13 @@ static void lpass_hw_vote_unprepare(struct clk_hw *hw)
|
||||
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_AUDIO_HW_VOTE) {
|
||||
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
pr_debug("%s: audio vote clk_id %x \n",__func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_DCODEC, 0);
|
||||
pr_debug("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
ret = audio_prm_set_lpass_hw_core_req(&clk_priv->prm_clk_cfg,
|
||||
HW_CORE_ID_DCODEC, 0);
|
||||
trace_printk("%s: audio vote clk_id %x \n", __func__, clk_priv->prm_clk_cfg.clk_id);
|
||||
#else
|
||||
ret = afe_unvote_lpass_core_hw(
|
||||
AFE_LPASS_CORE_HW_DCODEC_BLOCK,
|
||||
clk_priv->lpass_audio_hwvote_client_handle);
|
||||
pr_debug("%s: audio prm not enabled", __func__);
|
||||
ret = -EPERM;
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
pr_err("%s lpass audio hw unvote failed %d\n",
|
||||
@@ -640,18 +637,11 @@ static int audio_ref_clk_probe(struct platform_device *pdev)
|
||||
memcpy(&clk_priv->audio_clk, &audio_clk_array[clk_src],
|
||||
sizeof(struct audio_ext_clk));
|
||||
|
||||
/* Init lpass clk default values */
|
||||
clk_priv->clk_cfg.clk_set_minor_version =
|
||||
Q6AFE_LPASS_CLK_CONFIG_API_VERSION;
|
||||
clk_priv->clk_cfg.clk_id = Q6AFE_LPASS_CLK_ID_SPEAKER_I2S_OSR;
|
||||
clk_priv->clk_cfg.clk_freq_in_hz = Q6AFE_LPASS_OSR_CLK_9_P600_MHZ;
|
||||
clk_priv->clk_cfg.clk_attri = Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_NO;
|
||||
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
/* Init prm clk cfg default values */
|
||||
clk_priv->prm_clk_cfg.clk_id = Q6AFE_LPASS_CLK_ID_SPEAKER_I2S_OSR;
|
||||
clk_priv->prm_clk_cfg.clk_freq_in_hz = Q6AFE_LPASS_OSR_CLK_9_P600_MHZ;
|
||||
clk_priv->prm_clk_cfg.clk_attri = Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_NO;
|
||||
clk_priv->prm_clk_cfg.clk_id = CLOCK_ID_QUI_MI2S_OSR;
|
||||
clk_priv->prm_clk_cfg.clk_freq_in_hz = OSR_CLOCK_9_P600_MHZ;
|
||||
clk_priv->prm_clk_cfg.clk_attri = CLOCK_ATTRIBUTE_COUPLE_NO;
|
||||
clk_priv->prm_clk_cfg.clk_root = 0;
|
||||
#endif
|
||||
|
||||
@@ -659,7 +649,6 @@ static int audio_ref_clk_probe(struct platform_device *pdev)
|
||||
"qcom,codec-lpass-ext-clk-freq",
|
||||
&clk_freq);
|
||||
if (!ret) {
|
||||
clk_priv->clk_cfg.clk_freq_in_hz = clk_freq;
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
clk_priv->prm_clk_cfg.clk_freq_in_hz = clk_freq;
|
||||
#endif
|
||||
@@ -669,7 +658,6 @@ static int audio_ref_clk_probe(struct platform_device *pdev)
|
||||
"qcom,codec-lpass-clk-id",
|
||||
&clk_id);
|
||||
if (!ret) {
|
||||
clk_priv->clk_cfg.clk_id = clk_id;
|
||||
#ifdef CONFIG_AUDIO_PRM
|
||||
clk_priv->prm_clk_cfg.clk_id = clk_id;
|
||||
dev_dbg(&pdev->dev, "%s: PRM ext-clk freq: %d, lpass clk_id: %d, clk_src: %d\n",
|
||||
@@ -678,10 +666,6 @@ static int audio_ref_clk_probe(struct platform_device *pdev)
|
||||
#endif
|
||||
}
|
||||
|
||||
dev_dbg(&pdev->dev, "%s: ext-clk freq: %d, lpass clk_id: %d, clk_src: %d\n",
|
||||
__func__, clk_priv->clk_cfg.clk_freq_in_hz,
|
||||
clk_priv->clk_cfg.clk_id, clk_priv->clk_src);
|
||||
|
||||
dev_dbg(&pdev->dev, "%s: PRM2 ext-clk freq: %d, lpass clk_id: %d, clk_src: %d\n",
|
||||
__func__, clk_priv->prm_clk_cfg.clk_freq_in_hz,
|
||||
clk_priv->prm_clk_cfg.clk_id, clk_priv->clk_src);
|
||||
|
@@ -1,11 +0,0 @@
|
||||
#ifndef _UAPI_AVTIMER_H
|
||||
#define _UAPI_AVTIMER_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define MAJOR_NUM 100
|
||||
|
||||
#define IOCTL_GET_AVTIMER_TICK _IOR(MAJOR_NUM, 0, __u64)
|
||||
|
||||
#endif
|
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2008 Google, Inc.
|
||||
* Copyright (c) 2012, 2014, 2017, 2020, 2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_LINUX_MSM_AUDIO_H
|
||||
@@ -11,455 +12,13 @@
|
||||
#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_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_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_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_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_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_SET_SRS_TRUMEDIA_PARAM _IOW(AUDIO_IOCTL_MAGIC, 43, unsigned int)
|
||||
|
||||
/* 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_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 IOCTL_MAP_PHYS_ADDR _IOW(AUDIO_IOCTL_MAGIC, 97, int)
|
||||
#define IOCTL_UNMAP_PHYS_ADDR _IOW(AUDIO_IOCTL_MAGIC, 98, int)
|
||||
#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_REGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 107, struct msm_audio_ion_info)
|
||||
#define AUDIO_DEREGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 108, struct msm_audio_ion_info)
|
||||
#define IOCTL_MAP_HYP_ASSIGN _IOW(AUDIO_IOCTL_MAGIC, 109, int)
|
||||
#define IOCTL_UNMAP_HYP_ASSIGN _IOW(AUDIO_IOCTL_MAGIC, 110, int)
|
||||
#define AUDIO_MAX_COMMON_IOCTL_NUM 111
|
||||
|
||||
#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 {
|
||||
__u32 buffer_size;
|
||||
__u32 buffer_count;
|
||||
__u32 channel_count;
|
||||
__u32 sample_rate;
|
||||
__u32 type;
|
||||
__u32 meta_field;
|
||||
__u32 bits;
|
||||
__u32 unused[3];
|
||||
};
|
||||
|
||||
struct msm_audio_stream_config {
|
||||
__u32 buffer_size;
|
||||
__u32 buffer_count;
|
||||
};
|
||||
|
||||
struct msm_audio_buf_cfg {
|
||||
__u32 meta_info_enable;
|
||||
__u32 frames_per_buf;
|
||||
};
|
||||
|
||||
struct msm_audio_stats {
|
||||
__u32 byte_count;
|
||||
__u32 sample_count;
|
||||
__u32 unused[2];
|
||||
};
|
||||
|
||||
struct msm_audio_ion_info {
|
||||
int fd;
|
||||
void *vaddr;
|
||||
};
|
||||
|
||||
struct msm_audio_pmem_info {
|
||||
int fd;
|
||||
void *vaddr;
|
||||
};
|
||||
|
||||
struct msm_audio_aio_buf {
|
||||
void *buf_addr;
|
||||
__u32 buf_len;
|
||||
__u32 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
|
||||
|
||||
struct msm_mute_info {
|
||||
__u32 mute;
|
||||
__u32 path;
|
||||
};
|
||||
|
||||
struct msm_vol_info {
|
||||
__u32 vol;
|
||||
__u32 path;
|
||||
};
|
||||
|
||||
struct msm_voicerec_mode {
|
||||
__u32 rec_mode;
|
||||
};
|
||||
|
||||
struct msm_snd_device_config {
|
||||
__u32 device;
|
||||
__u32 ear_mute;
|
||||
__u32 mic_mute;
|
||||
};
|
||||
|
||||
#define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *)
|
||||
|
||||
enum cad_device_path_type {
|
||||
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 {
|
||||
__u32 rx_device;
|
||||
__u32 tx_device;
|
||||
enum cad_device_path_type pathtype;
|
||||
};
|
||||
|
||||
struct msm_cad_device_config {
|
||||
struct cad_devices_type device;
|
||||
__u32 ear_mute;
|
||||
__u32 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 {
|
||||
__u32 device;
|
||||
__u32 method;
|
||||
__u32 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;
|
||||
__u32 method;
|
||||
__u32 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; /* 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; /* 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 {
|
||||
__u32 pcm_feedback; /* 0 - disable > 0 - enable */
|
||||
__u32 buffer_count; /* Number of buffers to allocate */
|
||||
__u32 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_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 {
|
||||
__u32 codec_type;
|
||||
__u32 chan_info;
|
||||
__u32 sample_rate;
|
||||
__u32 bit_stream_info;
|
||||
__u32 bit_rate;
|
||||
__u32 unused[3];
|
||||
};
|
||||
|
||||
struct msm_audio_bitstream_error_info {
|
||||
__u32 dec_id;
|
||||
__u32 err_msg_indicator;
|
||||
__u32 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_event {
|
||||
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 {
|
||||
__u32 dev_id;
|
||||
__u32 dev_cap; /* bitmask describe capability of device */
|
||||
char dev_name[64];
|
||||
};
|
||||
|
||||
struct msm_snd_device_list {
|
||||
__u32 num_dev; /* Indicate number of device info to be retrieved */
|
||||
struct msm_snd_device_info *list;
|
||||
};
|
||||
|
||||
struct msm_dtmf_config {
|
||||
__u16 path;
|
||||
__u16 dtmf_hi;
|
||||
__u16 dtmf_low;
|
||||
__u16 duration;
|
||||
__u16 tx_gain;
|
||||
__u16 rx_gain;
|
||||
__u16 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
|
||||
|
||||
struct msm_audio_route_config {
|
||||
__u32 stream_type;
|
||||
__u32 stream_id;
|
||||
__u32 dev_id;
|
||||
};
|
||||
|
||||
#define AUDIO_MAX_EQ_BANDS 12
|
||||
|
||||
struct msm_audio_eq_band {
|
||||
__u16 band_idx; /* The band index, 0 .. 11 */
|
||||
__u32 filter_type; /* Filter band type */
|
||||
__u32 center_freq_hz; /* Filter band center frequency */
|
||||
__u32 filter_gain; /* Filter band initial gain (dB) */
|
||||
/* Range is +12 dB to -12 dB with 1dB increments. */
|
||||
__u32 q_factor;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct msm_audio_eq_stream_config {
|
||||
__u32 enable; /* Number of consequtive bands specified */
|
||||
__u32 num_bands;
|
||||
struct msm_audio_eq_band eq_bands[AUDIO_MAX_EQ_BANDS];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct msm_acdb_cmd_device {
|
||||
__u32 command_id;
|
||||
__u32 device_id;
|
||||
__u32 network_id;
|
||||
__u32 sample_rate_id; /* Actual sample rate value */
|
||||
__u32 interface_id; /* See interface id's above */
|
||||
__u32 algorithm_block_id; /* See enumerations above */
|
||||
__u32 total_bytes; /* Length in bytes used by buffer */
|
||||
__u32 *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;
|
||||
};
|
||||
|
||||
struct msm_hwacc_buf_cfg {
|
||||
__u32 input_len;
|
||||
__u32 output_len;
|
||||
};
|
||||
|
||||
struct msm_hwacc_buf_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_adsp_event_data {
|
||||
__u32 event_type;
|
||||
__u32 payload_len;
|
||||
__u8 payload[0];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -1,77 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_AAC_H
|
||||
#define _UAPI_MSM_AUDIO_AAC_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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), __u32)
|
||||
|
||||
#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; /* 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 {
|
||||
__u32 channels;
|
||||
__u32 sample_rate;
|
||||
__u32 bit_rate;
|
||||
__u32 stream_format;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_AAC_H */
|
@@ -1,41 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_AC3_H
|
||||
#define _UAPI_MSM_AUDIO_AC3_H
|
||||
|
||||
#include <audio/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 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
|
||||
|
||||
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];
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_AC3_H */
|
@@ -1,26 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_ALAC_H
|
||||
#define _UAPI_MSM_AUDIO_ALAC_H
|
||||
|
||||
#include <linux/types.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)
|
||||
|
||||
struct msm_audio_alac_config {
|
||||
__u32 frameLength;
|
||||
__u8 compatVersion;
|
||||
__u8 bitDepth;
|
||||
__u8 pb; /* currently unused */
|
||||
__u8 mb; /* currently unused */
|
||||
__u8 kb; /* currently unused */
|
||||
__u8 channelCount;
|
||||
__u16 maxRun; /* currently unused */
|
||||
__u32 maxSize;
|
||||
__u32 averageBitRate;
|
||||
__u32 sampleRate;
|
||||
__u32 channelLayout;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_ALAC_H */
|
@@ -1,35 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_AMRNB_H
|
||||
#define _UAPI_MSM_AUDIO_AMRNB_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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)
|
||||
|
||||
struct msm_audio_amrnb_enc_config {
|
||||
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 {
|
||||
__u32 band_mode;
|
||||
__u32 dtx_enable;
|
||||
__u32 frame_format;
|
||||
};
|
||||
#endif /* _UAPI_MSM_AUDIO_AMRNB_H */
|
@@ -1,19 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_AMRWB_H
|
||||
#define _UAPI_MSM_AUDIO_AMRWB_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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)
|
||||
|
||||
struct msm_audio_amrwb_enc_config {
|
||||
__u32 band_mode;
|
||||
__u32 dtx_enable;
|
||||
__u32 frame_format;
|
||||
};
|
||||
#endif /* _UAPI_MSM_AUDIO_AMRWB_H */
|
@@ -1,18 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_AMR_WB_PLUS_H
|
||||
#define _UAPI_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)
|
||||
|
||||
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;
|
||||
};
|
||||
#endif /* _UAPI_MSM_AUDIO_AMR_WB_PLUS_H */
|
@@ -1,28 +0,0 @@
|
||||
/* The following structure has been taken
|
||||
* from Monkey's Audio SDK with permission
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_MSM_AUDIO_APE_H
|
||||
#define _UAPI_MSM_AUDIO_APE_H
|
||||
|
||||
#include <linux/types.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)
|
||||
|
||||
struct msm_audio_ape_config {
|
||||
__u16 compatibleVersion;
|
||||
__u16 compressionLevel;
|
||||
__u32 formatFlags;
|
||||
__u32 blocksPerFrame;
|
||||
__u32 finalFrameBlocks;
|
||||
__u32 totalFrames;
|
||||
__u16 bitsPerSample;
|
||||
__u16 numChannels;
|
||||
__u32 sampleRate;
|
||||
__u32 seekTablePresent;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_APE_H */
|
@@ -1,840 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_CALIBRATION_H
|
||||
#define _UAPI_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 *)
|
||||
|
||||
/* 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,
|
||||
ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE,
|
||||
ADM_AUDPROC_PERSISTENT_CAL_TYPE,
|
||||
AFE_FB_SPKR_PROT_V4_EX_VI_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_FB_SPKR_PROT_V4_EX_VI_CAL_TYPE AFE_FB_SPKR_PROT_V4_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 ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE
|
||||
#define ADM_AUDPROC_PERSISTENT_CAL_TYPE ADM_AUDPROC_PERSISTENT_CAL_TYPE
|
||||
#define LSM_CAL_TYPES
|
||||
|
||||
#define TOPOLOGY_SPECIFIC_CHANNEL_INFO
|
||||
#define MSM_SPKR_PROT_SPV3
|
||||
#define MSM_SPKR_PROT_SPV4
|
||||
#define MSM_CMA_MEM_ALLOC
|
||||
|
||||
enum {
|
||||
VERSION_0_0,
|
||||
};
|
||||
|
||||
enum {
|
||||
PER_VOCODER_CAL_BIT_MASK = 0x10000,
|
||||
};
|
||||
|
||||
#define MAX_IOCTL_CMD_SIZE 512
|
||||
|
||||
/* common structures */
|
||||
|
||||
struct audio_cal_header {
|
||||
__s32 data_size;
|
||||
__s32 version;
|
||||
__s32 cal_type;
|
||||
__s32 cal_type_size;
|
||||
};
|
||||
|
||||
struct audio_cal_type_header {
|
||||
__s32 version;
|
||||
__s32 buffer_number;
|
||||
};
|
||||
|
||||
struct audio_cal_data {
|
||||
/* Size of cal data at mem_handle allocation or at vaddr */
|
||||
__s32 cal_size;
|
||||
/* If mem_handle if shared memory is used*/
|
||||
__s32 mem_handle;
|
||||
#ifdef MSM_CMA_MEM_ALLOC
|
||||
/* cma allocation flag if cma heap memory is used */
|
||||
__u32 cma_mem;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/* AUDIO_ALLOCATE_CALIBRATION */
|
||||
struct audio_cal_type_alloc {
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
/* AUDIO_DEALLOCATE_CALIBRATION */
|
||||
struct audio_cal_type_dealloc {
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
/* AUDIO_PREPARE_CALIBRATION */
|
||||
struct audio_cal_type_prepare {
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
/* AUDIO_POST_CALIBRATION */
|
||||
struct audio_cal_type_post {
|
||||
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;
|
||||
};
|
||||
|
||||
/*AUDIO_CORE_META_INFO */
|
||||
|
||||
struct audio_cal_info_metainfo {
|
||||
__u32 nKey;
|
||||
};
|
||||
|
||||
/* Cal info types */
|
||||
enum {
|
||||
RX_DEVICE,
|
||||
TX_DEVICE,
|
||||
MAX_PATH_TYPE
|
||||
};
|
||||
|
||||
struct audio_cal_info_adm_top {
|
||||
__s32 topology;
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 app_type;
|
||||
__s32 sample_rate;
|
||||
};
|
||||
|
||||
struct audio_cal_info_audproc {
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 app_type;
|
||||
__s32 sample_rate;
|
||||
};
|
||||
|
||||
struct audio_cal_info_audvol {
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 app_type;
|
||||
__s32 vol_index;
|
||||
};
|
||||
|
||||
struct audio_cal_info_afe {
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 sample_rate;
|
||||
};
|
||||
|
||||
struct audio_cal_info_afe_top {
|
||||
__s32 topology;
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 sample_rate;
|
||||
};
|
||||
|
||||
struct audio_cal_info_asm_top {
|
||||
__s32 topology;
|
||||
__s32 app_type;
|
||||
};
|
||||
|
||||
struct audio_cal_info_audstrm {
|
||||
__s32 app_type;
|
||||
};
|
||||
|
||||
struct audio_cal_info_aanc {
|
||||
__s32 acdb_id;
|
||||
};
|
||||
|
||||
#define MAX_HW_DELAY_ENTRIES 25
|
||||
|
||||
struct audio_cal_hw_delay_entry {
|
||||
__u32 sample_rate;
|
||||
__u32 delay_usec;
|
||||
};
|
||||
|
||||
struct audio_cal_hw_delay_data {
|
||||
__u32 num_entries;
|
||||
struct audio_cal_hw_delay_entry entry[MAX_HW_DELAY_ENTRIES];
|
||||
};
|
||||
|
||||
struct audio_cal_info_hw_delay {
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 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_IN_V_VALI_MODE
|
||||
};
|
||||
#define MSM_SPKR_PROT_IN_FTM_MODE MSM_SPKR_PROT_IN_FTM_MODE
|
||||
#define MSM_SPKR_PROT_IN_V_VALI_MODE MSM_SPKR_PROT_IN_V_VALI_MODE
|
||||
|
||||
enum msm_spkr_count {
|
||||
SP_V2_SPKR_1,
|
||||
SP_V2_SPKR_2,
|
||||
SP_V2_NUM_MAX_SPKRS
|
||||
};
|
||||
|
||||
struct audio_cal_info_spk_prot_cfg {
|
||||
__s32 r0[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 t0[SP_V2_NUM_MAX_SPKRS];
|
||||
__u32 quick_calib_flag;
|
||||
__u32 mode;
|
||||
/*
|
||||
* 0 - Start spk prot
|
||||
* 1 - Start calib
|
||||
* 2 - Disable spk prot
|
||||
*/
|
||||
#ifdef MSM_SPKR_PROT_SPV3
|
||||
__u32 sp_version;
|
||||
__s32 limiter_th[SP_V2_NUM_MAX_SPKRS];
|
||||
#endif
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_th_vi_ftm_cfg {
|
||||
/*
|
||||
* mode should be first param, add new params later to this.
|
||||
* we use this mode(first 4 bytes) to differentiate
|
||||
* whether it is TH_VI FTM or v-validation.
|
||||
*/
|
||||
__u32 mode;
|
||||
/*
|
||||
* 0 - normal running mode
|
||||
* 1 - Calibration
|
||||
* 2 - FTM mode
|
||||
*/
|
||||
__u32 wait_time[SP_V2_NUM_MAX_SPKRS];
|
||||
__u32 ftm_time[SP_V2_NUM_MAX_SPKRS];
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_th_vi_v_vali_cfg {
|
||||
/*
|
||||
* mode should be first param, add new params later to this.
|
||||
* we use this mode(first 4 bytes) to differentiate
|
||||
* whether it is TH_VI FTM or v-validation.
|
||||
*/
|
||||
__u32 mode;
|
||||
/*
|
||||
* 0 - normal running mode
|
||||
* 1 - Calibration
|
||||
* 2 - FTM mode
|
||||
* 3 - V-Validation mode
|
||||
*/
|
||||
__u32 wait_time[SP_V2_NUM_MAX_SPKRS];
|
||||
__u32 vali_time[SP_V2_NUM_MAX_SPKRS];
|
||||
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_ex_vi_ftm_cfg {
|
||||
__u32 wait_time[SP_V2_NUM_MAX_SPKRS];
|
||||
__u32 ftm_time[SP_V2_NUM_MAX_SPKRS];
|
||||
__u32 mode;
|
||||
/*
|
||||
* 0 - normal running mode
|
||||
* 2 - FTM mode
|
||||
*/
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_ex_vi_param {
|
||||
__s32 freq_q20[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 resis_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 qmct_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 status[SP_V2_NUM_MAX_SPKRS];
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_v4_ex_vi_param {
|
||||
__s32 ftm_re_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 ftm_Bl_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 ftm_Rms_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 ftm_Kms_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 ftm_freq_q20[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 ftm_Qms_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__u32 status[SP_V2_NUM_MAX_SPKRS];
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_th_vi_param {
|
||||
/*
|
||||
* mode should be first param, add new params later to this.
|
||||
* we use this mode(first 4 bytes) to differentiate
|
||||
* whether it is TH_VI FTM or v-validation.
|
||||
*/
|
||||
__u32 mode;
|
||||
__s32 r_dc_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 temp_q22[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 status[SP_V2_NUM_MAX_SPKRS];
|
||||
};
|
||||
|
||||
struct audio_cal_info_sp_th_vi_v_vali_param {
|
||||
/*
|
||||
* mode should be first param, add new params later to this.
|
||||
* we use this mode(first 4 bytes) to differentiate
|
||||
* whether it is TH_VI FTM or v-validation.
|
||||
*/
|
||||
__u32 mode;
|
||||
__u32 vrms_q24[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 status[SP_V2_NUM_MAX_SPKRS];
|
||||
};
|
||||
|
||||
struct audio_cal_info_msm_spk_prot_status {
|
||||
__s32 r0[SP_V2_NUM_MAX_SPKRS];
|
||||
__s32 status;
|
||||
};
|
||||
|
||||
struct audio_cal_info_sidetone {
|
||||
__u16 enable;
|
||||
__u16 gain;
|
||||
__s32 tx_acdb_id;
|
||||
__s32 rx_acdb_id;
|
||||
__s32 mid;
|
||||
__s32 pid;
|
||||
};
|
||||
|
||||
#define MAX_SIDETONE_IIR_DATA_SIZE 224
|
||||
#define MAX_NO_IIR_FILTER_STAGE 10
|
||||
|
||||
struct audio_cal_info_sidetone_iir {
|
||||
__u16 iir_enable;
|
||||
__u16 num_biquad_stages;
|
||||
__u16 pregain;
|
||||
__s32 tx_acdb_id;
|
||||
__s32 rx_acdb_id;
|
||||
__s32 mid;
|
||||
__s32 pid;
|
||||
__u8 iir_config[MAX_SIDETONE_IIR_DATA_SIZE];
|
||||
};
|
||||
struct audio_cal_info_lsm_top {
|
||||
__s32 topology;
|
||||
__s32 acdb_id;
|
||||
__s32 app_type;
|
||||
};
|
||||
|
||||
|
||||
struct audio_cal_info_lsm {
|
||||
__s32 acdb_id;
|
||||
/* RX_DEVICE or TX_DEVICE */
|
||||
__s32 path;
|
||||
__s32 app_type;
|
||||
};
|
||||
|
||||
#define VSS_NUM_CHANNELS_MAX 32
|
||||
|
||||
struct audio_cal_info_voc_top {
|
||||
__s32 topology;
|
||||
__s32 acdb_id;
|
||||
#ifdef TOPOLOGY_SPECIFIC_CHANNEL_INFO
|
||||
__u32 num_channels;
|
||||
__u8 channel_mapping[VSS_NUM_CHANNELS_MAX];
|
||||
#endif
|
||||
};
|
||||
|
||||
struct audio_cal_info_vocproc {
|
||||
__s32 tx_acdb_id;
|
||||
__s32 rx_acdb_id;
|
||||
__s32 tx_sample_rate;
|
||||
__s32 rx_sample_rate;
|
||||
};
|
||||
|
||||
enum {
|
||||
DEFAULT_FEATURE_SET,
|
||||
VOL_BOOST_FEATURE_SET,
|
||||
};
|
||||
|
||||
struct audio_cal_info_vocvol {
|
||||
__s32 tx_acdb_id;
|
||||
__s32 rx_acdb_id;
|
||||
/* DEFAULT_ or VOL_BOOST_FEATURE_SET */
|
||||
__s32 feature_set;
|
||||
};
|
||||
|
||||
struct audio_cal_info_vocdev_cfg {
|
||||
__s32 tx_acdb_id;
|
||||
__s32 rx_acdb_id;
|
||||
};
|
||||
|
||||
#define MAX_VOICE_COLUMNS 20
|
||||
|
||||
union audio_cal_col_na {
|
||||
__u8 val8;
|
||||
__u16 val16;
|
||||
__u32 val32;
|
||||
__u64 val64;
|
||||
} __packed;
|
||||
|
||||
struct audio_cal_col {
|
||||
__u32 id;
|
||||
__u32 type;
|
||||
union audio_cal_col_na na_value;
|
||||
} __packed;
|
||||
|
||||
struct audio_cal_col_data {
|
||||
__u32 num_columns;
|
||||
struct audio_cal_col column[MAX_VOICE_COLUMNS];
|
||||
} __packed;
|
||||
|
||||
struct audio_cal_info_voc_col {
|
||||
__s32 table_id;
|
||||
__s32 tx_acdb_id;
|
||||
__s32 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_basic {
|
||||
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_adm_top {
|
||||
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_core_metainfo {
|
||||
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_audproc {
|
||||
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_audvol {
|
||||
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_asm_top {
|
||||
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_audstrm {
|
||||
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_afe {
|
||||
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_afe_top {
|
||||
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_aanc {
|
||||
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_fb_spk_prot_cfg {
|
||||
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_sp_th_vi_ftm_cfg {
|
||||
struct audio_cal_header hdr;
|
||||
struct audio_cal_type_sp_th_vi_ftm_cfg cal_type;
|
||||
};
|
||||
|
||||
struct audio_cal_type_sp_th_vi_v_vali_cfg {
|
||||
struct audio_cal_type_header cal_hdr;
|
||||
struct audio_cal_data cal_data;
|
||||
struct audio_cal_info_sp_th_vi_v_vali_cfg cal_info;
|
||||
};
|
||||
|
||||
struct audio_cal_sp_th_vi_v_vali_cfg {
|
||||
struct audio_cal_header hdr;
|
||||
struct audio_cal_type_sp_th_vi_v_vali_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_sp_ex_vi_ftm_cfg {
|
||||
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_hw_delay {
|
||||
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_sidetone {
|
||||
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_sidetone_iir {
|
||||
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_lsm_top {
|
||||
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_lsm {
|
||||
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_voc_top {
|
||||
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_vocproc {
|
||||
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_vocvol {
|
||||
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_vocdev_cfg {
|
||||
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_voc_col {
|
||||
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_fb_spk_prot_status {
|
||||
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_sp_th_vi_param {
|
||||
struct audio_cal_header hdr;
|
||||
struct audio_cal_type_sp_th_vi_param cal_type;
|
||||
};
|
||||
|
||||
struct audio_cal_type_sp_th_vi_v_vali_param {
|
||||
struct audio_cal_type_header cal_hdr;
|
||||
struct audio_cal_data cal_data;
|
||||
struct audio_cal_info_sp_th_vi_v_vali_param cal_info;
|
||||
};
|
||||
|
||||
struct audio_cal_sp_th_vi_v_vali_param {
|
||||
struct audio_cal_header hdr;
|
||||
struct audio_cal_type_sp_th_vi_v_vali_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_sp_ex_vi_param {
|
||||
struct audio_cal_header hdr;
|
||||
struct audio_cal_type_sp_ex_vi_param cal_type;
|
||||
};
|
||||
|
||||
struct audio_cal_type_sp_v4_ex_vi_param {
|
||||
struct audio_cal_type_header cal_hdr;
|
||||
struct audio_cal_data cal_data;
|
||||
struct audio_cal_info_sp_v4_ex_vi_param cal_info;
|
||||
};
|
||||
|
||||
struct audio_cal_sp_v4_ex_vi_param {
|
||||
struct audio_cal_header hdr;
|
||||
struct audio_cal_type_sp_v4_ex_vi_param cal_type;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_CALIBRATION_H */
|
@@ -1,18 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_G711_H
|
||||
#define _UAPI_MSM_AUDIO_G711_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct msm_audio_g711_enc_config {
|
||||
__u32 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 /* _UAPI_MSM_AUDIO_G711_H */
|
@@ -1,17 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_G711_H
|
||||
#define _UAPI_MSM_AUDIO_G711_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct msm_audio_g711_dec_config {
|
||||
__u32 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 /* _UAPI_MSM_AUDIO_G711_H */
|
@@ -1,156 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_MVS_H
|
||||
#define _UAPI_MSM_AUDIO_MVS_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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)
|
||||
|
||||
/* 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
|
||||
#define MVS_MODE_HR 0x8
|
||||
#define MVS_MODE_LINEAR_PCM 0x9
|
||||
#define MVS_MODE_G711 0xA
|
||||
#define MVS_MODE_PCM 0xC
|
||||
#define MVS_MODE_AMR_WB 0xD
|
||||
#define MVS_MODE_G729A 0xE
|
||||
#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, /* 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, /* 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, /* 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
|
||||
};
|
||||
|
||||
enum msm_audio_g711_mode {
|
||||
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
|
||||
};
|
||||
|
||||
enum msm_audio_g711a_frame_type {
|
||||
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
|
||||
};
|
||||
|
||||
struct min_max_rate {
|
||||
__u32 min_rate;
|
||||
__u32 max_rate;
|
||||
};
|
||||
|
||||
struct msm_audio_mvs_config {
|
||||
__u32 mvs_mode;
|
||||
__u32 rate_type;
|
||||
struct min_max_rate min_max_rate;
|
||||
__u32 dtx_mode;
|
||||
};
|
||||
|
||||
#define MVS_MAX_VOC_PKT_SIZE 640
|
||||
|
||||
struct gsm_header {
|
||||
__u8 bfi;
|
||||
__u8 sid;
|
||||
__u8 taf;
|
||||
__u8 ufi;
|
||||
};
|
||||
|
||||
struct q6_msm_audio_mvs_frame {
|
||||
union {
|
||||
__u32 frame_type;
|
||||
__u32 packet_rate;
|
||||
struct gsm_header gsm_frame_type;
|
||||
} header;
|
||||
__u32 len;
|
||||
__u8 voc_pkt[MVS_MAX_VOC_PKT_SIZE];
|
||||
|
||||
};
|
||||
|
||||
struct msm_audio_mvs_frame {
|
||||
__u32 frame_type;
|
||||
__u32 len;
|
||||
__u8 voc_pkt[MVS_MAX_VOC_PKT_SIZE];
|
||||
|
||||
};
|
||||
|
||||
#define Q5V2_MVS_MAX_VOC_PKT_SIZE 320
|
||||
|
||||
struct q5v2_msm_audio_mvs_frame {
|
||||
__u32 frame_type;
|
||||
__u32 len;
|
||||
__u8 voc_pkt[Q5V2_MVS_MAX_VOC_PKT_SIZE];
|
||||
|
||||
};
|
||||
#endif /* _UAPI_MSM_AUDIO_MVS_H */
|
@@ -1,38 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_QCP_H
|
||||
#define _UAPI_MSM_AUDIO_QCP_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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
|
||||
|
||||
struct msm_audio_qcelp_enc_config {
|
||||
__u32 cdma_rate;
|
||||
__u32 min_bit_rate;
|
||||
__u32 max_bit_rate;
|
||||
};
|
||||
|
||||
struct msm_audio_evrc_enc_config {
|
||||
__u32 cdma_rate;
|
||||
__u32 min_bit_rate;
|
||||
__u32 max_bit_rate;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_QCP_H */
|
@@ -1,37 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_SBC_H
|
||||
#define _UAPI_MSM_AUDIO_SBC_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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
|
||||
|
||||
struct msm_audio_sbc_enc_config {
|
||||
__u32 channels;
|
||||
__u32 sample_rate;
|
||||
__u32 bit_allocation;
|
||||
__u32 number_of_subbands;
|
||||
__u32 number_of_blocks;
|
||||
__u32 bit_rate;
|
||||
__u32 mode;
|
||||
};
|
||||
#endif /* _UAPI_MSM_AUDIO_SBC_H */
|
@@ -1,67 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_VOICEMEMO_H
|
||||
#define _UAPI_MSM_AUDIO_VOICEMEMO_H
|
||||
|
||||
#include <audio/linux/msm_audio.h>
|
||||
#include <linux/types.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)
|
||||
|
||||
/* 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
|
||||
};
|
||||
|
||||
/* 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
|
||||
};
|
||||
|
||||
/* 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,
|
||||
};
|
||||
|
||||
/* frame_format */
|
||||
enum rpc_voc_pb_len_rate_var_type {
|
||||
RPC_VOC_PB_NATIVE_QCP = 3,
|
||||
RPC_VOC_PB_AMR,
|
||||
RPC_VOC_PB_EVB
|
||||
};
|
||||
|
||||
struct msm_audio_voicememo_config {
|
||||
__u32 rec_type;
|
||||
__u32 rec_interval_ms;
|
||||
__u32 auto_stop_ms;
|
||||
__u32 capability;
|
||||
__u32 max_rate;
|
||||
__u32 min_rate;
|
||||
__u32 frame_format;
|
||||
__u32 dtx_enable;
|
||||
__u32 data_req_ms;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_VOICEMEMO_H */
|
@@ -1,35 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_WMA_H
|
||||
#define _UAPI_MSM_AUDIO_WMA_H
|
||||
|
||||
#include <linux/types.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)
|
||||
|
||||
struct msm_audio_wma_config {
|
||||
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;
|
||||
__u32 samplingrate;
|
||||
__u32 avgbytespersecond;
|
||||
unsigned short block_align;
|
||||
unsigned short validbitspersample;
|
||||
__u32 channelmask;
|
||||
unsigned short encodeopt;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_MSM_AUDIO_WMA_H */
|
@@ -1,24 +0,0 @@
|
||||
#ifndef _UAPI_MSM_AUDIO_WMAPRO_H
|
||||
#define _UAPI_MSM_AUDIO_WMAPRO_H
|
||||
|
||||
#include <linux/types.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)
|
||||
|
||||
struct msm_audio_wmapro_config {
|
||||
unsigned short armdatareqthr;
|
||||
__u8 validbitspersample;
|
||||
__u8 numchannels;
|
||||
unsigned short formattag;
|
||||
__u32 samplingrate;
|
||||
__u32 avgbytespersecond;
|
||||
unsigned short asfpacketlength;
|
||||
__u32 channelmask;
|
||||
unsigned short encodeopt;
|
||||
unsigned short advancedencodeopt;
|
||||
__u32 advancedencodeopt2;
|
||||
};
|
||||
#endif /* _UAPI_MSM_AUDIO_WMAPRO_H */
|
@@ -1,52 +0,0 @@
|
||||
#ifndef __UAPI_WCD_SPI_AC_PARAMS_H__
|
||||
#define __UAPI_WCD_SPI_AC_PARAMS_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define WCD_SPI_AC_CMD_CONC_BEGIN 0x01
|
||||
#define WCD_SPI_AC_CMD_CONC_END 0x02
|
||||
#define WCD_SPI_AC_CMD_BUF_DATA 0x03
|
||||
|
||||
#define WCD_SPI_AC_MAX_BUFFERS 2
|
||||
#define WCD_SPI_AC_MAX_CH_PER_BUF 8
|
||||
|
||||
#define WCD_SPI_AC_CLIENT_CDEV_NAME "wcd-spi-ac-client"
|
||||
#define WCD_SPI_AC_PROCFS_DIR_NAME "wcd-spi-ac"
|
||||
#define WCD_SPI_AC_PROCFS_STATE_NAME "svc-state"
|
||||
|
||||
/*
|
||||
* wcd_spi_ac_buf_data:
|
||||
* Buffer address for one buffer. Should have data
|
||||
* for all the channels. If channels are unused, the
|
||||
* value must be NULL.
|
||||
*
|
||||
* @addr:
|
||||
* Address where each channel of the buffer starts.
|
||||
*/
|
||||
struct wcd_spi_ac_buf_data {
|
||||
__u32 addr[WCD_SPI_AC_MAX_CH_PER_BUF];
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* wcd_spi_ac_write_cmd:
|
||||
* Data sent to the driver's write interface should
|
||||
* be packed in this format.
|
||||
*
|
||||
* @cmd_type:
|
||||
* Indicates the type of command that is sent. Should
|
||||
* be one of the valid commands defined with
|
||||
* WCD_SPI_AC_CMD_*
|
||||
* @payload:
|
||||
* No payload for:
|
||||
* WCD_SPI_AC_CMD_CONC_BEGIN
|
||||
* WCD_SPI_AC_CMD_CONC_END
|
||||
* Upto WCD_SPI_AC_MAX_BUFFERS of type
|
||||
* struct wcd_spi_ac_buf_data for:
|
||||
* WCD_SPI_AC_CMD_BUF_DATA
|
||||
*/
|
||||
struct wcd_spi_ac_write_cmd {
|
||||
__u32 cmd_type;
|
||||
__u8 payload[0];
|
||||
} __packed;
|
||||
|
||||
#endif /* end of __UAPI_WCD_SPI_AC_PARAMS_H__ */
|
@@ -1,90 +0,0 @@
|
||||
#ifndef __AUDIO_COMPRESSED_FORMATS_H
|
||||
#define __AUDIO_COMPRESSED_FORMATS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define AUDIO_COMP_FORMAT_ALAC 0x1
|
||||
#define AUDIO_COMP_FORMAT_APE 0x2
|
||||
#define AUDIO_COMP_FORMAT_APTX 0x3
|
||||
#define AUDIO_COMP_FORMAT_DSD 0x4
|
||||
#define AUDIO_COMP_FORMAT_FLAC 0x5
|
||||
#define AUDIO_COMP_FORMAT_VORBIS 0x6
|
||||
#define AUDIO_COMP_FORMAT_WMA 0x7
|
||||
#define AUDIO_COMP_FORMAT_WMA_PRO 0x8
|
||||
|
||||
#define SND_COMPRESS_DEC_HDR
|
||||
struct snd_generic_dec_aac {
|
||||
__u16 audio_obj_type;
|
||||
__u16 pce_bits_size;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_generic_dec_flac {
|
||||
__u16 sample_size;
|
||||
__u16 min_blk_size;
|
||||
__u16 max_blk_size;
|
||||
__u16 min_frame_size;
|
||||
__u16 max_frame_size;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_generic_dec_alac {
|
||||
__u32 frame_length;
|
||||
__u8 compatible_version;
|
||||
__u8 bit_depth;
|
||||
__u8 pb;
|
||||
__u8 mb;
|
||||
__u8 kb;
|
||||
__u8 num_channels;
|
||||
__u16 max_run;
|
||||
__u32 max_frame_bytes;
|
||||
__u32 avg_bit_rate;
|
||||
__u32 sample_rate;
|
||||
__u32 channel_layout_tag;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_generic_dec_ape {
|
||||
__u16 compatible_version;
|
||||
__u16 compression_level;
|
||||
__u32 format_flags;
|
||||
__u32 blocks_per_frame;
|
||||
__u32 final_frame_blocks;
|
||||
__u32 total_frames;
|
||||
__u16 bits_per_sample;
|
||||
__u16 num_channels;
|
||||
__u32 sample_rate;
|
||||
__u32 seek_table_present;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_generic_dec_wma {
|
||||
__u32 super_block_align;
|
||||
__u32 bits_per_sample;
|
||||
__u32 channelmask;
|
||||
__u32 encodeopt;
|
||||
__u32 encodeopt1;
|
||||
__u32 encodeopt2;
|
||||
__u32 avg_bit_rate;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
#define SND_DEC_WMA_EXTENTED_SUPPORT
|
||||
|
||||
struct snd_generic_dec_aptx {
|
||||
__u32 lap;
|
||||
__u32 uap;
|
||||
__u32 nap;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_generic_dec_vorbis {
|
||||
__u32 bit_stream_fmt;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
/** struct snd_generic_dec_dsd - codec for DSD format
|
||||
* @blk_size - dsd channel block size
|
||||
*/
|
||||
struct snd_generic_dec_dsd {
|
||||
__u32 blk_size;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
struct snd_generic_dec_amrwb_plus {
|
||||
__u32 bit_stream_fmt;
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user