From 81e12242832496e04f34377c7e2b2c2db0a09469 Mon Sep 17 00:00:00 2001 From: Nidhisha Dhananjayan Date: Tue, 29 Jan 2019 10:32:52 +0530 Subject: [PATCH] ANDROID: GKI: uapi: msm: dolby: Support for TrueHD and MAT decoders Audio codec addition of MAT and TrueHD decoders for decoding in DSP. Change-Id: I049c1210d3600da723850bae1dd61b6ad4b3a78a Acked-by: Janamaddi Sravan Kumar Signed-off-by: Nidhisha Dhananjayan Bug: 151372815 (cherry picked from commit 0563121f3e1454724afb549a9e45b7e1835af9be) Signed-off-by: Saravana Kannan --- include/uapi/sound/compress_params.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index 4cf8c9f85804..85140a2afa0c 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -105,7 +105,9 @@ #define SND_AUDIOCODEC_DSD ((__u32) 0x00000022) #define SND_AUDIOCODEC_APTX ((__u32) 0x00000023) #define SND_AUDIOCODEC_TRUEHD ((__u32) 0x00000024) -#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_TRUEHD +#define SND_AUDIOCODEC_DLB_MAT ((__u32) 0x00000025) +#define SND_AUDIOCODEC_DLB_THD ((__u32) 0x00000026) +#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_DLB_THD /* * Profile and modes are listed with bit masks. This allows for a @@ -354,6 +356,13 @@ struct snd_enc_generic { __s32 reserved[15]; /* Can be used for SND_AUDIOCODEC_BESPOKE */ } __attribute__((packed, aligned(4))); +#define SND_DEC_THD_MAX_PARAMS 8 +struct snd_dec_thd { + __u32 params_length; + __u32 params_id[SND_DEC_THD_MAX_PARAMS]; + __u32 params_value[SND_DEC_THD_MAX_PARAMS]; +} __attribute__((packed, aligned(4))); + struct snd_dec_flac { __u16 sample_size; __u16 min_blk_size; @@ -413,6 +422,7 @@ union snd_codec_options { struct snd_dec_alac alac; struct snd_dec_ape ape; struct snd_dec_aptx aptx_dec; + struct snd_dec_thd truehd; }; /** struct snd_codec_desc - description of codec capabilities