sound/hda/core/i915.c

Source file repositories/reference/linux-study-clean/sound/hda/core/i915.c

File Facts

System
Linux kernel
Corpus path
sound/hda/core/i915.c
Extension
.c
Size
6096 bytes
Lines
209
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

if (connectivity_check(display_dev, hdac_pci)) {
			pci_dev_put(display_dev);
			return true;
		}
	}

	return false;
}

/**
 * snd_hdac_i915_init - Initialize i915 audio component
 * @bus: HDA core bus
 *
 * This function is supposed to be used only by a HD-audio controller
 * driver that needs the interaction with i915 graphics.
 *
 * This function initializes and sets up the audio component to communicate
 * with i915 graphics driver.
 *
 * Returns zero for success or a negative error code.
 */
int snd_hdac_i915_init(struct hdac_bus *bus)
{
	struct drm_audio_component *acomp;
	int err;

	if (!i915_gfx_present(to_pci_dev(bus->dev)))
		return -ENODEV;

	err = snd_hdac_acomp_init(bus, NULL,
				  i915_component_master_match,
				  sizeof(struct i915_audio_component) - sizeof(*acomp));
	if (err < 0)
		return err;
	acomp = bus->audio_component;
	if (!acomp)
		return -ENODEV;
	if (!acomp->ops) {
		snd_hdac_acomp_exit(bus);
		return dev_err_probe(bus->dev, -EPROBE_DEFER,
				     "couldn't bind with audio component\n");
	}
	return 0;
}
EXPORT_SYMBOL_GPL(snd_hdac_i915_init);

Annotation

Implementation Notes