cs_amp_devm_...c_variant_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cs_amp_devm_get_vendor_specific_variant_id ✨

okay so this is a page from the Kernel API Manual and bestie, it's literally about grabbing a variant ID string. icon behavior, let's go πŸ’…


🌸 NAME 🌸

cs_amp_devm_get_vendor_specific_variant_id β€” get variant ID string πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

const char * cs_amp_devm_get_vendor_specific_variant_id (struct device
*dev , int ssid_vendor , int ssid_device );

πŸ’– ARGUMENTS πŸ’–

  • dev β€” pointer to struct device, your classic device pointer bestie 🫢
  • ssid_vendor β€” PCI Subsystem Vendor (-1 if unknown)
  • ssid_device β€” PCI Subsystem Device (-1 if unknown)

πŸŽ€ DESCRIPTION πŸŽ€

So what it does: it checks the known vendor-specific hardware identifiers, and if it finds one, it hands you its content as a NUL-terminated string. The returned string is devm-managed ✨ (so like, the devm system's got it, no cap).

Heads up: the returned string is not guaranteed to be globally unique. Generally you should combine it with some other qualifier, such as the PCI SSID, to create a globally unique ID. iykyk 🧚

If the caller has a PCI SSID, it should pass it in ssid_vendor and ssid_device. And if the vendor-spefic ID contains this SSID, it will be stripped from the returned string β€” lowkey to prevent duplication πŸ’€

If the caller does not have a PCI SSID, just pass -1 for ssid_vendor and ssid_device. simple as that 🌈


πŸ”₯ RETURN πŸ”₯

  • a pointer to a devm-managed string πŸ‘‘
  • ERR_PTR(-ENOENT) if there's no vendor-specific qualifier 😭
  • an ERR_PTR error value πŸ’€

⭐ SEE ALSO ⭐

Kernel file ./sound/soc/codecs/cs-amp-lib.c and its bestie functions:


like, that's the whole page and honestly? ate. πŸ“

living in ./sound/soc/codecs, dated October 2026, brought to you by the Kernel API Manual β€” periodt πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from