mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
alsa: catch and handle some more errors
This commit is contained in:
parent
acad6b8f2b
commit
91f4e4d3c8
1 changed files with 10 additions and 6 deletions
|
|
@ -600,17 +600,19 @@ static int pipewire_write_integer(snd_ctl_ext_t * ext, snd_ctl_ext_key_t key,
|
||||||
vol->values[i] = value[i];
|
vol->values[i] = value[i];
|
||||||
|
|
||||||
if (key == 0)
|
if (key == 0)
|
||||||
set_volume_mute(ctl, ctl->default_source, vol, NULL);
|
err = set_volume_mute(ctl, ctl->default_source, vol, NULL);
|
||||||
else
|
else
|
||||||
set_volume_mute(ctl, ctl->default_sink, vol, NULL);
|
err = set_volume_mute(ctl, ctl->default_sink, vol, NULL);
|
||||||
} else {
|
} else {
|
||||||
if (key == 1)
|
if (key == 1)
|
||||||
set_volume_mute(ctl, ctl->default_source, NULL, &ctl->source_muted);
|
err = set_volume_mute(ctl, ctl->default_source, NULL, &ctl->source_muted);
|
||||||
else
|
else
|
||||||
set_volume_mute(ctl, ctl->default_sink, NULL, &ctl->sink_muted);
|
err = set_volume_mute(ctl, ctl->default_sink, NULL, &ctl->sink_muted);
|
||||||
}
|
}
|
||||||
|
if (err < 0)
|
||||||
|
goto finish;
|
||||||
|
|
||||||
wait_resync(ctl);
|
err = wait_resync(ctl);
|
||||||
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
@ -1353,7 +1355,9 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
|
||||||
&ctl->registry_listener,
|
&ctl->registry_listener,
|
||||||
®istry_events, ctl);
|
®istry_events, ctl);
|
||||||
|
|
||||||
wait_resync(ctl);
|
err = wait_resync(ctl);
|
||||||
|
if (err < 0)
|
||||||
|
goto error_unlock;
|
||||||
|
|
||||||
pw_thread_loop_unlock(ctl->mainloop);
|
pw_thread_loop_unlock(ctl->mainloop);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue