summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2011-04-10 01:00:29 +0400
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2011-04-10 01:00:29 +0400
commitf3396235a03eb0b9e2df2ded7ef20c371c4b4c5b (patch)
treed0b2c924bbc31a5fefbdaed9b61fc3ae3a48af28
parent2bbe5e7e833d4b2168b34638cfee9c5349df850d (diff)
parent9247fea4f7f1778a5186a4528fa736ecb6fec2ec (diff)
downloadbionic-f3396235a03eb0b9e2df2ded7ef20c371c4b4c5b.zip
bionic-f3396235a03eb0b9e2df2ded7ef20c371c4b4c5b.tar.gz
bionic-f3396235a03eb0b9e2df2ded7ef20c371c4b4c5b.tar.bz2
Merge "bionic: add aic3254 and msm_audio_aac header" into gingerbreadcm-7.0.3cm-7.0.2.1cm-7.0.1cm-7.0.0
-rw-r--r--libc/kernel/common/linux/msm_audio_aac.h78
-rw-r--r--libc/kernel/common/linux/spi_aic3254.h86
2 files changed, 164 insertions, 0 deletions
diff --git a/libc/kernel/common/linux/msm_audio_aac.h b/libc/kernel/common/linux/msm_audio_aac.h
new file mode 100644
index 0000000..d9d300f
--- /dev/null
+++ b/libc/kernel/common/linux/msm_audio_aac.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MSM_AUDIO_AAC_H
+#define __MSM_AUDIO_AAC_H
+
+#include <linux/msm_audio.h>
+
+#define AUDIO_SET_AAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
+#define AUDIO_GET_AAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
+
+#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_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_OBJECT_LC 0x0002
+#define AUDIO_AAC_OBJECT_LTP 0x0004
+#define AUDIO_AAC_OBJECT_ERLC 0x0011
+#define AUDIO_AAC_OBJECT_BSAC 0x0016
+
+#define AUDIO_AAC_SEC_DATA_RES_ON 0x0001
+#define AUDIO_AAC_SEC_DATA_RES_OFF 0x0000
+
+#define AUDIO_AAC_SCA_DATA_RES_ON 0x0001
+#define AUDIO_AAC_SCA_DATA_RES_OFF 0x0000
+
+#define AUDIO_AAC_SPEC_DATA_RES_ON 0x0001
+#define AUDIO_AAC_SPEC_DATA_RES_OFF 0x0000
+
+#define AUDIO_AAC_SBR_ON_FLAG_ON 0x0001
+#define AUDIO_AAC_SBR_ON_FLAG_OFF 0x0000
+
+#define AUDIO_AAC_SBR_PS_ON_FLAG_ON 0x0001
+#define AUDIO_AAC_SBR_PS_ON_FLAG_OFF 0x0000
+
+#define AUDIO_AAC_DUAL_MONO_PL_PR 0
+
+#define AUDIO_AAC_DUAL_MONO_SL_SR 1
+
+#define AUDIO_AAC_DUAL_MONO_SL_PR 2
+
+#define AUDIO_AAC_DUAL_MONO_PL_SR 3
+
+struct msm_audio_aac_config {
+ signed short format;
+ unsigned short audio_object;
+ unsigned short ep_config;
+ unsigned short aac_section_data_resilience_flag;
+ unsigned short aac_scalefactor_data_resilience_flag;
+ unsigned short aac_spectral_data_resilience_flag;
+ unsigned short sbr_on_flag;
+ unsigned short sbr_ps_on_flag;
+ unsigned short dual_mono_mode;
+ unsigned short channel_configuration;
+};
+
+struct msm_audio_aac_enc_config {
+ uint32_t channels;
+ uint32_t sample_rate;
+ uint32_t bit_rate;
+ uint32_t stream_format;
+};
+
+#endif
+
diff --git a/libc/kernel/common/linux/spi_aic3254.h b/libc/kernel/common/linux/spi_aic3254.h
new file mode 100644
index 0000000..69f5277
--- /dev/null
+++ b/libc/kernel/common/linux/spi_aic3254.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __SPI_AIC3254_H__
+#define __SPI_AIC3254_H__
+
+#include <linux/ioctl.h>
+
+typedef struct _CODEC_SPI_CMD {
+ unsigned char act;
+ unsigned char reg;
+ unsigned char data;
+} CODEC_SPI_CMD;
+
+struct AIC3254_PARAM {
+ unsigned int row_num;
+ unsigned int col_num;
+ void *cmd_data;
+};
+
+struct CODEC_CFG {
+ unsigned char tb_idx;
+ unsigned char index;
+};
+
+#define AIC3254_IOCTL_MAGIC 's'
+#define AIC3254_SET_TX_PARAM _IOW(AIC3254_IOCTL_MAGIC, 0x10, unsigned)
+#define AIC3254_SET_RX_PARAM _IOW(AIC3254_IOCTL_MAGIC, 0x11, unsigned)
+#define AIC3254_CONFIG_TX _IOW(AIC3254_IOCTL_MAGIC, 0x12, unsigned int)
+#define AIC3254_CONFIG_RX _IOW(AIC3254_IOCTL_MAGIC, 0x13, unsigned int)
+#define AIC3254_SET_DSP_PARAM _IOW(AIC3254_IOCTL_MAGIC, 0x20, unsigned)
+#define AIC3254_CONFIG_MEDIA _IOW(AIC3254_IOCTL_MAGIC, 0x21, unsigned int)
+#define AIC3254_CONFIG_VOICE _IOW(AIC3254_IOCTL_MAGIC, 0x22, unsigned int)
+#define AIC3254_CONFIG_VOLUME_L _IOW(AIC3254_IOCTL_MAGIC, 0x23, unsigned int)
+#define AIC3254_CONFIG_VOLUME_R _IOW(AIC3254_IOCTL_MAGIC, 0x24, unsigned int)
+#define AIC3254_POWERDOWN _IOW(AIC3254_IOCTL_MAGIC, 0x25, unsigned int)
+#define AIC3254_DUMP_PAGES _IOW(AIC3254_IOCTL_MAGIC, 0x30, unsigned int)
+#define AIC3254_READ_REG _IOWR(AIC3254_IOCTL_MAGIC, 0x31, unsigned)
+#define AIC3254_WRITE_REG _IOW(AIC3254_IOCTL_MAGIC, 0x32, unsigned)
+
+#define AIC3254_MAX_PAGES 255
+#define AIC3254_MAX_REGS 128
+#define AIC3254_MAX_RETRY 10
+
+#define IO_CTL_ROW_MAX 64
+#define IO_CTL_COL_MAX 1024
+#define MINIDSP_ROW_MAX 32
+#define MINIDSP_COL_MAX 16384
+
+enum aic3254_uplink_mode {
+ INITIAL = 0,
+ CALL_UPLINK_IMIC_RECEIVER = 1,
+ CALL_UPLINK_EMIC_HEADSET,
+ CALL_UPLINK_IMIC_HEADSET,
+ CALL_UPLINK_IMIC_SPEAKER,
+ VOICERECORD_IMIC = 15,
+ VOICERECORD_EMIC,
+ UPLINK_OFF = 29,
+ UPLINK_WAKEUP,
+ POWER_OFF,
+};
+
+enum aic3254_downlink_mode {
+ PLAYBACK_SPEAKER = 13,
+ FM_OUT_SPEAKER = 21,
+ FM_OUT_HEADSET,
+ DOWNLINK_OFF = 29,
+ DOWNLINK_WAKEUP,
+};
+
+struct aic3254_ctl_ops {
+ void (*tx_amp_enable)(int en);
+ void (*rx_amp_enable)(int en);
+ int (*panel_sleep_in)(void);
+};
+
+#endif
+