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>
14 #define IS_HSW_CONTROLLER(pci) (((pci)->device == 0x0a0c) || \
15 ((pci)->device == 0x0c0c) || \
16 ((pci)->device == 0x0d0c) || \
17 ((pci)->device == 0x160c))
20 * snd_hdac_i915_set_bclk - Reprogram BCLK for HSW/BDW
21 * @bus: HDA core bus
25 * are used to convert CDClk (Core Display Clock) to 24MHz BCLK:
35 struct drm_audio_component *acomp = bus->audio_component; in snd_hdac_i915_set_bclk()
36 struct pci_dev *pci = to_pci_dev(bus->dev); in snd_hdac_i915_set_bclk()
40 if (!acomp || !acomp->ops || !acomp->ops->get_cdclk_freq) in snd_hdac_i915_set_bclk()
45 cdclk_freq = acomp->ops->get_cdclk_freq(acomp->dev); in snd_hdac_i915_set_bclk()
74 /* returns true if the devices can be connected for audio */
77 struct pci_bus *bus_a = i915->bus, *bus_b = hdac->bus; in connectivity_check()
84 * on i915 discrete GPUs with embedded HDA audio, the two in connectivity_check()
87 bus_a = bus_a->parent; in connectivity_check()
88 bus_b = bus_b->parent; in connectivity_check()
91 bus_a = bus_a->parent; in connectivity_check()
92 bus_b = bus_b->parent; in connectivity_check()
108 hdac_pci = to_pci_dev(bus->dev); in i915_component_master_match()
111 if (!strcmp(dev->driver->name, "i915") && in i915_component_master_match()
132 * snd_hdac_i915_init - Initialize i915 audio component
133 * @bus: HDA core bus
135 * This function is supposed to be used only by a HD-audio controller
138 * This function initializes and sets up the audio component to communicate
149 return -ENODEV; in snd_hdac_i915_init()
153 sizeof(struct i915_audio_component) - sizeof(*acomp)); in snd_hdac_i915_init()
156 acomp = bus->audio_component; in snd_hdac_i915_init()
158 return -ENODEV; in snd_hdac_i915_init()
159 if (!acomp->ops) { in snd_hdac_i915_init()
163 wait_for_completion_timeout(&acomp->master_bind_complete, in snd_hdac_i915_init()
167 if (!acomp->ops) { in snd_hdac_i915_init()
168 dev_info(bus->dev, "couldn't bind with audio component\n"); in snd_hdac_i915_init()
170 return -ENODEV; in snd_hdac_i915_init()