diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 0d2c7c7bf..4201f19dd 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -489,6 +489,10 @@ static void add_bind_ctl_params(struct state *state, struct spa_pod_builder *b) int err; for (unsigned int i = 0; i < state->num_bind_ctls; i++) { + + if(!state->bound_ctls[i].value || !state->bound_ctls[i].info) + continue; + err = snd_ctl_elem_read(state->ctl, state->bound_ctls[i].value); if (err < 0) { spa_log_warn(state->log, "Could not read elem value for '%s': %s", @@ -699,6 +703,9 @@ static void bind_ctl_event(struct spa_source *source) for (unsigned int i = 0; i < state->num_bind_ctls; i++) { int err; + if(!state->bound_ctls[i].value || !state->bound_ctls[i].info) + continue; + // Check if we have the right element snd_ctl_elem_value_get_id(state->bound_ctls[i].value, bound_id); if (snd_ctl_elem_id_compare_set(id, bound_id) ||