alsactl: fix --sched-idle (set it really to SCHED_IDLE)

Reported-by: tommy <tommy@kelsos.ptp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-12-03 13:53:25 +01:00
parent 160b47e27c
commit 34e373d0b1
2 changed files with 3 additions and 1 deletions

View file

@ -7,6 +7,8 @@ man_MANS += alsactl_init.7
endif endif
EXTRA_DIST=alsactl.1 alsactl_init.xml EXTRA_DIST=alsactl.1 alsactl_init.xml
AM_CFLAGS = -D_GNU_SOURCE
alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c daemon.c \ alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c daemon.c \
monitor.c monitor.c

View file

@ -161,7 +161,7 @@ static void do_nice(int use_nice, int sched_idle)
if (sched_idle) { if (sched_idle) {
if (sched_getparam(0, &sched_param) >= 0) { if (sched_getparam(0, &sched_param) >= 0) {
sched_param.sched_priority = 0; sched_param.sched_priority = 0;
if (!sched_setscheduler(0, SCHED_RR, &sched_param)) if (!sched_setscheduler(0, SCHED_IDLE, &sched_param))
error("sched_setparam failed: %s", strerror(errno)); error("sched_setparam failed: %s", strerror(errno));
} else { } else {
error("sched_getparam failed: %s", strerror(errno)); error("sched_getparam failed: %s", strerror(errno));