Re: [pulseaudio-discuss] [PATCH 7/8] bluetooth: fix resume error handling

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: When resuming a sink or source, pa_sink/source_process_msg() should be called only if resuming is successful. pa_sink/source_process_msg() updates thread_info.state and notifies streams about the new state, but if resuming fails, there's no state change.

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

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, 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, because pa_sin

Re: [pulseaudio-discuss] [PATCH 5/8] pass pa_suspend_cause_t to set_state() callbacks

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: The suspend cause isn't yet used by any of the callbacks. 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, because pa_si

Re: [pulseaudio-discuss] [PATCH 4/8] sink, source: redo state changing code

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: This adds a pa_suspend_cause_t parameter to the sink/source_set_state() functions, and moves part of the work that pa_sink/source_suspend() does to sink/source_set_state(). The reason for this code shuffling is that I plan to make all suspend cause change

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

2018-02-21 Thread Georg Chini
On 21.02.2018 20:15, Raman Shishniou wrote: 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

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

2018-02-21 Thread Georg Chini
On 21.02.2018 17:09, Raman Shishniou wrote: 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 12:50, Raman

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

2018-02-21 Thread Georg Chini
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 12:50, Raman Shishniou wrote: On 02/21/2018 02:24 PM, Georg Chini wrote: On 21.02.2018 12:22, Raman

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

2018-02-21 Thread Georg Chini
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 12:22, Raman Shishniou wrote: On 02/21/2018 12:13 PM, Raman Shishniou wrote: On 02/21/2018 09:39 AM

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

2018-02-21 Thread Georg Chini
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: 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

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

2018-02-21 Thread Georg Chini
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 05:55, Georg Chini wrote: On 20.02.2018 22:34, Raman Shishniou wrote: On 02/20/2018 11:04 PM, Georg

Re: [pulseaudio-discuss] [PATCH] null-sink, pipe-sink: some state variable cleanups

2018-02-21 Thread Georg Chini
On 21.02.2018 10:54, Tanu Kaskinen wrote: pa_sink_get_state() is supposed to be used from the main thread. In this case it doesn't really matter, because the SET_STATE handler is executed while the main thread is waiting, but since the state is available also in thread_info, let's use that. All o

Re: [pulseaudio-discuss] [PATCH 2/8] null-sink, pipe-sink: prefer thread_info variables in the IO thread

2018-02-21 Thread Georg Chini
On 21.02.2018 10:43, Tanu Kaskinen wrote: On Wed, 2018-02-21 at 09:40 +0100, Georg Chini wrote: On 19.02.2018 15:48, Tanu Kaskinen wrote: pa_sink_get_state() is supposed to be used from the main thread. In this case it doesn't really matter, because the SET_STATE handler is executed whil

Re: [pulseaudio-discuss] [PATCH 3/8] alsa: add a couple of FIXME comments

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: build_pollfd() isn't likely to fail, but if it does, pa_sink/source_put() will crash on an assertion failure. I haven't seen such crash happening, this is just something that I noticed while studying the state change code. --- src/modules/alsa/alsa-sink

Re: [pulseaudio-discuss] [PATCH 2/8] null-sink, pipe-sink: prefer thread_info variables in the IO thread

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: pa_sink_get_state() is supposed to be used from the main thread. In this case it doesn't really matter, because the SET_STATE handler is executed while the main thread is waiting, but since the state is available also in thread_info, let's use that. All o

Re: [pulseaudio-discuss] [PATCH 1/8] alsa, solaris, oss: remove unnecessary error handling when suspending

2018-02-21 Thread Georg Chini
On 19.02.2018 15:48, Tanu Kaskinen wrote: Suspending never fails. --- src/modules/alsa/alsa-sink.c | 9 ++--- src/modules/alsa/alsa-source.c | 9 ++--- src/modules/module-solaris.c | 18 +++--- src/modules/oss/module-oss.c | 16 +--- 4 files changed,

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

2018-02-20 Thread Georg Chini
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, Raman Shishniou wrote: On 02/20/2018 07:02 PM, Georg Chini wrote: On 20.02.2018 16:38, Raman Shyshniou

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

2018-02-20 Thread Georg Chini
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, 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

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

2018-02-20 Thread Georg Chini
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, 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 writer is

