diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-12-02 09:02:18 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-02 09:02:16 -0800 |
| commit | 4595a01ac79cf2cd5c6e020cbe8391e3a094a13a (patch) | |
| tree | 7458bd90d0f918082166af0b5a36938ad4f3bb49 /include | |
| parent | 1042c91dfb01cf37522d7d6fa5153ede88d6f5f7 (diff) | |
| parent | 07c5d36ead8ef803de14a25f5efd56a59d94d61d (diff) | |
Merge "misc: qcom: qdsp6v2: register ioctl calls for g711mlaw driver"
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/apr_audio-v2.h | 26 | ||||
| -rw-r--r-- | include/sound/q6asm-v2.h | 7 | ||||
| -rw-r--r-- | include/uapi/linux/Kbuild | 2 | ||||
| -rw-r--r-- | include/uapi/linux/msm_audio_g711.h | 17 | ||||
| -rw-r--r-- | include/uapi/linux/msm_audio_g711_dec.h | 16 |
5 files changed, 68 insertions, 0 deletions
diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h index 7dff4bb0fd82..e01e16e5cebe 100644 --- a/include/sound/apr_audio-v2.h +++ b/include/sound/apr_audio-v2.h @@ -3609,6 +3609,10 @@ struct asm_alac_cfg { u32 channel_layout_tag; }; +struct asm_g711_dec_cfg { + u32 sample_rate; +}; + struct asm_vorbis_cfg { u32 bit_stream_fmt; }; @@ -4220,6 +4224,22 @@ struct asm_aac_enc_cfg_v2 { } __packed; +#define ASM_MEDIA_FMT_G711_ALAW_FS 0x00010BF7 +#define ASM_MEDIA_FMT_G711_MLAW_FS 0x00010C2E + +struct asm_g711_enc_cfg_v2 { + struct apr_hdr hdr; + struct asm_stream_cmd_set_encdec_param encdec; + struct asm_enc_cfg_blk_param_v2 encblk; + + u32 sample_rate; +/* + * Number of samples per second. + * Supported values: 8000, 16000 Hz + */ + +} __packed; + struct asm_vorbis_fmt_blk_v2 { struct apr_hdr hdr; struct asm_data_cmd_media_fmt_update_v2 fmtblk; @@ -4321,6 +4341,12 @@ struct asm_alac_fmt_blk_v2 { } __packed; +struct asm_g711_dec_fmt_blk_v2 { + struct apr_hdr hdr; + struct asm_data_cmd_media_fmt_update_v2 fmtblk; + u32 sample_rate; +} __packed; + struct asm_ape_fmt_blk_v2 { struct apr_hdr hdr; struct asm_data_cmd_media_fmt_update_v2 fmtblk; diff --git a/include/sound/q6asm-v2.h b/include/sound/q6asm-v2.h index 746078936d5c..efa5af8e661c 100644 --- a/include/sound/q6asm-v2.h +++ b/include/sound/q6asm-v2.h @@ -388,6 +388,10 @@ int q6asm_enc_cfg_blk_aac(struct audio_client *ac, uint32_t bit_rate, uint32_t mode, uint32_t format); +int q6asm_enc_cfg_blk_g711(struct audio_client *ac, + uint32_t frames_per_buf, + uint32_t sample_rate); + int q6asm_enc_cfg_blk_pcm(struct audio_client *ac, uint32_t rate, uint32_t channels); @@ -536,6 +540,9 @@ int q6asm_stream_media_format_block_flac(struct audio_client *ac, int q6asm_media_format_block_alac(struct audio_client *ac, struct asm_alac_cfg *cfg, int stream_id); +int q6asm_media_format_block_g711(struct audio_client *ac, + struct asm_g711_dec_cfg *cfg, int stream_id); + int q6asm_stream_media_format_block_vorbis(struct audio_client *ac, struct asm_vorbis_cfg *cfg, int stream_id); diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 14bd1e806ad7..748b7c277a3c 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -302,6 +302,8 @@ header-y += msm_audio_wma.h header-y += msm_audio_wmapro.h header-y += msm_audio_alac.h header-y += msm_audio_ape.h +header-y += msm_audio_g711.h +header-y += msm_audio_g711_dec.h header-y += msm_ion.h header-y += msm_kgsl.h header-y += msm_pft.h diff --git a/include/uapi/linux/msm_audio_g711.h b/include/uapi/linux/msm_audio_g711.h new file mode 100644 index 000000000000..48ebd6a1131e --- /dev/null +++ b/include/uapi/linux/msm_audio_g711.h @@ -0,0 +1,17 @@ +#ifndef _UAPI_MSM_AUDIO_G711_H +#define _UAPI_MSM_AUDIO_G711_H + +#include <linux/msm_audio.h> + +struct msm_audio_g711_enc_config { + uint32_t sample_rate; +}; + +#define AUDIO_SET_G711_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_g711_enc_config) + +#define AUDIO_GET_G711_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_g711_enc_config) + + +#endif /* _UAPI_MSM_AUDIO_G711_H */ diff --git a/include/uapi/linux/msm_audio_g711_dec.h b/include/uapi/linux/msm_audio_g711_dec.h new file mode 100644 index 000000000000..ff7e4ce39fd5 --- /dev/null +++ b/include/uapi/linux/msm_audio_g711_dec.h @@ -0,0 +1,16 @@ +#ifndef _UAPI_MSM_AUDIO_G711_H +#define _UAPI_MSM_AUDIO_G711_H + +#include <linux/msm_audio.h> + +struct msm_audio_g711_dec_config { + uint32_t sample_rate; +}; + +#define AUDIO_SET_G711_DEC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_g711_dec_config) + +#define AUDIO_GET_G711_DEC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \ + (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_g711_dec_config) + +#endif /* _UAPI_MSM_AUDIO_G711_H */ |
