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 at canonical.com> --- src/modules/alsa/module-alsa-card.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c index 2529c0d..11197a8 100644 --- a/src/modules/alsa/module-alsa-card.c +++ b/src/modules/alsa/module-alsa-card.c @@ -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); -- 1.7.9.5