cs_amp_set_...bration_data(9)
π« cs_amp_set_efi_calibration_data β from the Kernel API Manual β¨
okay so bestie, this is from the Kernel API Manual (section 9, kernel API vibes π
) and it's literally the page for cs_amp_set_...bration_data(9) β yes the title is truncated like that, that's just how it's printed, don't come for me π«Ά. Anyway, it's giving "write a calibration data entry to EFI" and honestly it slays.
β¨ NAME β¨
cs_amp_set_efi_calibration_data β write a calibration data entry to EFI. that's it, that's the whole job, and she does it π
πΈ SYNOPSIS πΈ
int cs_amp_set_efi_calibration_data (struct device *dev , int amp_index
, int num_amps , const struct cirrus_amp_cal_data *in_data );
like, four args, one int back, no cap π¦
π ARGUMENTS π
devβ thestruct deviceof the caller. your device, your business β¨amp_indexβ the entry index to use, or-1to use any available slot.-1is the "idc just find me a spot" energy πnum_ampsβ the maximum number of amps to reserve slots for, or-1to ignore. so-1means don't reserve, just vibe πin_dataβ thestruct cirrus_amp_cal_dataentry to be written to EFI. this is the actual data getting shipped off to EFI-land π
π₯ DESCRIPTION π₯
okay so here's the tea, and it's a whole priority list π
if a Vendor-specific variable exists, it will be updated. else if the Cirrus variable exists, it will be updated. else the Cirrus variable will be created. periodt β that's the order, don't mess with the order π
now, if amp_index >= 0, the data gets placed in this entry of the calibration data array, overwriting what was in that entry π (yes, straight up replacing it). and any other entries with the same calTarget will be marked empty. so like, one target, one slot, we don't do duplicates here π«Ά
if amp_index < 0 and in_data->calTarget matches any existing entry, that entry will be overwritten. else, the first available free entry will be used β and if there are no free entries at all, it extends the size of the EFI variable π₯ iconic problem-solving honestly.
if num_amps > 0, the EFI variable will be sized to contain at least this many calibration entries, with any new entries marked empty. lowkey just setting aside the seats before the guests arrive π
β RETURN β
0β the write was successful. we love a clean win π-EFBIGβ space could not be made in the EFI file to add the entry. tragic, genuinely π-EACCESβ it was not possible to read or write the EFI variable. access said no ma'am π
π¦ SEE ALSO π¦
Kernel file ./sound/soc/codecs/cs-amp-lib.c β that's the home base bestie β¨
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_get_vendor_spkid(9)cs_amp_devm_get_vendor_specific_variant_id(9)cs_amp_create_debugfs(9)
go read them, iykyk ππ
and that's the whole page, bestie π«Ά this cutie lives in ./sound/soc/codecs, dated October 2026, and she's listed under cs_amp_set_...bration_data(9) β stan her, she writes calibration data to EFI and she does it flawlessly πβ¨π
π¦ 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