]> code.delx.au - pulseaudio/commitdiff
alsa: Fix ELD access warning on shutdown
authorDavid Henningsson <david.henningsson@canonical.com>
Tue, 16 Apr 2013 12:56:35 +0000 (14:56 +0200)
committerDavid Henningsson <david.henningsson@canonical.com>
Wed, 24 Apr 2013 08:57:47 +0000 (10:57 +0200)
The hdmi_eld_changed callback is called by alsa-lib at shutdown.
In that case, just exit instead of trying to access something with
already closed handles.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/modules/alsa/module-alsa-card.c

index 9b739dcace06e5f4ddec4d6cf77e6d77e03f9017..b37eabc466939864b0977efe406180dc2f975dd6 100644 (file)
@@ -409,6 +409,9 @@ static int hdmi_eld_changed(snd_hctl_elem_t *elem, unsigned int mask) {
     pa_hdmi_eld eld;
     bool changed = false;
 
+    if (mask == SND_CTL_EVENT_MASK_REMOVE)
+        return 0;
+
     p = find_port_with_eld_device(u->card->ports, device);
     if (p == NULL) {
         pa_log_error("Invalid device changed in ALSA: %d", device);