summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_bind.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-02 23:22:59 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-23 13:17:02 +0100
commitd068ebc25e6e1360510ad8023fe7bca3dacd204e (patch)
tree982ba3c4c1aa5f1a647f505d1d0863b926fde605 /sound/pci/hda/hda_bind.c
parentALSA: hda - Make snd_hda_bus_type public (diff)
downloadlinux-d068ebc25e6e1360510ad8023fe7bca3dacd204e.tar.xz
linux-d068ebc25e6e1360510ad8023fe7bca3dacd204e.zip
ALSA: hda - Move some codes up to hdac_bus struct
A few basic codes for communicating over HD-audio bus are moved to struct hdac_bus now. It has only command and get_response ops in addition to the unsolicited event handling. Note that the codec-side tracing support is disabled temporarily during this transition due to the code shuffling. It will be re-enabled later once when all pieces are settled down. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_bind.c')
-rw-r--r--sound/pci/hda/hda_bind.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c
index e3bd2807b644..0b9ea70c546b 100644
--- a/sound/pci/hda/hda_bind.c
+++ b/sound/pci/hda/hda_bind.c
@@ -74,6 +74,15 @@ static int hda_codec_match(struct hdac_device *dev, struct hdac_driver *drv)
return 0;
}
+/* process an unsolicited event */
+static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev)
+{
+ struct hda_codec *codec = container_of(dev, struct hda_codec, core);
+
+ if (codec->patch_ops.unsol_event)
+ codec->patch_ops.unsol_event(codec, ev);
+}
+
/* reset the codec name from the preset */
static int codec_refresh_name(struct hda_codec *codec, const char *name)
{
@@ -163,6 +172,7 @@ int __hda_codec_driver_register(struct hda_codec_driver *drv, const char *name,
drv->core.driver.pm = &hda_codec_driver_pm;
drv->core.type = HDA_DEV_LEGACY;
drv->core.match = hda_codec_match;
+ drv->core.unsol_event = hda_codec_unsol_event;
return driver_register(&drv->core.driver);
}
EXPORT_SYMBOL_GPL(__hda_codec_driver_register);