summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudheer Papothi <spapothi@codeaurora.org>2016-02-26 00:11:04 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:11:24 -0700
commit26c32e7dad6124d7d726ad17e8c661376cf10d4c (patch)
tree5d70e2806b48f1005985fd7b05a0cf97140a00ac
parent658e9b6abeaaa7a3f00d6d51282f8072fd78228e (diff)
ASoC: msm: qdsp6v2: add support for ALAC and APE offload
Add ALAC and APE to supported offload formats and send media format block for both formats through compress driver. Change-Id: I22b7cf38684250d2f8d6f9aefcd43452bb18e7f9 Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org> Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
-rw-r--r--include/uapi/sound/compress_params.h42
1 files changed, 39 insertions, 3 deletions
diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h
index d1f03d7214b3..17dbf6bf3ff0 100644
--- a/include/uapi/sound/compress_params.h
+++ b/include/uapi/sound/compress_params.h
@@ -94,8 +94,9 @@
#define SND_AUDIOCODEC_WMA_PRO ((__u32) 0x00000016)
#define SND_AUDIOCODEC_DTS ((__u32) 0x00000017)
#define SND_AUDIOCODEC_EAC3 ((__u32) 0x00000018)
-#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_EAC3
-
+#define SND_AUDIOCODEC_ALAC ((__u32) 0x00000019)
+#define SND_AUDIOCODEC_APE ((__u32) 0x00000020)
+#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
/*
* Profile and modes are listed with bit masks. This allows for a
* more compact representation of fields that will not evolve
@@ -356,6 +357,38 @@ struct snd_dec_flac {
__u16 max_frame_size;
} __attribute__((packed, aligned(4)));
+struct snd_dec_vorbis {
+ __u32 bit_stream_fmt;
+};
+
+struct snd_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;
+};
+
+struct snd_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;
+};
+
union snd_codec_options {
struct snd_enc_wma wma;
struct snd_enc_vorbis vorbis;
@@ -364,7 +397,10 @@ union snd_codec_options {
struct snd_enc_generic generic;
struct snd_dec_ddp ddp;
struct snd_dec_flac flac_dec;
-} __attribute__((packed, aligned(4)));
+ struct snd_dec_vorbis vorbis_dec;
+ struct snd_dec_alac alac;
+ struct snd_dec_ape ape;
+};
/** struct snd_codec_desc - description of codec capabilities
* @max_ch: Maximum number of audio channels