[pulseaudio-discuss] [PATCH] optimize set_state_in_io_thread() callbacks

2018-03-20 Thread Raman Shyshniou
Source and sink are passed in arguments to set_state_in_io_thread() callbacks. There is optimal to access them directly. --- src/modules/alsa/alsa-sink.c | 6 +++--- src/modules/alsa/alsa-source.c | 6 +++--- src/modules/bluetooth/module-bluez4-device.c | 8

[pulseaudio-discuss] [PATCH v10 2/3] pipe-source: respect frame boundaries

2018-03-20 Thread Raman Shyshniou
Currently pipe-source doesn't track frame boundaries while posting data. This can lead to assertion failure in source-output for any sample specs except s8/u8 mono. The simplest way to reproduce is to write s24le format to pipe: $ pacat -r -d null --format=s24le > /tmp/music.input E:

[pulseaudio-discuss] [PATCH v10 3/3] pipe-source: implement autosuspend option

2018-03-20 Thread Raman Shyshniou
This patch implements the autosuspend option. Setting autosuspend to false restores original pipe-source behaviour. --- src/modules/module-pipe-source.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/modules/module-pipe-source.c

[pulseaudio-discuss] [PATCH v10 1/3] pipe-source: implement autosuspend behavior

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

Re: [pulseaudio-discuss] [PATCH v2 3/5] replace sink/source SET_STATE handlers with callbacks

2018-03-13 Thread Raman Shyshniou
Hello, 13.03.2018 20:40, Tanu Kaskinen пишет: diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c ... +/* Called from the IO thread. */ +static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state) { ... +switch (new_state) { + +case

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

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

2018-02-20 Thread Raman Shyshniou
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 default. --- src/modules/module-pipe-source.c |

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

2018-02-19 Thread Raman Shyshniou
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 channel map to be used by default. ---

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

2018-02-19 Thread Raman Shyshniou
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 deletions(-) diff --git

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

2018-02-19 Thread Raman Shyshniou
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 default. --- src/modules/module-pipe-source.c |

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

2018-02-15 Thread Raman Shyshniou
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 deletions(-) diff --git

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

2018-02-14 Thread Raman Shyshniou
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. --- src/modules/module-pipe-source.c | 113 ++- 1 file changed, 87

[pulseaudio-discuss] [PATCH v6 2/2] pipe-source: implement autosuspend option

2018-02-14 Thread Raman Shyshniou
This patch adds the autosuspend= option to suspend pipe-source instead of generating silence when no writers are connected to pipe. --- src/modules/module-pipe-source.c | 69 +++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git

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

2018-02-14 Thread Raman Shyshniou
This patch adds a underrun_protection argument to control underrun protection algorithm. Disabling protection will keep loopback latency regardless of underruns. --- src/modules/module-loopback.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git

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

2018-02-14 Thread Raman Shyshniou
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. --- src/modules/module-pipe-source.c | 112 ++- 1 file changed, 86

[pulseaudio-discuss] [PATCH v5 2/2] pipe-source: implement autosuspend option

2018-02-14 Thread Raman Shyshniou
This patch adds the autosuspend= option to suspend pipe-source instead of generating silence when no writers are connected to pipe. --- src/modules/module-pipe-source.c | 69 +++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git

[pulseaudio-discuss] [PATCH v4 2/2] pipe-source: implement autosuspend option

2018-02-14 Thread Raman Shyshniou
This patch adds the autosuspend= option to suspend pipe-source instead of generating silence when no writers are connected to pipe. --- src/modules/module-pipe-source.c | 69 +++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git

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

2018-02-14 Thread Raman Shyshniou
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. --- src/modules/module-pipe-source.c | 91 ++-- 1 file changed, 70

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

2018-02-10 Thread Raman Shyshniou
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. --- src/modules/module-pipe-source.c | 136

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

2018-02-08 Thread Raman Shyshniou
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 +-- 1 file changed,

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

2018-02-08 Thread Raman Shyshniou
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 | 111 +-- 1 file changed, 106