Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177878125
D50306.1795496710.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D50306.1795496710.diff
View Options
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -1638,6 +1638,35 @@
sizeof(sc->dev), sysctl_hdac_polling, "I", "Enable polling mode");
}
+/****************************************************************************
+ * int hdac_shutdown(device_t)
+ *
+ * Power down HDA bus and codecs.
+ ****************************************************************************/
+static int
+hdac_shutdown(device_t dev)
+{
+ struct hdac_softc *sc = device_get_softc(dev);
+
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Shutdown...\n");
+ );
+ callout_drain(&sc->poll_callout);
+ taskqueue_drain(taskqueue_thread, &sc->unsolq_task);
+ bus_generic_shutdown(dev);
+
+ hdac_lock(sc);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Reset controller...\n");
+ );
+ hdac_reset(sc, false);
+ hdac_unlock(sc);
+ HDA_BOOTHVERBOSE(
+ device_printf(dev, "Shutdown done\n");
+ );
+ return (0);
+}
+
/****************************************************************************
* int hdac_suspend(device_t)
*
@@ -2148,6 +2177,7 @@
DEVMETHOD(device_probe, hdac_probe),
DEVMETHOD(device_attach, hdac_attach),
DEVMETHOD(device_detach, hdac_detach),
+ DEVMETHOD(device_shutdown, hdac_shutdown),
DEVMETHOD(device_suspend, hdac_suspend),
DEVMETHOD(device_resume, hdac_resume),
/* Bus interface */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 24, 5:05 AM (19 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41947808
Default Alt Text
D50306.1795496710.diff (1 KB)
Attached To
Mode
D50306: snd_hda: Add shutdown method
Attached
Detach File
Event Timeline