Re: [pulseaudio-discuss] [PATCH v2] alsa-card: improve the profile availability logic

2018-02-20 Thread Georg Chini
On 20.02.2018 10:55, Tanu Kaskinen wrote: When a new card shows up (during pulseaudio startup or hotplugged), pulseaudio needs to pick the initial profile for the card. Unavailable profiles shouldn't be picked, but module-alsa-card sometimes marked unavailable profiles as available, causing bad i

Re: [pulseaudio-discuss] [PATCH v2] loopback: max_latency_msec argument

2018-02-20 Thread Georg Chini
On 19.02.2018 16:12, Raman Shyshniou wrote: Currently loopback module indefinitely increased latency if underruns occurs. This patch allows to set up the upper limit of latency. --- src/modules/module-loopback.c | 34 ++ 1 file changed, 30 insertions(+), 4 delet

Re: [pulseaudio-discuss] [PATCH] loopback: use source sample spec and channel map by default

2018-02-20 Thread Georg Chini
On 19.02.2018 21:49, Raman Shyshniou wrote: Currently the loopback module uses sample spec and channel map of the sink by default. It leads to double resample if source and sink sample specs are different and no rate/format specified in arguments. This patch causes the source sample spec and chan

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

2018-02-20 Thread Georg Chini
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 writer is connected and therefore no data is produced. This patch adds the autosuspend= option to prevent

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

2018-02-20 Thread Georg Chini
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 16:13, Georg Chini wrote: On 20.02.2018 15:47, Raman Shishniou wrote: On 02/20/2018 04:55 PM, Georg

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

2018-02-20 Thread Georg Chini
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 if no writer is connected. This option is enabled by defa

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

2018-02-20 Thread Georg Chini
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: 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

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

2018-02-20 Thread Georg Chini
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: 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

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

2018-02-20 Thread Georg Chini
On 20.02.2018 15:47, Raman Shishniou wrote: 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 writer is

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

2018-02-20 Thread Georg Chini
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 writer is connected and therefore no data is produced. This patch adds the autosuspend= option to prevent

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

2018-02-20 Thread Georg Chini
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: Currently the pipe-source will remain running even if no writer is connected and therefore no data is produced. This patch

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

2018-02-20 Thread Georg Chini
On 20.02.2018 13:11, 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 if no writer is

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

2018-02-20 Thread Georg Chini
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 if no writer is connected. This option is enabled by defa

Re: [pulseaudio-discuss] loopback module double resampling

2018-02-19 Thread Georg Chini
On 19.02.2018 16:56, Raman Shishniou wrote: 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

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

2018-02-19 Thread Georg Chini
On 19.02.2018 16:46, 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 (sink) can be c

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

2018-02-18 Thread Georg Chini
On 17.02.2018 22:05, Raman Shuishniou wrote: 17.02.2018 15:31, Georg Chini пишет: On 17.02.2018 11:08, Raman Shuishniou wrote: 16.02.2018 23:50, Georg Chini пишет: On 16.02.2018 17:37, Raman Shishniou wrote: On 02/16/2018 12:00 PM, Georg Chini wrote: On 14.02.2018 23:16, Raman Shyshniou

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

2018-02-18 Thread Georg Chini
On 15.02.2018 12:50, Raman Shyshniou wrote: Currently loopback module indefinitely increased latency if underruns occurs. This patch allows to set up the upper limit of latency. --- src/modules/module-loopback.c | 34 ++ 1 file changed, 30 insertions(+), 4 delet

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

2018-02-18 Thread Georg Chini
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 timestamp is always set when the source transitions to RUNNING

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

2018-02-17 Thread Georg Chini
On 17.02.2018 11:08, Raman Shuishniou wrote: 16.02.2018 23:50, Georg Chini пишет: On 16.02.2018 17:37, Raman Shishniou wrote: 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

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

2018-02-17 Thread Georg Chini
On 17.02.2018 07:32, Tanu Kaskinen wrote: On Fri, 2018-02-16 at 13:04 +0100, Georg Chini wrote: On 16.02.2018 11:46, Raman Shishniou wrote: 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

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

2018-02-16 Thread Georg Chini
On 16.02.2018 17:37, Raman Shishniou wrote: 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

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

