Re: [pulseaudio-discuss] [PATCH] bluez5-device: Fix memory leak in sco_process_render()

2018-04-10 Thread Raman Shishniou
Hello, On 04/10/2018 01:38 PM, Georg Chini wrote: > On 10.04.2018 10:21, Raman Shishniou wrote: >> Hello, >> >> On 04/09/2018 07:15 PM, Georg Chini wrote: >>> sco_process_render does not unref the memblock when it encounters an error. >>> >>> This p

Re: [pulseaudio-discuss] [PATCH] bluez5-device: Fix memory leak in sco_process_render()

2018-04-10 Thread Raman Shishniou
Hello, On 04/09/2018 07:15 PM, Georg Chini wrote: > sco_process_render does not unref the memblock when it encounters an error. > > This patch fixes the issue. It also changes the return value to 1 in the case > of EAGAIN. Because the data was already rendered and cannot be re-sent, we > have to

Re: [pulseaudio-discuss] [PATCH] pipe-sink: auto-drain the pipe on sink resume

2018-02-27 Thread Raman Shishniou
On 02/26/2018 11:06 PM, Samo Pogačnik wrote: > Dne 26.02.2018 (pon) ob 11:49 +0200 je Tanu Kaskinen napisal(a): >> On Sat, 2018-02-24 at 17:41 +0100, Samo Pogačnik wrote: >>> >>> Added option auto_drain_pipe_on_resume to enable draining any >>> remaining >>> data from the pipe upon every pipe-sink

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: >>>> >>>>

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: >>>> >>>>

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 >>&

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.sta

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 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

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 09:41 PM, Raman Shuishniou wrote: > 21.02.2018 20:07, Georg Chini пишет: >> Maybe you misunderstood me. What I mean, is that the pipe can be >> opened for writing as long as we are suspended. So it open when >> we see that the source is suspended or when we auto suspend. Close >> it

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 06:43 PM, Georg Chini wrote: > On 21.02.2018 16:15, Raman Shishniou wrote: >> On 02/21/2018 05:59 PM, Georg Chini wrote: >>> On 21.02.2018 15:33, Raman Shishniou wrote: >>>> On 02/21/2018 05:00 PM, Georg Chini wrote: >>>>> On 21.02.2018

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 05:59 PM, Georg Chini wrote: > On 21.02.2018 15:33, Raman Shishniou wrote: >> On 02/21/2018 05:00 PM, Georg Chini wrote: >>> On 21.02.2018 12:50, Raman Shishniou wrote: >>>> On 02/21/2018 02:24 PM, Georg Chini wrote: >>>>> On 21.02.2018

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 05:00 PM, Georg Chini wrote: > On 21.02.2018 12:50, Raman Shishniou wrote: >> On 02/21/2018 02:24 PM, Georg Chini wrote: >>> On 21.02.2018 12:22, Raman Shishniou wrote: >>>> On 02/21/2018 12:13 PM, Raman Shishniou wrote: >>>>&

Re: [pulseaudio-discuss] [PATCH 6/8] pass pa_suspend_cause_t to SINK/SOURCE_SET_STATE handlers

