snd_soc_usb_...ffload_route(9)
π NAME π
snd_soc_usb_update_offload_route β bestie, this is the one that finds your active USB offload path β¨
Oh and hiii, welcome to the Kernel API Manual, section 9 β yes we're in the big-league kernel docs today, put your hair up π
πΈ SYNOPSIS πΈ
int snd_soc_usb_update_offload_route (struct device *dev , int card ,
int pcm , int direction , enum snd_soc_usb_kctl path , long *route );
okay so it returns an int, it takes a whole little friend group of args, and it's giving "I know where the audio is going" energy π
π¦ ARGUMENTS π¦
devβ the USB device you're asking about, aka where we go to get the offload status πcardβ the USB card index, literally just the card's number πpcmβ the USB PCM device index, the pcm's number, no cap π§directionβ playback or capture direction, pick your fighter πpathβ apcmor card index (that's the typeenum snd_soc_usb_kctl, iykyk) πrouteβ pointer to the route output array, this is where the answer lands π«Ά
β¨ DESCRIPTION β¨
So what does it do? It fetches the current status for the USB SND card index and PCM device index you specified. Iconic. Obsessed. π
The route argument should be an array of integers being used for a kcontrol output π β and listen close, because the layout matters, bestie:
- the first element should have the selected card index
- the second element should have the selected pcm device index
That's the whole vibe check. Two slots, two jobs, no drama π§
π₯ SEE ALSO π₯
Kernel file ./sound/soc/soc-usb.c and its whole squad:
snd_soc_usb_setup_offload_jack(9)snd_soc_usb_find_priv_data(9)snd_soc_usb_find_supported_format(9)snd_soc_usb_allocate_port(9)snd_soc_usb_free_port(9)snd_soc_usb_add_port(9)snd_soc_usb_remove_port(9)snd_soc_usb_connect(9)snd_soc_usb_disconnect(9)
π friendly reminder from your girl:routeis a pointer to an array of integers, so it better have room for the card index at[0]and the pcm index at[1]. Don't come crying to me when you write past it. π
okay that's the page!! this came out of ./sound/soc, dated October 2026, and it's filed under snd_soc_usb_...ffload_route(9) in the Kernel API Manual π mwah, go read the rest of the squad, ily, bye!! πππ¦
π¦ 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