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
317 __s32 reserved[15]; /* Can be used for SND_AUDIOCODEC_BESPOKE */317 __s32 reserved[15]; /* Can be used for SND_AUDIOCODEC_BESPOKE */
318} __attribute__((packed, aligned(4)));318} __attribute__((packed, aligned(4)));
319 319
320struct 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
320union snd_codec_options {329union snd_codec_options {
321 struct snd_enc_wma wma;330 struct snd_enc_wma wma;
322 struct snd_enc_vorbis vorbis;331 struct snd_enc_vorbis vorbis;
323 struct snd_enc_real real;332 struct snd_enc_real real;
324 struct snd_enc_flac flac;333 struct snd_enc_flac flac;
325 struct snd_enc_generic generic;334 struct snd_enc_generic generic;
335 struct snd_dec_flac flac_d;
326} __attribute__((packed, aligned(4)));336} __attribute__((packed, aligned(4)));
327 337
328/** struct snd_codec_desc - description of codec capabilities338/** 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