2018-02-16 Thread Georg Chini
On 16.02.2018 13:20, Georg Chini wrote: On 16.02.2018 12:35, Raman Shishniou wrote: 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

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

2018-02-16 Thread Georg Chini
On 16.02.2018 12:35, Raman Shishniou wrote: 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

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

2018-02-16 Thread Georg Chini
On 16.02.2018 11:46, Raman Shishniou wrote: 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

Re: [pulseaudio-discuss] Sample format spec with Linear 16bit 16kHz

2018-02-16 Thread Georg Chini
On 16.02.2018 10:42, Shinnosuke Suzuki wrote: Hi, I updated pulseaudio  to 11.1. However, this problem was not improved. I tried to check 2 things. 1.I collect voice data from bluetooth headset using parec as follows:  parec -r --rate=16000 --format=s16le --channels=1 > test.raw  parec -r --rat

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

2018-02-16 Thread Georg Chini
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. --- After my fixes to module-null-source, I think your lo

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

2018-02-15 Thread Georg Chini
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 timestamp is always set when the source transitions to RUNNING

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

2018-02-15 Thread Georg Chini
On 15.02.2018 10:07, Raman Shishniou wrote: 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

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

2018-02-15 Thread Georg Chini
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:25, Raman Shyshniou wrote: This patch adds a underrun_protection argument to control underrun

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

2018-02-14 Thread Georg Chini
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 initialized with silence. This patch fixes both issues. --- src/modules/module

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

2018-02-14 Thread Georg Chini
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 control underrun protection algorithm. Disabling protection will keep loopback latency regardless of underruns

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

2018-02-14 Thread Georg Chini
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 changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modu

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

2018-02-14 Thread Georg Chini
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 motivation of the patch. In what situations are you seeing

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-02-13 Thread Georg Chini
On 13.02.2018 20:36, NicoHood wrote: On 01/29/2018 07:39 PM, NicoHood wrote: On 01/29/2018 07:19 PM, Georg Chini wrote: On 29.01.2018 18:46, Nico wrote: On 01/29/2018 03:52 PM, NicoHood wrote: On 01/29/2018 03:29 PM, Georg Chini wrote: On 29.01.2018 14:44, NicoHood wrote: On 01/29/2018 01

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

2018-02-13 Thread Georg Chini
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: On 10.02.2018 23:04, Raman Shishniou wrote: On 02/11/2018 12:43 AM, Georg Chini wrote: On 10.02.2018 22:25

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

2018-02-13 Thread Georg Chini
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 suspended again when last writer closed fifo. Can you add a sen

Re: [pulseaudio-discuss] Odd app behavior with PULSE_PROP="filter.want=echo-cancel"

2018-02-13 Thread Georg Chini
On 12.02.2018 20:15, Raman Gupta wrote: When I start Zoiper with PULSE_PROP="filter.want=echo-cancel", it demonstrates some odd behavior. It ends up creating many Echo-Cancel Sink and Source streams, and I am unable to select my USB headset as the source of any of them. I think, based on the dis

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

2018-02-13 Thread Georg Chini
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: On 10.02.2018 22:25, Raman Shuishniou wrote: 10.02.2018 23:59, Georg Chini пишет: On 08.02.2018 17:58, Raman

[pulseaudio-discuss] [PATCH] core-util: correct error in set_nonblock()

2018-02-11 Thread Georg Chini
set_nonblock() will always set the file descriptor to non-blocking, regardless of the nonblock argument. This patch fixes the issue by passing the correct argument to the fcntl() call. The bug had no impact because there is only one caller of pa_make_fd_block() in poll-win32.c --- src/pulsecore/c

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

2018-02-10 Thread Georg Chini
On 10.02.2018 23:04, Raman Shishniou wrote: 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

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

2018-02-10 Thread Georg Chini
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 any data will be written to pipe and suspended again

Re: [pulseaudio-discuss] Sample format spec with Linear 16bit 16kHz

2018-02-10 Thread Georg Chini
On 10.02.2018 02:11, Shinnosuke Suzuki wrote: Hi PA 11.1 should work fine with your kernel and bluez version. Thank you, I’ll try that. When you record from the BT headset, the BT headset is set to HSP/HFP. This means that recording and playback stream are at 8kHz, not 16kHz. I want to ha

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

