Skip to contentSkip to conversation

alsactl: avoid needless wakeups in monitor loop.

PATCH Applied Zev Weiss 3 participants 4 messages Oct 17, 2019 – Apr 14, 2020

lore
Share & tools
lore

Zev Weiss

author
#0 lore raw

PATCH 1/1 alsactl: avoid needless wakeups in monitor loop.

The timeout wasn't really being used for anything; disabling it should reduce idle energy consumption slightly.

---
 alsactl/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
alsactl/monitor.c +1 -1
index 6b090e4f5c92..6d9328d899a4 100644
@@ -340,7 +340,7 @@ static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs,
 		int count;
 		int i;
 
-		count = epoll_wait(epfd, epev, max_ev_count, 200);
+		count = epoll_wait(epfd, epev, max_ev_count, -1);
 		if (count < 0) {
 			err = count;
 			break;
Signature · 6 lines
2.23.0

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
author
#1 lore raw

Ping -- it's been a while since I sent this and
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-October/156866.html, never saw any response though. Any problems with these patches?

Thanks,
Zev Weiss

Quoted 24 lines · Zev Weiss

The timeout wasn't really being used for anything; disabling it should reduce idle energy consumption slightly.

---
alsactl/monitor.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
alsactl/monitor.c +1 -1
index 6b090e4f5c92..6d9328d899a4 100644
@@ -340,7 +340,7 @@ static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs,
 		int count;
 		int i;
 
-		count = epoll_wait(epfd, epev, max_ev_count, 200);
+		count = epoll_wait(epfd, epev, max_ev_count, -1);
 		if (count < 0) {
 			err = count;
 			break;
Signature · 1 line
2.23.0
Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Zev Weiss

Hi,

Quoted 7 lines · Zev Weiss

The timeout wasn't really being used for anything; disabling it should reduce idle energy consumption slightly.

---
 alsactl/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I overlooked it as well... It looks good to me.

Quoted 15 lines
alsactl/monitor.c +1 -1
index 6b090e4f5c92..6d9328d899a4 100644
@@ -340,7 +340,7 @@ static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs,
 		int count;
 		int i;
 
-		count = epoll_wait(epfd, epev, max_ev_count, 200);
+		count = epoll_wait(epfd, epev, max_ev_count, -1);
 		if (count < 0) {
 			err = count;
 			break;
Signature · 1 line
2.23.0

Regards

Takashi Sakamoto

#3 lore raw

Dne 12. 04. 20 v 4:19 Takashi Sakamoto napsal(a):

Quoted 11 lines

Hi,

Quoted 7 lines · Zev Weiss

The timeout wasn't really being used for anything; disabling it should reduce idle energy consumption slightly.

---
  alsactl/monitor.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

I overlooked it as well... It looks good to me.

Applied. Thanks.

Jaroslav

Quoted 21 lines
Quoted 16 lines
alsactl/monitor.c +1 -1
index 6b090e4f5c92..6d9328d899a4 100644
@@ -340,7 +340,7 @@ static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs,
  		int count;
  		int i;
 
-		count = epoll_wait(epfd, epev, max_ev_count, 200);
+		count = epoll_wait(epfd, epev, max_ev_count, -1);
  		if (count < 0) {
  			err = count;
  			break;
Signature · 1 line
2.23.0

Regards

Takashi Sakamoto

Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.