From: Maarten Lankhorst Date: Tue, 2 Apr 2013 09:27:38 +0000 (+0200) Subject: alsa: skip eld initialization if hctl_handle is NULL X-Git-Tag: v3.99.1~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77347e1e9100fd2062c28269497645decd9457bc;p=platform%2Fupstream%2Fpulseaudio.git alsa: skip eld initialization if hctl_handle is NULL Due to a misconfiguration on my side my hdmi card didn't load with snd-hda-codec-hdmi but through the fallback mechanism. Pulseaudio would crash during early because hctl_handle was null, so skip init_eld_ctls when hctl_handle is null to prevent a crash. Thanks to David Henningsson for helping me find the underlying issue. Signed-off-by: Maarten Lankhorst --- diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c index 3b96cea..2529c0d 100644 --- a/src/modules/alsa/module-alsa-card.c +++ b/src/modules/alsa/module-alsa-card.c @@ -437,6 +437,9 @@ static void init_eld_ctls(struct userdata *u) { void *state; pa_device_port *port; + if (!u->hctl_handle) + return; + PA_HASHMAP_FOREACH(port, u->card->ports, state) { pa_alsa_port_data *data = PA_DEVICE_PORT_DATA(port); snd_hctl_elem_t* hctl_elem;