mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
fix device reservation for system mode
This commit is contained in:
parent
0329edd179
commit
f3de61edf6
3 changed files with 9 additions and 2 deletions
|
|
@ -164,6 +164,9 @@ static int reserve_init(struct userdata *u, const char *dname) {
|
|||
if (u->reserve)
|
||||
return 0;
|
||||
|
||||
if (pa_in_system_mode())
|
||||
return 0;
|
||||
|
||||
/* We are resuming, try to lock the device */
|
||||
if (!(rname = pa_alsa_get_reserve_name(dname)))
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -162,6 +162,9 @@ static int reserve_init(struct userdata *u, const char *dname) {
|
|||
if (u->reserve)
|
||||
return 0;
|
||||
|
||||
if (pa_in_system_mode())
|
||||
return 0;
|
||||
|
||||
/* We are resuming, try to lock the device */
|
||||
if (!(rname = pa_alsa_get_reserve_name(dname)))
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -310,8 +310,9 @@ int pa__init(pa_module *m) {
|
|||
|
||||
pa_snprintf(rname, sizeof(rname), "Audio%i", alsa_card_index);
|
||||
|
||||
if (!(reserve = pa_reserve_wrapper_get(m->core, rname)))
|
||||
goto fail;
|
||||
if (!pa_in_system_mode())
|
||||
if (!(reserve = pa_reserve_wrapper_get(m->core, rname)))
|
||||
goto fail;
|
||||
|
||||
pa_card_new_data_init(&data);
|
||||
data.driver = __FILE__;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue