From e04046b0a3b81d4480d47cd618a9007b081ace41 Mon Sep 17 00:00:00 2001 From: Nidhisha Dhananjayan Date: Wed, 13 Feb 2019 15:04:28 +0530 Subject: [PATCH] ANDROID: GKI: msm: audio: support for gapless_pcm snd_codec_option structure for gapless_pcm_playback. This is used for updating the channels in gapless pcm cases. Change-Id: Id0d950f0f431e5d9fe2a8ccd5e5124a235b66f27 Acked-by: Janamaddi Sravan Kumar Signed-off-by: Nidhisha Dhananjayan Bug: 151372815 (cherry picked from commit 4fc12e7fd876437961528c7ceb4be6ce1ccad9bb) Signed-off-by: Saravana Kannan --- include/uapi/sound/compress_params.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index 85140a2afa0c..985129bc7cd9 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -54,6 +54,9 @@ #include +/* Maximum PCM channels */ +#define MAX_PCM_DECODE_CHANNELS 32 + /* AUDIO CODECS SUPPORTED */ #define MAX_NUM_CODECS 32 #define MAX_NUM_CODEC_DESCRIPTORS 32 @@ -411,6 +414,15 @@ struct snd_dec_aptx { __u32 nap; }; +/** struct snd_dec_pcm - codec options for PCM format + * @num_channels: Number of channels + * @ch_map: Channel map for the above corresponding channels + */ +struct snd_dec_pcm { + __u32 num_channels; + __u8 ch_map[MAX_PCM_DECODE_CHANNELS]; +} __attribute__((packed, aligned(4))); + union snd_codec_options { struct snd_enc_wma wma; struct snd_enc_vorbis vorbis; @@ -423,6 +435,7 @@ union snd_codec_options { struct snd_dec_ape ape; struct snd_dec_aptx aptx_dec; struct snd_dec_thd truehd; + struct snd_dec_pcm pcm_dec; }; /** struct snd_codec_desc - description of codec capabilities