STRUCT SND_SOC_ACPI_MACH(9)
π NAME π
Okay so welcome to struct snd_soc_acpi_mach(9) from the Kernel API Manual, bestie! π«Ά This little icon is an ACPI-based machine descriptor. Most of the fields are literally related to the hardware β the glow-up exceptions are the firmware and topology file names. And a platform supported by legacy and Sound Open Firmware (SOF) would expose all the firmware/topology related fields. Periodt. π
β¨ SYNOPSIS β¨
Hereβs the whole struct, no edits, no cap:
struct snd_soc_acpi_mach {
u8 id[ACPI_ID_LEN];
const char *uid;
const struct snd_soc_acpi_codecs *comp_ids;
const u32 link_mask;
const struct snd_soc_acpi_link_adr *links;
const char *drv_name;
const char *fw_filename;
const char *tplg_filename;
const char *board;
struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
const void *quirk_data;
bool (*machine_check)(void *arg);
void *pdata;
struct snd_soc_acpi_mach_params mach_params;
const char *sof_tplg_filename;
const u32 tplg_quirk_mask;
int (*get_function_tplg_files)(struct snd_soc_card *card, const
struct snd_soc_acpi_mach *mach, const char *prefix, const char
***tplg_files, bool best_effort);
};
π Members π
No cap, hereβs the full cast of fields, each one doing its main character thing:
idβ the ACPI ID (usually the codecβs) used to find a matching machine driver. Lowkey the matchmaker. πuidβ the ACPI Unique ID; it can be used to disambiguate matches. iykyk. π¦comp_idsβ list of compatible audio codecs using the same machine driver, firmware and topology. Itβs giving βwe share the vibe.β β¨link_maskβ describes the required board layout, e.g. for SoundWire. Board-layout realness. πlinksβ array of link_ADRdescriptors, null terminated. Not me being obsessed with a null-terminated array. πdrv_nameβ machine driver name. Simple, iconic, essential. πfw_filenameβ firmware file name. Used when SOF is not enabled. πtplg_filenameβ topology file name. Used when SOF is not enabled. πΈboardβ board name. Short and sweet. π«Άmachine_quirkβ pointer to quirk, usually based on DMI information when the ACPI ID alone is not sufficient, wrong or misleading. The βwait, bestie, thatβs not the whole storyβ field. πquirk_dataβ data used to uniquely identify a machine, usually a list of audio codecs whose presence gets checked with ACPI. Extra proof energy. π₯machine_checkβ pointer to quirk function. The functionality is similar to the use ofmachine_quirk, except that the return value is a boolean: the intent is to skip a machine if the additional hardware/firmware verification invalidates the initial selection in thesnd_soc_acpi_machtable. The way that return value is a boolean is so real. πpdataβ intended for platform data or machine specific-ops. This structure is not constant since this field may be updated at run-time. Watch out, it moves. πmach_paramsβ machine driver configuration. The config queen. πsof_tplg_filenameβ Sound Open Firmware topology file name, if enabled. βtplg_quirk_maskβ quirks to select different topology files dynamically. Dynamic selection ate. πget_function_tplg_filesβ this is an optional callback. If itβs specified, then instead of the singlesof_tplg_filenamethe callback will return the list of function topology files to be loaded. Return value: The number of the files or negativeERRNO.0means that the single topology file should be used, no function topology split can be used on the machine. And the params are:card: the pointer of the cardmach: the pointer of the machine driverprefix: the prefix of the topology file name. Typically, it is the path.tplg_files: the pointer of the array of the topology file names.best_effort: ignore non supported links and try to build the card in best effort with supported links
π SEE ALSO π
- Kernel file
./include/sound/soc-acpi.hstructsnd_soc_acpi_mach_params(9),struct snd_soc_acpi_endpoint(9),struct snd_soc_acpi_adr_device(9),struct snd_soc_acpi_link_adr(9),struct snd_soc_acpi_codecs(9)
Okay bye bestie! This pageβs source/version is ./include/sound, dated October 2026, and the title is struct snd_soc_acpi_mach(9) β slay and stay hydrated! ππ
π¦ 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