sound/hda/core/intel-dsp-config.c

Source file repositories/reference/linux-study-clean/sound/hda/core/intel-dsp-config.c

File Facts

System
Linux kernel
Corpus path
sound/hda/core/intel-dsp-config.c
Extension
.c
Size
19901 bytes
Lines
857
Domain
Driver Families
Bucket
sound/hda
Inferred role
Driver Families: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct config_entry {
	u32 flags;
	u16 device;
	u8 acpi_hid[ACPI_ID_LEN];
	const struct dmi_system_id *dmi_table;
	const struct snd_soc_acpi_codecs *codec_hid;
};

static const struct snd_soc_acpi_codecs __maybe_unused essx_83x6 = {
	.num_codecs = 3,
	.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
};

/*
 * configuration table
 * - the order of similar PCI ID entries is important!
 * - the first successful match will win
 */
static const struct config_entry config_table[] = {
/* Merrifield */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD)
	{
		.flags = FLAG_SOF,
		.device = PCI_DEVICE_ID_INTEL_SST_TNG,
	},
#endif
/*
 * Skylake, Kabylake, Apollolake
 * the legacy HDAudio driver is used except on Up Squared (SOF) and
 * Chromebooks (SST), as well as devices based on the ES8336 codec
 */
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_AVS)
	{
		.flags = FLAG_SST,
		.device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,
		.dmi_table = (const struct dmi_system_id []) {
			{
				.ident = "Google Chromebooks",
				.matches = {
					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
				}
			},
			{}
		}
	},
	{
		.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
		.device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,
	},
	{
		.flags = FLAG_SST,
		.device = PCI_DEVICE_ID_INTEL_HDA_KBL_LP,
		.dmi_table = (const struct dmi_system_id []) {
			{
				.ident = "Google Chromebooks",
				.matches = {
					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
				}
			},
			{}
		}
	},
	{
		.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
		.device = PCI_DEVICE_ID_INTEL_HDA_KBL_LP,
	},
	{
		.flags = FLAG_SST,
		.device = PCI_DEVICE_ID_INTEL_HDA_APL,
		.dmi_table = (const struct dmi_system_id []) {
			{
				.ident = "Google Chromebooks",
				.matches = {
					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
				}
			},
			{}
		}
	},
	{
		.flags = FLAG_SST,
		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_M,
	},
	{
		.flags = FLAG_SST,
		.device = PCI_DEVICE_ID_INTEL_HDA_FCL,
	},
#else /* AVS disabled; force to legacy as SOF doesn't work for SKL or KBL */
	{
		.device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,

Annotation

Implementation Notes