[pulseaudio-discuss] [RFC] prevent-dpms-off: Add module to signal DPMS should not happen

2018-02-19 Thread Benjamin Berg
From: Benjamin Berg Whenever an HDMI/DP sink is in use DPMS should not be done by desktop environments. Add a property to the appropriate ports and inform the DE that DPMS off should be inhibited whenever a port or sink with the device.requires.no_dpms_off property is set to boolean true. TODO:

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

2018-02-19 Thread Tanu Kaskinen
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.c | 3 +++ src/modules/alsa/alsa-source.c

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

2018-02-19 Thread Tanu Kaskinen
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 changes available to modules through the state cha

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

2018-02-19 Thread Tanu Kaskinen
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 other modules use thread_info.state too, so a

[pulseaudio-discuss] [PATCH 0/8] Sink/source state change fixes

2018-02-19 Thread Tanu Kaskinen
These patches fix the release blocker bug 104761. There are some smaller patches included that aren't directly related to the bug, they are just some issues around the general topic of state changing that I noticed while working on the bug. The original problem was that pa_sink_suspend() was being

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

2018-02-19 Thread Tanu Kaskinen
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_sink/source_suspend() shouldn't have any alsa

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

2018-02-19 Thread Tanu Kaskinen
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, 16 insertions(+), 36 deletions(-) diff --git a/s

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

2018-02-19 Thread Tanu Kaskinen
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_sink/source_suspend() shouldn't have any alsa s

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

2018-02-19 Thread Tanu Kaskinen
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. --- src/modules/bluetooth/module-bluez4-dev

[pulseaudio-discuss] [PATCH 8/8] fix a call to pa_sink_suspend() from an incorrect thread

2018-02-19 Thread Tanu Kaskinen
The alsa sink calls pa_sink_suspend() from the set_port() callback. pa_sink_suspend() can only be called from the main thread, but the set_port() callback is often called from the IO thread. That caused an assertion to be hit in pa_sink_suspend() when switching ports. Another issue was that pa_sin

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

[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 a/src/modules/module-loopbac

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

2018-02-19 Thread Andreas Hartmetz
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 configured separately. There are good reasons fo

[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] 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 (s

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] Per (sink input, sink) volume control / routing

2018-02-19 Thread Andreas Hartmetz
Am Montag, 19. Februar 2018, 17:05:27 CET schrieben Sie: > 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 tha

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

[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. --- src/module