Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137926884
D50306.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50306.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
Fri, Nov 28, 8:19 AM (9 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26278338
Default Alt Text
D50306.diff (1 KB)
Attached To
Mode
D50306: snd_hda: Add shutdown method
Attached
Detach File
Event Timeline
Log In to Comment