2018-02-21 Thread Raman Shishniou
On 02/19/2018 05:48 PM, Tanu Kaskinen wrote: > The suspend cause isn't yet used by any of the handlers. The alsa sink > and source will use it to sync the mixer when the SESSION suspend cause > is removed. Currently the syncing is done in pa_sink/source_suspend(), > and I want to change that,

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 02:24 PM, Georg Chini wrote: > On 21.02.2018 12:22, Raman Shishniou wrote: >> On 02/21/2018 12:13 PM, Raman Shishniou wrote: >>> On 02/21/2018 09:39 AM, Georg Chini wrote: >>>> On 21.02.2018 06:05, Georg Chini wrote: >>>>> On 21.02.2018 0

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 12:13 PM, Raman Shishniou wrote: > On 02/21/2018 09:39 AM, Georg Chini wrote: >> On 21.02.2018 06:05, Georg Chini wrote: >>> On 21.02.2018 05:55, Georg Chini wrote: >>>> On 20.02.2018 22:34, Raman Shishniou wrote: >>>>> On 02/20/2018 11:0

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-21 Thread Raman Shishniou
On 02/21/2018 09:39 AM, Georg Chini wrote: > On 21.02.2018 06:05, Georg Chini wrote: >> On 21.02.2018 05:55, Georg Chini wrote: >>> On 20.02.2018 22:34, Raman Shishniou wrote: >>>> On 02/20/2018 11:04 PM, Georg Chini wrote: >>>>> On 20.02.2018 19:49, R

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 11:04 PM, Georg Chini wrote: > On 20.02.2018 19:49, Raman Shishniou wrote: >> On 02/20/2018 07:02 PM, Georg Chini wrote: >>> On 20.02.2018 16:38, Raman Shyshniou wrote: >>>> Currently the pipe-source will remain running even if no >>>>

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 11:04 PM, Georg Chini wrote: > On 20.02.2018 19:49, Raman Shishniou wrote: >> On 02/20/2018 07:02 PM, Georg Chini wrote: >>> On 20.02.2018 16:38, Raman Shyshniou wrote: >>>> Currently the pipe-source will remain running even if no >>>>

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 07:02 PM, Georg Chini wrote: > On 20.02.2018 16:38, Raman Shyshniou wrote: >> Currently the pipe-source will remain running even if no >> writer is connected and therefore no data is produced. >> This patch adds the autosuspend= option to prevent this. >> Source will stay suspended

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 07:19 PM, Raman Shishniou wrote: >>> +if (chunk.length) { If the source is running or idle, the chunk.length always will be 0. if (PA_SOURCE_IS_OPENED(u->source->thread_info.state)) { ... chunk.length = 0; } guaranteed that. >>> +/

Re: [pulseaudio-discuss] [PATCH v7] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 07:14 PM, Georg Chini wrote: > On 20.02.2018 17:08, Raman Shishniou wrote: >> On 02/20/2018 06:44 PM, Georg Chini wrote: >>> On 20.02.2018 16:28, Raman Shishniou wrote: >>>> On 02/20/2018 06:22 PM, Georg Chini wrote: >>>>> On 20.02.2018 1

Re: [pulseaudio-discuss] [PATCH v8] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 07:02 PM, Georg Chini wrote: > On 20.02.2018 16:38, Raman Shyshniou wrote: >> Currently the pipe-source will remain running even if no >> writer is connected and therefore no data is produced. >> This patch adds the autosuspend= option to prevent this. >> Source will stay suspended

Re: [pulseaudio-discuss] [PATCH v7] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 06:44 PM, Georg Chini wrote: > On 20.02.2018 16:28, Raman Shishniou wrote: >> >> On 02/20/2018 06:22 PM, Georg Chini wrote: >>> On 20.02.2018 16:13, Georg Chini wrote: >>>> On 20.02.2018 15:47, Raman Shishniou wrote: >>>

Re: [pulseaudio-discuss] [PATCH v7] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 06:28 PM, Raman Shishniou wrote: > > > On 02/20/2018 06:22 PM, Georg Chini wrote: >> On 20.02.2018 16:13, Georg Chini wrote: >>> On 20.02.2018 15:47, Raman Shishniou wrote: >>>> On 02/20/2018 04:55 PM, Georg Chini wrote: >>>

Re: [pulseaudio-discuss] [PATCH v7] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 04:55 PM, Georg Chini wrote: > On 20.02.2018 14:30, Raman Shishniou wrote: >> On 02/20/2018 03:11 PM, Georg Chini wrote: >>> On 19.02.2018 16:01, Raman Shyshniou wrote: >>>> Currently the pipe-source will remain running even if no >>>>

Re: [pulseaudio-discuss] [PATCH v7] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 04:18 PM, Georg Chini wrote: > On 20.02.2018 13:50, Raman Shishniou wrote: >> On 02/20/2018 03:16 PM, Georg Chini wrote: >>> On 20.02.2018 13:11, Georg Chini wrote: >>>> On 19.02.2018 16:01, Raman Shyshniou wrote: >>>>> Curre

Re: [pulseaudio-discuss] [PATCH v7] pipe-source: implement autosuspend option

2018-02-20 Thread Raman Shishniou
On 02/20/2018 03:11 PM, Georg Chini wrote: > On 19.02.2018 16:01, Raman Shyshniou wrote: >> Currently the pipe-source will remain running even if no >> writer is connected and therefore no data is produced. >> This patch adds the autosuspend= option to prevent this. >> Source will stay suspended

Re: [pulseaudio-discuss] Per (sink input, sink) volume control / routing

2018-02-19 Thread Raman Shishniou
On 02/19/2018 06:46 PM, Andreas Hartmetz wrote: > Hello! > > I am currently developing an audio system for an automotive customer, > based on PulseAudio where PulseAudio is applicable. It is part of the > requirements that the volume of every input channel (sink input) to > every output channel

[pulseaudio-discuss] loopback module double resampling

2018-02-19 Thread Raman Shishniou
Hello, Currently a loopback module does a double resampling if the source and sink sample rates are different. I used a simple config to test it: load-module module-null-source source_name=src rate=48000 load-module module-null-sink sink_name=dst rate=96000 load-module module-loopback source=src

Re: [pulseaudio-discuss] [PATCH v6 1/2] pipe-source: generate silence when no writers connected

2018-02-16 Thread Raman Shishniou
On 02/16/2018 12:00 PM, Georg Chini wrote: > On 14.02.2018 23:16, Raman Shyshniou wrote: >> Currently the pipe-source does not produce any data if no >> writer is connected. This patch enable silence generator >> when last writer closed pipe. It will stop automatically >> when any data appears.

Re: [pulseaudio-discuss] [PATCH v6 1/2] pipe-source: generate silence when no writers connected

2018-02-16 Thread Raman Shishniou
On 02/16/2018 12:00 PM, Georg Chini wrote: > On 14.02.2018 23:16, Raman Shyshniou wrote: >> Currently the pipe-source does not produce any data if no >> writer is connected. This patch enable silence generator >> when last writer closed pipe. It will stop automatically >> when any data appears. >>

Re: [pulseaudio-discuss] [PATCH] null-source: fix multiple bugs

2018-02-16 Thread Raman Shishniou
On 02/15/2018 11:51 PM, Georg Chini wrote: > The current null-source implementation has several bugs: > > 1) The latency reported is the negative of the correct latency. > 2) The memchunk passed to pa_source_post() is not initialized > with silence. > 3) In PA_SOURCE_MESSAGE_SET_STATE the

