acpi_nhlt_tb_find_fmtcfg(9)
π acpi_nhlt_tb_find_fmtcfg β it's in the kernel API manual bestie
okay so picture this: you've got a NHLT table and you need to find ONE specific format in it. That's literally this function. It's a search. It's giving "ctrl+F but make it kernel-space." β¨
πΈ SYNOPSIS πΈ
struct acpi_nhlt_format_config * acpi_nhlt_tb_find_fmtcfg (const struct
acpi_table_nhlt *tb , int link_type , int dev_type , int dir , int
bus_id , u16 ch , u32 rate , u16 vbps , u16 bps );
like yes she takes nine whole arguments, she's high maintenance, but she delivers π«Ά
π ARGUMENTS π
tbβ the table you're searching, bestie. the whole vibe. the thing.link_typeβ the hardware link type, e.g.:PDMorSSP.dev_typeβ the device type.dirβ stream direction.bus_idβ the ID of virtual bus hosting the endpoint.chβ number of channels.rateβ samples per second.vbpsβ valid bits per sample.bpsβ bits per sample.
π¦ DESCRIPTION π¦
so here's the cute part π either of link_type, dev_type, dir or bus_id may be set to a negative value to ignore the parameter during the search. That's it. That's the whole trick. Wildcard energy, no cap. π
ngl this is genuinely iconic of her β negative number in, "pretend I didn't see that parameter," out. π
β RETURN β
- A pointer to the format matching the criteria π
NULLif it's not found π- or an
ERR_PTRotherwise π
π₯ SEE ALSO π₯
- Kernel file
./drivers/acpi/nhlt.c acpi_nhlt_get_gbl_table(9)acpi_nhlt_put_gbl_table(9)acpi_nhlt_endpoint_match(9)acpi_nhlt_tb_find_endpoint(9)acpi_nhlt_find_endpoint(9)acpi_nhlt_endpoint_find_fmtcfg(9)acpi_nhlt_find_fmtcfg(9)acpi_nhlt_endpoint_mic_count(9)
the whole friend group fr fr π«Ά
okay that's the whole page, mwah π it lives at ./drivers/acpi, it's dated October 2026, and it's part of the Kernel API Manual β go find your format bestie, you've got this πβ¨
π¦ 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