acpi_nhlt_tb_find_fmtcfg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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.: PDM or SSP.
  • 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 πŸ’–
  • NULL if it's not found πŸ™ˆ
  • or an ERR_PTR otherwise 😭

πŸ”₯ SEE ALSO πŸ”₯

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