2018-02-10 Thread 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 any data will be written to pipe and suspended again when last writer closed fifo. --- src/modules/module-pipe-source.c | 114 ++

[pulseaudio-discuss] [PATCH v6 7/7] message-params: Add read/write functions for various simple data types

2018-02-10 Thread Georg Chini
See doc/messaging_api.txt for the added functions. All read functions return 1 on success, 0 if end of string is found and -1 on parse error. Additionally, for the numeric/boolean read functions, 2 is returned if the list element is empty. --- doc/messaging_api.txt | 15 +++- src/map-file

Re: [pulseaudio-discuss] [PATCH] filter-apply: Ignore monitor source of filter in find_paired_master()

2018-02-10 Thread Georg Chini
On 09.02.2018 09:08, Tanu Kaskinen wrote: On Thu, 2018-02-08 at 18:40 +0100, Georg Chini wrote: On 08.02.2018 17:09, Tanu Kaskinen wrote: On Wed, 2018-02-07 at 15:28 +0100, Georg Chini wrote: On 07.02.2018 13:21, Tanu Kaskinen wrote: On Tue, 2018-02-06 at 20:26 +0100, Georg Chini wrote

Re: [pulseaudio-discuss] Sample format spec with Linear 16bit 16kHz

2018-02-08 Thread Georg Chini
On 09.02.2018 07:17, Shinnosuke Suzuki wrote: Sorry, I didn't change the Subject. Hi, Thank you for prompt reply. > Can't you use a newer version? We are at 11.1 already and the > bluetooth code has changed significantly. I hope to do so, but I am developing on a embedded system (linux kernel

Re: [pulseaudio-discuss] [PATCH] filter-apply: Ignore monitor source of filter in find_paired_master()

2018-02-08 Thread Georg Chini
On 08.02.2018 17:09, Tanu Kaskinen wrote: On Wed, 2018-02-07 at 15:28 +0100, Georg Chini wrote: On 07.02.2018 13:21, Tanu Kaskinen wrote: On Tue, 2018-02-06 at 20:26 +0100, Georg Chini wrote: When module-filter-apply tries to find a matching source-output for a given sink-input and a stream

Re: [pulseaudio-discuss] Sample format spec with Linear 16bit 16kHz

2018-02-08 Thread Georg Chini
On 08.02.2018 12:06, Shinnosuke Suzuki wrote: Hi I am developing a phone app using pulseaudio 6.0 with asynchronous API using Bluetooth Headset. Can't you use a newer version? We are at 11.1 already and the bluetooth code has changed significantly. I create a record stream with pa_stream_ne

Re: [pulseaudio-discuss] [PATCH] filter-apply: Ignore monitor source of filter in find_paired_master()

2018-02-07 Thread Georg Chini
On 07.02.2018 13:21, Tanu Kaskinen wrote: On Tue, 2018-02-06 at 20:26 +0100, Georg Chini wrote: When module-filter-apply tries to find a matching source-output for a given sink-input and a stream with the same role Shouldn't this be "with the same group", not "with the sa

[pulseaudio-discuss] [PATCH] filter-apply: Ignore monitor source of filter in find_paired_master()

2018-02-06 Thread Georg Chini
When module-filter-apply tries to find a matching source-output for a given sink-input and a stream with the same role exists on the monitor source of the filter, module-filter apply falsely assumes that the source belongs to another instance of the filter and tries to access source->output_from_ma

[pulseaudio-discuss] [PATCH v5 7/7] message-params: Add read/write functions for various simple data types

2018-02-05 Thread Georg Chini
See doc/messaging_api.txt for the added functions. All read functions return 1 on success, 0 if end of string is found and -1 on parse error. Additionally, for the numeric/boolean read functions, 2 is returned if the list element is empty. --- doc/messaging_api.txt | 15 +++- src/map-file

[pulseaudio-discuss] [PATCH v5 6/7] message-params: Allow parameter strings to contain escaped curly braces

2018-02-05 Thread Georg Chini
The patch adds the possibility to escape curly braces within parameter strings and introduces several new functions that can be used for writing parameters. For writing, the structure pa_message_param, which is a wrapper for pa_strbuf has been created. Following new write functions are available:

[pulseaudio-discuss] [PATCH v5 8/7] message-params: Add read functions for arrays

2018-02-05 Thread Georg Chini
--- I got a bit carried away and also added the functions to read arrays. Not sure if it makes sense to add them now because there is no current use case, but I send them to the list anyway in case someone needs them later. src/map-file | 4 + src/pulse/message-params.c | 202

[pulseaudio-discuss] [PATCH v5 5/7] pactl: Implement list message-handlers

2018-02-05 Thread Georg Chini
For better readability, "pactl list message-handlers" is introduced which prints a formatted output of "pactl send-message /core list-handlers". The patch also adds the functions pa_message_param_split_list() and pa_message_param_read_string() for easy parsing of the message response string. Becau

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-30 Thread Georg Chini
On 30.01.2018 08:13, Georg Chini wrote: On 30.01.2018 03:08, NicoHood wrote: On 01/29/2018 07:48 PM, Georg Chini wrote: On 29.01.2018 19:39, NicoHood wrote: On 01/29/2018 07:19 PM, Georg Chini wrote: On 29.01.2018 18:46, Nico wrote: On 01/29/2018 03:52 PM, NicoHood wrote: On 01/29/2018 03

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-29 Thread Georg Chini
On 30.01.2018 03:08, NicoHood wrote: On 01/29/2018 07:48 PM, Georg Chini wrote: On 29.01.2018 19:39, NicoHood wrote: On 01/29/2018 07:19 PM, Georg Chini wrote: On 29.01.2018 18:46, Nico wrote: On 01/29/2018 03:52 PM, NicoHood wrote: On 01/29/2018 03:29 PM, Georg Chini wrote: On 29.01.2018

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-29 Thread Georg Chini
On 29.01.2018 19:39, NicoHood wrote: On 01/29/2018 07:19 PM, Georg Chini wrote: On 29.01.2018 18:46, Nico wrote: On 01/29/2018 03:52 PM, NicoHood wrote: On 01/29/2018 03:29 PM, Georg Chini wrote: On 29.01.2018 14:44, NicoHood wrote: On 01/29/2018 01:39 PM, Georg Chini wrote: On 29.01.2018

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-29 Thread Georg Chini
On 29.01.2018 19:19, Georg Chini wrote: On 29.01.2018 18:46, Nico wrote: On 01/29/2018 03:52 PM, NicoHood wrote: On 01/29/2018 03:29 PM, Georg Chini wrote: On 29.01.2018 14:44, NicoHood wrote: On 01/29/2018 01:39 PM, Georg Chini wrote: On 29.01.2018 12:52, Nico wrote: Hi, I want to capture

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-29 Thread Georg Chini
On 29.01.2018 18:46, Nico wrote: On 01/29/2018 03:52 PM, NicoHood wrote: On 01/29/2018 03:29 PM, Georg Chini wrote: On 29.01.2018 14:44, NicoHood wrote: On 01/29/2018 01:39 PM, Georg Chini wrote: On 29.01.2018 12:52, Nico wrote: Hi, I want to capture the audio stream of my TV with my PCI-E

[pulseaudio-discuss] [PATCH v5 7/7] message-params: Add read/write functions for various simple data types

2018-01-29 Thread Georg Chini
See doc/messaging_api.txt for the added functions. All read functions return 1 on success, 0 if end of string is found and -1 on parse error. Additionally, for the numeric/boolean read functions, 2 is returned if the list element is empty. --- doc/messaging_api.txt | 15 +++- src/map-file

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-29 Thread Georg Chini
On 29.01.2018 14:44, NicoHood wrote: On 01/29/2018 01:39 PM, Georg Chini wrote: On 29.01.2018 12:52, Nico wrote: Hi, I want to capture the audio stream of my TV with my PCI-E Toslink sound card and play it back on my usb XLR soundcard. The reason why I do that is to use my own music boxes

Re: [pulseaudio-discuss] Toslink capture looback latency problem

2018-01-29 Thread Georg Chini
On 29.01.2018 12:52, Nico wrote: Hi, I want to capture the audio stream of my TV with my PCI-E Toslink sound card and play it back on my usb XLR soundcard. The reason why I do that is to use my own music boxes rather than the TV speakers. With toslink + XLR I do not have problems with ground loop

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-28 Thread Georg Chini
On 26.01.2018 21:14, Georg Chini wrote: On 26.01.2018 04:22, Tanu Kaskinen wrote: On Thu, 2018-01-25 at 09:08 +0100, Georg Chini wrote: On 24.01.2018 01:40, Tanu Kaskinen wrote: On Mon, 2018-01-22 at 16:19 +0100, Georg Chini wrote: On 21.01.2018 01:03, Tanu Kaskinen wrote: So you're prop

[pulseaudio-discuss] [PATCH v4 7/7] message-params: Add read/write functions for various simple data types

2018-01-28 Thread Georg Chini
See doc/messaging_api.txt for the added functions. All read functions return 1 on success, 0 if an empty string or end of string is found and -1 on parse error. --- doc/messaging_api.txt | 9 +++ src/map-file | 9 +++ src/pulse/message-params.c | 163

[pulseaudio-discuss] [PATCH v4 6/7] message-params: Allow parameter strings to contain escaped curly braces

2018-01-28 Thread Georg Chini
The patch adds the possibility to escape curly braces within parameter strings and introduces several new functions that can be used for writing parameters. For writing, the structure pa_message_param, which is a wrapper for pa_strbuf has been created. Following new write functions are available:

[pulseaudio-discuss] [PATCH v4 5/7] pactl: Implement list message-handlers

2018-01-28 Thread Georg Chini
For better readability, "pactl list message-handlers" is introduced which prints a formatted output of "pactl send-message /core list-handlers". The patch also adds the functions pa_message_param_split_list() and pa_message_param_read_string() for easy parsing of the message response string. Becau

[pulseaudio-discuss] [PATCH v4 1/7] core: add simple message interface

2018-01-28 Thread Georg Chini
This patch adds a new feature to the core which allows to send messages to objects. An object can register/unregister a message handler with pa_message_handler_{register, unregister}() while a message can be sent to the handler using the pa_message_handler_send_message() function. A message has 4 a

[pulseaudio-discuss] [PATCH v4 2/7] protocol-native: add message sending capability

2018-01-28 Thread Georg Chini
This patch adds the PA_COMMAND_SEND_OBJECT_MESSAGE command to protocol-native so that clients can use the messaging feature introduced in the previous patch. Sending messages can in effect replace the extension system for modules. The approach is more flexible than the extension interface because

[pulseaudio-discuss] [PATCH v4 3/7] pactl, pacmd, cli-command: Add send-message command

2018-01-28 Thread Georg Chini
--- doc/messaging_api.txt| 15 ++ man/pactl.1.xml.in | 7 +++ man/pulse-cli-syntax.5.xml.in| 7 +++ shell-completion/bash/pulseaudio | 5 +++-- shell-completion/zsh/_pulseaudio | 2 ++ src/pulse/introspect.h | 3 ++- src/pulsecore/cl

[pulseaudio-discuss] [PATCH 0/7 v4] Implement simple message API

2018-01-28 Thread Georg Chini
er strings. I expect that patch 1 - 4 are (maybe apart from more or less trivial fixes) ready to be pushed, while the other three probably still need some discussion. Georg Chini (7): core: add simple message interface protocol-native: add message sending capability pactl, pacmd, cli-command

[pulseaudio-discuss] [PATCH v4 4/7] core: add message handler

2018-01-28 Thread Georg Chini
This patch adds a small message handler to the core which enables clients to list available handlers via the list-handlers message. Command: pacmd send-message /core list-handlers pactl can be used with the same parameters. The patch also introduces a convention for the return string. It consists

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-27 Thread Georg Chini
On 26.01.2018 21:14, Georg Chini wrote: On 26.01.2018 04:22, Tanu Kaskinen wrote: On Thu, 2018-01-25 at 09:08 +0100, Georg Chini wrote: On 24.01.2018 01:40, Tanu Kaskinen wrote: On Mon, 2018-01-22 at 16:19 +0100, Georg Chini wrote: On 21.01.2018 01:03, Tanu Kaskinen wrote: In this case

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-26 Thread Georg Chini
On 26.01.2018 04:22, Tanu Kaskinen wrote: On Thu, 2018-01-25 at 09:08 +0100, Georg Chini wrote: On 24.01.2018 01:40, Tanu Kaskinen wrote: On Mon, 2018-01-22 at 16:19 +0100, Georg Chini wrote: On 21.01.2018 01:03, Tanu Kaskinen wrote: It looks like we're anyway going to need a bun

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-25 Thread Georg Chini
On 26.01.2018 03:26, Tanu Kaskinen wrote: On Thu, 2018-01-25 at 07:38 +0100, Georg Chini wrote: On 25.01.2018 00:26, Tanu Kaskinen wrote: On Wed, 2018-01-24 at 22:01 +0100, Georg Chini wrote: On 24.01.2018 02:10, Tanu Kaskinen wrote: How does validating the brace correctness prevent some

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-25 Thread Georg Chini
On 24.01.2018 01:40, Tanu Kaskinen wrote: On Mon, 2018-01-22 at 16:19 +0100, Georg Chini wrote: On 21.01.2018 01:03, Tanu Kaskinen wrote: It looks like we're anyway going to need a bunch of "helper" functions, so there's not that much difference between our approaches,

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-24 Thread Georg Chini
On 25.01.2018 00:26, Tanu Kaskinen wrote: On Wed, 2018-01-24 at 22:01 +0100, Georg Chini wrote: On 24.01.2018 02:10, Tanu Kaskinen wrote: On Mon, 2018-01-22 at 21:43 +0100, Georg Chini wrote: On 21.01.2018 01:03, Tanu Kaskinen wrote: On Fri, 2018-01-19 at 14:23 +0100, Georg Chini wrote

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-24 Thread Georg Chini
On 24.01.2018 02:10, Tanu Kaskinen wrote: On Mon, 2018-01-22 at 21:43 +0100, Georg Chini wrote: On 21.01.2018 01:03, Tanu Kaskinen wrote: On Fri, 2018-01-19 at 14:23 +0100, Georg Chini wrote: Also you need to handle the case where the end of a list does not match the end of the string because

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-22 Thread Georg Chini
On 21.01.2018 01:03, Tanu Kaskinen wrote: On Fri, 2018-01-19 at 14:23 +0100, Georg Chini wrote: On 18.01.2018 23:20, Tanu Kaskinen wrote: On Wed, 2018-01-17 at 16:12 +0100, Georg Chini wrote: On 14.01.2018 21:47, Tanu Kaskinen wrote:ry from Here's an updated example that should work

[pulseaudio-discuss] [PATCH v3 5/6] pactl: Implement list message-handlers

2018-01-22 Thread Georg Chini
For better readability, "pactl list message-handlers" is introduced which prints a formatted output of "pactl send-message /core list-handlers". The patch also adds the function pa_split_message_parameter_string() for easy parsing of the message response string. --- man/pactl.1.xml.in

[pulseaudio-discuss] [PATCH v3 6/6] message-handler: Allow parameter strings to contain escaped curly braces

2018-01-22 Thread Georg Chini
For string parameters that contain curly braces, those braces must be escaped by adding a "\" before them. This however means that a trailing backslash would falsely escape the closing bracket. To avoid this, single quotes must be added at start and end of the string. A function pa_strbuf_put_esca

Re: [pulseaudio-discuss] [PATCH 5/5] pactl: Implement list message-handlers

2018-01-22 Thread Georg Chini
On 21.01.2018 01:03, Tanu Kaskinen wrote: On Fri, 2018-01-19 at 14:23 +0100, Georg Chini wrote: On 18.01.2018 23:20, Tanu Kaskinen wrote: On Wed, 2018-01-17 at 16:12 +0100, Georg Chini wrote: On 14.01.2018 21:47, Tanu Kaskinen wrote:ry from the heap are quite heavy operations, and your

Re: [pulseaudio-discuss] [PATCH v2 5/6] pactl: Implement list message-handlers

2018-01-22 Thread Georg Chini
On 21.01.2018 14:55, Georg Chini wrote: For better readability, "pactl list message-handlers" is introduced which prints a formatted output of "pactl send-message /core list-handlers". The patch also adds the function pa_split_message_parameter_string() for easy parsing of

<    1   2   3   4   5   6   7   8   9   10   >