Lines Matching +full:audio +full:- +full:core
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * hdac_i915.c - routines for sync between HD-A core and i915 display driver
9 #include <sound/core.h>
15 static int gpu_bind = -1;
18 "(1=always, 0=never, -1=on nomodeset(default))");
21 * snd_hdac_i915_set_bclk - Reprogram BCLK for HSW/BDW
22 * @bus: HDA core bus
26 * are used to convert CDClk (Core Display Clock) to 24MHz BCLK:
36 struct drm_audio_component *acomp = bus->audio_component; in snd_hdac_i915_set_bclk()
37 struct pci_dev *pci = to_pci_dev(bus->dev); in snd_hdac_i915_set_bclk()
41 if (!acomp || !acomp->ops || !acomp->ops->get_cdclk_freq) in snd_hdac_i915_set_bclk()
46 cdclk_freq = acomp->ops->get_cdclk_freq(acomp->dev); in snd_hdac_i915_set_bclk()
75 /* returns true if the devices can be connected for audio */
78 struct pci_bus *bus_a = i915->bus, *bus_b = hdac->bus; in connectivity_check()
84 bus_a = bus_a->parent; in connectivity_check()
85 bus_b = bus_b->parent; in connectivity_check()
95 * on i915 discrete GPUs with embedded HDA audio, the two in connectivity_check()
98 bus_a = bus_a->parent; in connectivity_check()
99 bus_b = bus_b->parent; in connectivity_check()
115 hdac_pci = to_pci_dev(bus->dev); in i915_component_master_match()
118 if ((!strcmp(dev->driver->name, "i915") || in i915_component_master_match()
119 !strcmp(dev->driver->name, "xe")) && in i915_component_master_match()
136 if (display_dev->vendor == PCI_VENDOR_ID_INTEL && in i915_gfx_present()
137 (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY && in i915_gfx_present()
148 * snd_hdac_i915_init - Initialize i915 audio component
149 * @bus: HDA core bus
151 * This function is supposed to be used only by a HD-audio controller
154 * This function initializes and sets up the audio component to communicate
164 if (!i915_gfx_present(to_pci_dev(bus->dev))) in snd_hdac_i915_init()
165 return -ENODEV; in snd_hdac_i915_init()
169 sizeof(struct i915_audio_component) - sizeof(*acomp)); in snd_hdac_i915_init()
172 acomp = bus->audio_component; in snd_hdac_i915_init()
174 return -ENODEV; in snd_hdac_i915_init()
175 if (!acomp->ops) { in snd_hdac_i915_init()
177 return dev_err_probe(bus->dev, -EPROBE_DEFER, in snd_hdac_i915_init()
178 "couldn't bind with audio component\n"); in snd_hdac_i915_init()