summaryrefslogtreecommitdiff
path: root/backends/alsa/alsa-element.c
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-08-18 20:49:17 +0200
committerMichal Ratajsky <[email protected]>2014-08-18 20:49:17 +0200
commit5f20ab328add9442082277a57c23273a3a2125ed (patch)
treefb458ba63f25db35de6b5a9c9acf0f967020107f /backends/alsa/alsa-element.c
parent94d24482d8b1013947c0e2dac7330180b6ae02f6 (diff)
downloadlibmatemixer-5f20ab328add9442082277a57c23273a3a2125ed.tar.bz2
libmatemixer-5f20ab328add9442082277a57c23273a3a2125ed.tar.xz
Global update
Diffstat (limited to 'backends/alsa/alsa-element.c')
-rw-r--r--backends/alsa/alsa-element.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/backends/alsa/alsa-element.c b/backends/alsa/alsa-element.c
index f925064..d837965 100644
--- a/backends/alsa/alsa-element.c
+++ b/backends/alsa/alsa-element.c
@@ -51,3 +51,19 @@ alsa_element_load (AlsaElement *element)
return ALSA_ELEMENT_GET_INTERFACE (element)->load (element);
}
+
+void
+alsa_element_close (AlsaElement *element)
+{
+ AlsaElementInterface *iface;
+
+ g_return_if_fail (ALSA_IS_ELEMENT (element));
+
+ /* Close the element by unsetting the ALSA element and optionally calling
+ * a closing function */
+ alsa_element_set_snd_element (element, NULL);
+
+ iface = ALSA_ELEMENT_GET_INTERFACE (element);
+ if (iface->close != NULL)
+ iface->close (element);
+}