Re: [pulseaudio-discuss] [PATCH] loopback: underrun_protection argument

2018-02-15 Thread Raman Shishniou
On 02/15/2018 12:43 PM, Georg Chini wrote: > On 15.02.2018 10:31, Raman Shishniou wrote: >> On 02/15/2018 10:20 AM, Georg Chini wrote: >>> On 14.02.2018 22:51, Raman Shishniou wrote: >>>> On 02/14/2018 07:20 PM, Georg Chini wrote: >>>>> On 14.02.2018 15

Re: [pulseaudio-discuss] [PATCH] loopback: underrun_protection argument

2018-02-15 Thread Raman Shishniou
On 02/15/2018 10:20 AM, Georg Chini wrote: > On 14.02.2018 22:51, Raman Shishniou wrote: >> On 02/14/2018 07:20 PM, Georg Chini wrote: >>> On 14.02.2018 15:25, Raman Shyshniou wrote: >>>> This patch adds a underrun_protection argument to >>>> contro

Re: [pulseaudio-discuss] [PATCH] null-source: correct latency report and silence memory

2018-02-15 Thread Raman Shishniou
On 02/15/2018 10:22 AM, Georg Chini wrote: > On 14.02.2018 23:09, Raman Shishniou wrote: >> On 02/15/2018 12:03 AM, Georg Chini wrote: >>> The null-source currently reports the negative of the correct latency. >>> Also the memchunk passed to pa_source_post() is not i

Re: [pulseaudio-discuss] [PATCH] null-source: correct latency report and silence memory

2018-02-14 Thread Raman Shishniou
On 02/15/2018 12:03 AM, Georg Chini wrote: > The null-source currently reports the negative of the correct latency. > Also the memchunk passed to pa_source_post() is not initialized with > silence. > > This patch fixes both issues. > --- > src/modules/module-null-source.c | 5 +++-- > 1 file

Re: [pulseaudio-discuss] [PATCH] loopback: underrun_protection argument

2018-02-14 Thread Raman Shishniou
On 02/14/2018 07:20 PM, Georg Chini wrote: > On 14.02.2018 15:25, Raman Shyshniou wrote: >> This patch adds a underrun_protection argument to >> control underrun protection algorithm. Disabling >> protection will keep loopback latency regardless >> of underruns. > > Again I do not understand the

Re: [pulseaudio-discuss] [PATCH v3] pipe-source: optional suspend source when no writers connected to fifo

2018-02-14 Thread Raman Shishniou
On 02/13/2018 06:37 PM, Georg Chini wrote: > On 11.02.2018 00:36, Raman Shyshniou wrote: >> Add autosuspend= option. Enabling this option will make >> pipe-source suspended when all writers closed fifo. Source will >> be automatically unsuspended if any data will be written to pipe >> and

Re: [pulseaudio-discuss] [PATCH v2] pipe-source: suspend source when no writers connected to fifo

2018-02-14 Thread Raman Shishniou
On 02/13/2018 06:41 PM, Georg Chini wrote: > On 13.02.2018 11:27, Raman Shishniou wrote: >> On 02/13/2018 11:58 AM, Georg Chini wrote: >>> On 12.02.2018 17:23, Tanu Kaskinen wrote: >>>> On Sat, 2018-02-10 at 23:08 +0100, Georg Chini wrote: >>>>&g

Re: [pulseaudio-discuss] [PATCH v2] pipe-source: suspend source when no writers connected to fifo

2018-02-13 Thread Raman Shishniou
On 02/13/2018 11:58 AM, Georg Chini wrote: > On 12.02.2018 17:23, Tanu Kaskinen wrote: >> On Sat, 2018-02-10 at 23:08 +0100, Georg Chini wrote: >>> On 10.02.2018 23:04, Raman Shishniou wrote: >>>> On 02/11/2018 12:43 AM, Georg Chini wrote: >>>>>

Re: [pulseaudio-discuss] [PATCH v2] pipe-source: suspend source when no writers connected to fifo

2018-02-10 Thread Raman Shishniou
On 02/11/2018 12:43 AM, Georg Chini wrote: > On 10.02.2018 22:25, Raman Shuishniou wrote: >> 10.02.2018 23:59, Georg Chini пишет: >>> On 08.02.2018 17:58, Raman Shyshniou wrote: Make pipe-source suspended if all writers closed fifo. Source will be automatically unsuspended if