summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2020-03-16 08:52:18 +0300
committerMark Brown <broonie@kernel.org>2020-03-16 20:52:09 +0300
commit0f546d6f0292fb624b4cf0cc70096ddb9ea070e6 (patch)
treeda193e3cc3421e23c983178ce3e8c5caa14b3a64 /include
parent40519a1c02303ebdf09e07fe57a52c2d1d188b01 (diff)
downloadlinux-0f546d6f0292fb624b4cf0cc70096ddb9ea070e6.tar.xz
ALSA: compress: add alac & ape decoder params
Add ALAC (Apple Lossless Audio Codec) and APE (Monkey's Lossless Audio Codec) defines and parameters required to configure these. Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200316055221.1944464-7-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/sound/compress_params.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h
index bf6f7155e775..79b14389ae41 100644
--- a/include/uapi/sound/compress_params.h
+++ b/include/uapi/sound/compress_params.h
@@ -75,7 +75,9 @@
#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
-#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_BESPOKE
+#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
+#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
+#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
/*
* Profile and modes are listed with bit masks. This allows for a
@@ -336,6 +338,26 @@ struct snd_dec_wma {
__u32 reserved;
} __attribute__((packed, aligned(4)));
+struct snd_dec_alac {
+ __u32 frame_length;
+ __u8 compatible_version;
+ __u8 pb;
+ __u8 mb;
+ __u8 kb;
+ __u32 max_run;
+ __u32 max_frame_bytes;
+} __attribute__((packed, aligned(4)));
+
+struct snd_dec_ape {
+ __u16 compatible_version;
+ __u16 compression_level;
+ __u32 format_flags;
+ __u32 blocks_per_frame;
+ __u32 final_frame_blocks;
+ __u32 total_frames;
+ __u32 seek_table_present;
+} __attribute__((packed, aligned(4)));
+
union snd_codec_options {
struct snd_enc_wma wma;
struct snd_enc_vorbis vorbis;
@@ -344,6 +366,8 @@ union snd_codec_options {
struct snd_enc_generic generic;
struct snd_dec_flac flac_d;
struct snd_dec_wma wma_d;
+ struct snd_dec_alac alac_d;
+ struct snd_dec_ape ape_d;
} __attribute__((packed, aligned(4)));
/** struct snd_codec_desc - description of codec capabilities