[pulseaudio-discuss] Adding support for bluetooth headsets that only have HFP

2016-08-18 Thread James Bottomley
I recently switched from a JBL Flip 2 which supports both HSP and HFP to an Ultimate Ears Boom 2 which is HFP only. Needless to say this currently means that the Ultimate Ears fails to work with pulseaudio because we only support HSP via the native backend. The first thing to note is that we can

Re: [pulseaudio-discuss] [PATCH v6 14/25] source.c, sink.c: Implement pa_{source, sink}_get_raw_latency_within_thread() calls

2016-08-18 Thread Georg Chini
On 18.08.2016 18:45, Tanu Kaskinen wrote: On Wed, 2016-08-17 at 17:06 +0200, Georg Chini wrote: On 17.08.2016 15:22, Tanu Kaskinen wrote: On Wed, 2016-08-17 at 14:58 +0200, Georg Chini wrote: As said above it does not look more complex to me, but that's a matter of opinion. Anyway, additional

[pulseaudio-discuss] [PATCH] bluetooth: separate HSP and HFP

2016-08-18 Thread James Bottomley
When all headsets supported both HSP and HFP, life was good and we only needed to implement HSP in the native backend. Unfortunately some headsets have started supporting HFP only. Unfortuantely, we can't simply switch to HFP only because that might break older HSP only headsets meaning we need

Re: [pulseaudio-discuss] [PATCH v6 14/25] source.c, sink.c: Implement pa_{source, sink}_get_raw_latency_within_thread() calls

2016-08-18 Thread Tanu Kaskinen
On Wed, 2016-08-17 at 17:06 +0200, Georg Chini wrote: > On 17.08.2016 15:22, Tanu Kaskinen wrote: > > > > On Wed, 2016-08-17 at 14:58 +0200, Georg Chini wrote: > > > Yes, the benefit would be the same, but with much more overhead > > > and also with the drawback of discontinuities in the

[pulseaudio-discuss] [PATCH 2/6] core: PA_PAGE_SIZE using sysconf() may return a negative number

2016-08-18 Thread Peter Meerwald-Stadler
instead of calling sysconf() directly, add function pa_page_size() which uses the guestimate 4096 in case sysconf(_SC_PAGE_SIZE) fails using PA_ONCE to only evaluate sysconf() once the name macro.h/.c is a bit unfortunate when adding functions CID 1137925, CID 1137926, CID 1138485 ---

[pulseaudio-discuss] [PATCH 6/6] sample: RFC: Assert validity of sample_spec

2016-08-18 Thread Peter Meerwald-Stadler
passing an invalid sample_spec to pa_sample_size_of_format(), pa_frame_size(), pa_bytes_per_second(), pa_bytes_to_usec(), pa_usec_to_bytes() currently gives a result of 0 this is problematic as (a) it leads to many potential divide-by-zero issues flagged by Coverity, (b) pa_sample_spec_valid() is

[pulseaudio-discuss] [PATCH 4/6] source-output: Avoid potential NULL dereference

2016-08-18 Thread Peter Meerwald-Stadler
if data->source is NULL, pa_source_output_new_data_set_source() may fail to set data->source; the false retval is ignored, leading to a NULL dereference in pa_source_get_state(data->source) below CID 1323590 --- src/pulsecore/source-output.c | 3 ++- 1 file changed, 2 insertions(+), 1

[pulseaudio-discuss] [PATCH 5/6] sink-input: Avoid potential NULL dereference

2016-08-18 Thread Peter Meerwald-Stadler
if data->sink is NULL, pa_sink_input_new_data_set_sink() may fail to set data->sink; the false retval is ignored, leading to a NULL dereference in pa_sink_get_state(data->sink) below CID 1323591 --- src/pulsecore/sink-input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[pulseaudio-discuss] [PATCH 3/6] tests: Assert granularity range in stripnul.c

2016-08-18 Thread Peter Meerwald-Stadler
CID 1138482 --- src/tests/stripnul.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c index 75390bd..78bb040 100644 --- a/src/tests/stripnul.c +++ b/src/tests/stripnul.c @@ -34,6 +34,7 @@ int main(int argc, char *argv[]) { pa_assert_se(argc >=

[pulseaudio-discuss] [PATCH 1/6] padsp: Fix flush

2016-08-18 Thread Peter Meerwald-Stadler
read() can return a number of bytes read less than k CID 1137981 --- src/utils/padsp.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/utils/padsp.c b/src/utils/padsp.c index 943479b..bb01f7f 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -1768,11

Re: [pulseaudio-discuss] Sink (input) format negotiation concept

2016-08-18 Thread Pierre-Louis Bossart
On 8/18/16 11:43 AM, Rémi Denis-Courmont wrote: Hello, For a number of years already, PulseAudio has supported a concept of sink inputs with multiple formats. That is meant to support S/PDIF output in addition to PCM. One thing I´m wondering... what is the expected behaviour for an