vga_switcher...audio_client(9)
π vga_switcheroo_register_audio_client β the kernel API manual, bestie edition π
okay so this is from the Kernel API Manual, page vga_switcher...audio_client(9), and it's literally the whole "how do I tell the kernel about my audio client" situation. sit down, grab a strawberry π, we're doing this.
β¨ NAME β¨
vga_switcheroo_register_audio_client β register audio client
like... it registers an audio client. that's the whole vibe. π
β¨ SYNOPSIS β¨
int vga_switcheroo_register_audio_client (struct pci_dev *pdev , const
struct vga_switcheroo_client_ops *ops , struct pci_dev *vga_dev );
that's the signature, no cap, copy it exactly, pdev space comma ops space comma vga_dev β the spacing is giving old manpage, and we respect it π«Ά
β¨ ARGUMENTS β¨
pdevβ the client pci device, like the actual device you're registering. main character energy πopsβ the client callbacks. the little function pointers that go "hey do this" when stuff happens. lowkey essential πvga_devβ the pci device that's bound to the current audio client. not a rando, it's the one that's like, actually attached. π¦
β¨ DESCRIPTION β¨
so here's the tea β β this registers an audio client, meaning the audio device on a GPU. yes, GPU audio, it's a thing, iykyk.
the client is assumed to use runtime PM. like, that's the deal going in, the function is not checking your vibe, it's assuming it. π
and before you even call this, you gotta call vga_switcheroo_client_probe_defer first β that's the vibe check β¨, it makes sure all the prerequisites are actually met. don't skip the pre-check, bestie, that's the whole point of it existing.
β¨ RETURN β¨
0β slay, success π-ENOMEMβ memory allocation error, the classic "out of memory" moment π-EINVALβ got an error getting the client id. not invalid input exactly, it's the getting client id part that went wrong, so read carefully π
β¨ SEE ALSO β¨
the whole friend group, fr fr π β go read these next:
Kernel file ./drivers/gpu/vga/vga_switcheroo.c Overview(9)struct vga_switcheroo_client(9)struct vgasr_priv(9)vga_switcheroo_register_handler(9)vga_switcheroo_unregister_handler(9)vga_switcheroo_handler_flags(9)vga_switcheroo_register_client(9)vga_switcheroo_client_probe_defer(9)vga_switcheroo_get_client_state(9)vga_switcheroo_unregister_client(9)vga_switcheroo_client_fb_set(9)vga_switcheroo_lock_ddc(9)vga_switcheroo_unlock_ddc(9)Manual switching and manual power control(9)vga_switcheroo_process_delayed_switch(9)Driver power control(9)vga_switcheroo_init_domain_pm_ops(9)
ok that's the whole page!! you ate that π no notes.
and ily, but the receipts at the bottom: this lil page lives in ./drivers/gpu/vga and it's dated October 2026 β¨ go off, kernel docs, periodt π§π
π¦ 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