STRUCT SND_SOC_USB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 is int (*connection_status_cb)(struct snd_soc_usb *usb, struct snd_soc_usb_device *sdev, bool connected) β€” and yes, that's a bool 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). so path = "which one tho", route = "here's where it goes" ✨ the full signature is int (*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. a void *, 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