Skip to content

Commit 0f546d6

Browse files
vinodkoulbroonie
authored andcommitted
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>
1 parent 40519a1 commit 0f546d6

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎include/uapi/sound/compress_params.h‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@
7575
#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
7676
#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
7777
#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
78-
#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_BESPOKE
78+
#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
79+
#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
80+
#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
7981

8082
/*
8183
* Profile and modes are listed with bit masks. This allows for a
@@ -336,6 +338,26 @@ struct snd_dec_wma {
336338
__u32 reserved;
337339
} __attribute__((packed, aligned(4)));
338340

341+
struct snd_dec_alac {
342+
__u32 frame_length;
343+
__u8 compatible_version;
344+
__u8 pb;
345+
__u8 mb;
346+
__u8 kb;
347+
__u32 max_run;
348+
__u32 max_frame_bytes;
349+
} __attribute__((packed, aligned(4)));
350+
351+
struct snd_dec_ape {
352+
__u16 compatible_version;
353+
__u16 compression_level;
354+
__u32 format_flags;
355+
__u32 blocks_per_frame;
356+
__u32 final_frame_blocks;
357+
__u32 total_frames;
358+
__u32 seek_table_present;
359+
} __attribute__((packed, aligned(4)));
360+
339361
union snd_codec_options {
340362
struct snd_enc_wma wma;
341363
struct snd_enc_vorbis vorbis;
@@ -344,6 +366,8 @@ union snd_codec_options {
344366
struct snd_enc_generic generic;
345367
struct snd_dec_flac flac_d;
346368
struct snd_dec_wma wma_d;
369+
struct snd_dec_alac alac_d;
370+
struct snd_dec_ape ape_d;
347371
} __attribute__((packed, aligned(4)));
348372

349373
/** struct snd_codec_desc - description of codec capabilities

0 commit comments

Comments
 (0)