STRUCT SND_DEC_OPUS(9)
π§ struct snd_dec_opus(9) β the kernel API manual, bestie edition π§
okay so welcome to the struct snd_dec_opus page, it's literally all about Opus decoder parameters for raw opus packets and honestly? it's giving "header file that knows exactly what it wants." π
β¨ NAME β¨
struct snd_dec_opus β Opus decoder parameters (raw opus packets). yes that's it, that's the whole name, and she ate. π
πΈ SYNOPSIS πΈ
here's the whole struct, bestie, copied exactly so don't come for me:
struct snd_dec_opus {
__u8 version;
__u8 num_channels;
__u16 pre_skip;
__u32 sample_rate;
__u16 output_gain;
__u8 mapping_family;
struct snd_dec_opus_ch_map {
__u8 stream_count;
__u8 coupled_count;
__u8 channel_map[8];
} chan_map;
};
look at her. gorgeous. no notes. π¦
π Members π
π version
usually should be '1' but ngl it can be split into major (the 4 upper bits) and minor (the 4 lower bits) sub-fields. so like, she's got layers. iykyk.
π num_channels
the number of output channels. how many voices are we talking about here. π€
π pre_skip
number of samples to discard at 48 kHz. like a little trim off the top, cute.
π sample_rate
sample rate of the original input. the og vibes, preserved. β
π output_gain
gain to apply when decoding, and it's in Q7.8 format. okay fancy math girl. π₯
π mapping_family
this is the order and meaning of the output channels. only values 0 and 1 are expected; values 2..255 are not recommended for playback β so like, don't. π
π chan_map
optional channel mapping table, and it describes the mapping of opus streams to decoded channels. fields go like this:
π chan_map.stream_count
the number of streams encoded in each Ogg packet.
π chan_map.coupled_count
the number of streams whose decoders are used for two channels. two-for-one, iconic.
π chan_map.channel_map
which decoded channel to be used for each one. supports only mapping families 0 and 1, and the max number of channels is 8. that's the ceiling, bestie, don't push it. π«Ά
π Description π
these options were extracted from RFC7845 Section 5. periodt. that's the entire description and we respect her for being brief.
fr fr though, don't skip the RFC reference β that's where the actual lore lives. π
π SEE ALSO π
- Kernel file
./include/uapi/sound/compress_params.h struct snd_enc_vorbis(9)struct snd_enc_real(9)struct snd_enc_flac(9)
go read those too, the whole enc/dec family is lowkey a vibe. πΈ
and that's the page!! π this came from the source at ./include/uapi/sound, dated October 2026, and it's titled struct snd_dec_opus(9) β so yeah, she's official, she's documented, she's main character energy. slay, stay hydrated, and go decode some opus packets responsibly. π§ββοΈβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms