alsa: Fix ELD access warning on shutdown

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>
This commit is contained in:
David Henningsson 2013-04-16 14:56:35 +02:00
parent d389e7d37c
commit 2553757922

View 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);