Unverified Commit 0f546d6f authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown
Browse files

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: default avatarVinod Koul <vkoul@kernel.org>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200316055221.1944464-7-vkoul@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 40519a1c
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -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