cs_amp_devm_...c_variant_id(9)
β¨ 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 tostruct device, your classic device pointer bestie π«Άssid_vendorβ PCI Subsystem Vendor (-1if unknown)ssid_deviceβ PCI Subsystem Device (-1if 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_PTRerror value π
β SEE ALSO β
Kernel file ./sound/soc/codecs/cs-amp-lib.c and its bestie functions:
cs_amp_write_cal_coeffs(9)cs_amp_read_cal_coeffs(9)cs_amp_write_ambient_temp(9)cs_amp_get_efi_calibration_data(9)cs_amp_set_efi_calibration_data(9)cs_amp_get_vendor_spkid(9)cs_amp_create_debugfs(9)
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
- 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