summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-04-02 11:27:38 +0200
committerTanu Kaskinen <tanuk@iki.fi>2013-04-02 18:48:17 +0300
commitca55a267a490793433d124b5e421a60be59c47ea (patch)
tree0637df3d84db4cf53a246bcf8fac17f27e8432d2
parentba9cfcc20df7f723a8460cde36b464d696a3f067 (diff)
alsa-card: 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 <maarten.lankhorst@canonical.com>
-rw-r--r--src/modules/alsa/module-alsa-card.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index 3b96ceac..2529c0df 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;