STRUCT SND_SOC_USB(9)
π struct snd_soc_usb(9) π
okay bestie, welcome to the Kernel API Manual β this is the struct snd_soc_usb page and honestly it's giving backstage-pass energy for SoC USB audio. ngl it's short but it's iconic, let's go π
β¨ NAME β¨
struct snd_soc_usb β the literal representation of a SoC USB backend entity π¦
like, that's the whole vibe. it is the entity. no cap.
β¨ SYNOPSIS β¨
struct list_head list;
struct snd_soc_component *component;
int (*connection_status_cb)(struct snd_soc_usb *usb, struct
snd_soc_usb_device *sdev, bool connected);
int (*update_offload_route_info)(struct snd_soc_component
*component, int card, int pcm, int direction, enum snd_soc_usb_kctl
path, long *route);
void *priv_data;
};
so the full struct is this, bestie β copy it exactly, every field, no edits, don't touch it:
struct snd_soc_usb {
struct list_head list;
struct snd_soc_component *component;
int (*connection_status_cb)(struct snd_soc_usb *usb, struct
snd_soc_usb_device *sdev, bool connected);
int (*update_offload_route_info)(struct snd_soc_component
*component, int card, int pcm, int direction, enum snd_soc_usb_kctl
path, long *route);
void *priv_data;
};
β¨ Members β¨
okay so here's the member-by-member breakdown, and I need you to pay attention because each one is doing its own little main-character thing π
listβ the list head for the SND SOC struct list. that's it, that's the whole job. keeping the list together, lowkey the glue of the group chat πΈcomponentβ a reference to the ASoC component. like the component's @ mention in the struct π«Άconnection_status_cbβ a callback to notify connection events. when stuff connects or disconnects, this one speaks up. it's giving "omg bestie I have news" energy π£ the full signature isint (*connection_status_cb)(struct snd_soc_usb *usb, struct snd_soc_usb_device *sdev, bool connected)β and yes, that's abool connected, so it's literally telling you whether it's connected. iykyk.update_offload_route_infoβ a callback to fetch the mapped ASoC card and pcm device pair. ok so important disclaimer time: this is unrelated to the concept of DAPM route. fr fr, don't get it twisted, different thing entirely. the"route"argument carries an array used for a kcontrol output for either the card or pcm index, and"path"determines which entry to look for (ie mapped card or pcm). sopath= "which one tho",route= "here's where it goes" β¨ the full signature isint (*update_offload_route_info)(struct snd_soc_component *component, int card, int pcm, int direction, enum snd_soc_usb_kctl path, long *route).priv_dataβ driver data. avoid *, so it's the mystery bag of the struct. very mysterious. very "don't ask what's in my tote" π
ok real talk: that DAPM note is the one place you could actually get confused, so I'm repeating it β the "route" here is not a DAPM route. it's an array for a kcontrol output of either the card or pcm index. periodt. π
β¨ SEE ALSO β¨
- Kernel file
./include/sound/soc-usb.h struct snd_soc_usb_device(9)
and that's the whole page, bestie π§ no filler, all facts, 100% slay.
sign-off time: this page lives under ./include/sound, and the version/date stamp on it is October 2026 β and yes, it's the struct snd_soc_usb(9) page, in case you forgot in the last four seconds. mwah ππβ
π¦ 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