diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-02-07 18:27:59 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-02-08 10:58:59 -0500 |
commit | 8857c7d065e900a0b3829c97634c99501b606541 (patch) | |
tree | c84d6ab90fefbeacc17abded0f010364211a5039 /sound/hda | |
parent | 3521ee994bca90c57b539e106ff7e12a839aa8ea (diff) |
i915/snd_hdac: I915 subcomponent for the snd_hdac
Since we need multiple components for I915 for different purposes
(Audio & Mei_hdcp), we adopt the subcomponents methodology introduced
by the previous patch (mentioned below).
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Mon Jan 28 17:08:20 2019 +0530
components: multiple components for a device
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by-by: Ramalingam C <ramalinagm.c@intel.com> (commit message)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (code)
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Russell King <rmk+kernel@arm.linux.org.uk>
cc: Rafael J. Wysocki <rafael@kernel.org>
cc: Jaroslav Kysela <perex@perex.cz>
cc: Takashi Iwai <tiwai@suse.com>
cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
cc: Jani Nikula <jani.nikula@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190207232759.14553-4-daniel.vetter@ffwll.ch
Diffstat (limited to 'sound/hda')
-rw-r--r-- | sound/hda/hdac_component.c | 4 | ||||
-rw-r--r-- | sound/hda/hdac_i915.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c index a6d37b9d6413..5c95933e739a 100644 --- a/sound/hda/hdac_component.c +++ b/sound/hda/hdac_component.c | |||
@@ -269,7 +269,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_acomp_register_notifier); | |||
269 | */ | 269 | */ |
270 | int snd_hdac_acomp_init(struct hdac_bus *bus, | 270 | int snd_hdac_acomp_init(struct hdac_bus *bus, |
271 | const struct drm_audio_component_audio_ops *aops, | 271 | const struct drm_audio_component_audio_ops *aops, |
272 | int (*match_master)(struct device *, void *), | 272 | int (*match_master)(struct device *, int, void *), |
273 | size_t extra_size) | 273 | size_t extra_size) |
274 | { | 274 | { |
275 | struct component_match *match = NULL; | 275 | struct component_match *match = NULL; |
@@ -288,7 +288,7 @@ int snd_hdac_acomp_init(struct hdac_bus *bus, | |||
288 | bus->audio_component = acomp; | 288 | bus->audio_component = acomp; |
289 | devres_add(dev, acomp); | 289 | devres_add(dev, acomp); |
290 | 290 | ||
291 | component_match_add(dev, &match, match_master, bus); | 291 | component_match_add_typed(dev, &match, match_master, bus); |
292 | ret = component_master_add_with_match(dev, &hdac_component_master_ops, | 292 | ret = component_master_add_with_match(dev, &hdac_component_master_ops, |
293 | match); | 293 | match); |
294 | if (ret < 0) | 294 | if (ret < 0) |
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 617ff1aa818f..7aee090e3d27 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c | |||
@@ -82,9 +82,11 @@ void snd_hdac_i915_set_bclk(struct hdac_bus *bus) | |||
82 | } | 82 | } |
83 | EXPORT_SYMBOL_GPL(snd_hdac_i915_set_bclk); | 83 | EXPORT_SYMBOL_GPL(snd_hdac_i915_set_bclk); |
84 | 84 | ||
85 | static int i915_component_master_match(struct device *dev, void *data) | 85 | static int i915_component_master_match(struct device *dev, int subcomponent, |
86 | void *data) | ||
86 | { | 87 | { |
87 | return !strcmp(dev->driver->name, "i915"); | 88 | return !strcmp(dev->driver->name, "i915") && |
89 | subcomponent == I915_COMPONENT_AUDIO; | ||
88 | } | 90 | } |
89 | 91 | ||
90 | /* check whether intel graphics is present */ | 92 | /* check whether intel graphics is present */ |