Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-26 Thread Raman Shishniou
On 02/23/2018 05:06 PM, Georg Chini wrote: > On 23.02.2018 13:54, Raman Shishniou wrote: >> On 02/23/2018 01:26 PM, Georg Chini wrote: >>> On 23.02.2018 11:03, Raman Shishniou wrote: On 02/23/2018 11:38 AM, Georg Chini wrote: > But now I have another issue: > You are polling the

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Raman Shishniou
On 02/23/2018 05:06 PM, Georg Chini wrote: > On 23.02.2018 13:54, Raman Shishniou wrote: >> On 02/23/2018 01:26 PM, Georg Chini wrote: >>> On 23.02.2018 11:03, Raman Shishniou wrote: On 02/23/2018 11:38 AM, Georg Chini wrote: > But now I have another issue: > You are polling the

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Georg Chini
On 23.02.2018 13:54, Raman Shishniou wrote: On 02/23/2018 01:26 PM, Georg Chini wrote: On 23.02.2018 11:03, Raman Shishniou wrote: On 02/23/2018 11:38 AM, Georg Chini wrote: But now I have another issue: You are polling the pipe and running the loop even if the source is user suspended.

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Raman Shishniou
On 02/23/2018 01:26 PM, Georg Chini wrote: > On 23.02.2018 11:03, Raman Shishniou wrote: >> On 02/23/2018 11:38 AM, Georg Chini wrote: >> >>> But now I have another issue: >>> You are polling the pipe and running the loop even if the source is user >>> suspended. >>> This seems like a waste of

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Georg Chini
On 23.02.2018 11:03, Raman Shishniou wrote: On 02/23/2018 11:38 AM, Georg Chini wrote: But now I have another issue: You are polling the pipe and running the loop even if the source is user suspended. This seems like a waste of CPU (even more than accepting some POLLIN spam during wakeup

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Raman Shishniou
On 02/23/2018 11:38 AM, Georg Chini wrote: > On 22.02.2018 22:01, Raman Shishniou wrote: >> On 02/22/2018 10:18 PM, Georg Chini wrote: -/* Hmm, nothing to do. Let's sleep */ -pollfd->events = (short) (u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0);

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-23 Thread Georg Chini
On 22.02.2018 22:01, Raman Shishniou wrote: On 02/22/2018 10:18 PM, Georg Chini wrote: -/* Hmm, nothing to do. Let's sleep */ -pollfd->events = (short) (u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0); +/* Post data to source, discard data or wait for

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Raman Shishniou
On 02/22/2018 10:18 PM, Georg Chini wrote: >> -/* Hmm, nothing to do. Let's sleep */ >> -pollfd->events = (short) (u->source->thread_info.state == >> PA_SOURCE_RUNNING ? POLLIN : 0); >> +/* Post data to source, discard data or wait for state transition >> to be complete

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Georg Chini
On 22.02.2018 20:18, Georg Chini wrote: On 22.02.2018 17:15, Raman Shyshniou wrote: Currently the pipe-source will remain running even if no writer is connected and therefore no data is produced. This patch prevets this by auto-suspending source when all writers are disconnected. ---  

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Georg Chini
On 22.02.2018 17:15, Raman Shyshniou wrote: Currently the pipe-source will remain running even if no writer is connected and therefore no data is produced. This patch prevets this by auto-suspending source when all writers are disconnected. --- src/modules/module-pipe-source.c | 190

Re: [pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Raman Shishniou
On 02/22/2018 07:15 PM, Raman Shyshniou wrote: > Currently the pipe-source will remain running even if no > writer is connected and therefore no data is produced. > This patch prevets this by auto-suspending source > when all writers are disconnected. This a draft. I applied Tanu's patch to next

[pulseaudio-discuss] [PATCH v9] pipe-source: [DRAFT] implement autosuspend behavior

2018-02-22 Thread Raman Shyshniou
Currently the pipe-source will remain running even if no writer is connected and therefore no data is produced. This patch prevets this by auto-suspending source when all writers are disconnected. --- src/modules/module-pipe-source.c | 190 --- 1 file changed,