STRUCT SND_SOC_ACPI_MACH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 _ADR descriptors, 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 of machine_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 the snd_soc_acpi_mach table. 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 single sof_tplg_filename the callback will return the list of function topology files to be loaded. Return value: The number of the files or negative ERRNO. 0 means 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 card
    • mach: the pointer of the machine driver
    • prefix: 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.h struct snd_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