History

ALSA: compress: add flac decoder params

The current design of sending codec parameters assumes that decoders will have parsers so they can parse the encoded stream for parameters and configure the decoder. But this assumption may not be universally true and we know some DSPs which do not contain the parsers so additional parameters are required to be passed. So add these parameters starting with FLAC decoder. The size of snd_codec_options is still 120 bytes after this change (due to this being a union)

Vinod Koul committed 7 years ago

Commit d2522331 parent a3b9ed51 file · +10 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/sound/compress_params.h+10−0
@@ -317,12 +317,22 @@ struct snd_enc_generic { · 316 unmodified lines
317317 __s32 reserved[15]; /* Can be used for SND_AUDIOCODEC_BESPOKE */
318318 } __attribute__((packed, aligned(4)));
319319
320+struct snd_dec_flac {
321+ __u16 sample_size;
322+ __u16 min_blk_size;
323+ __u16 max_blk_size;
324+ __u16 min_frame_size;
325+ __u16 max_frame_size;
326+ __u16 reserved;
327+} __attribute__((packed, aligned(4)));
328+
320329 union snd_codec_options {
321330 struct snd_enc_wma wma;
322331 struct snd_enc_vorbis vorbis;
323332 struct snd_enc_real real;
324333 struct snd_enc_flac flac;
325334 struct snd_enc_generic generic;
335+ struct snd_dec_flac flac_d;
326336 } __attribute__((packed, aligned(4)));
327337
328338 /** struct snd_codec_desc - description of codec capabilities

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t