Re: [pulseaudio-discuss] [PATCH v9 0/8] Bluetooth A2DP codecs

2019-05-03 Thread Pali Rohár
On Wednesday 01 May 2019 13:25:04 Luiz Augusto von Dentz wrote: > Hi Pali, > > On Wed, May 1, 2019 at 12:09 PM Pali Rohár wrote: > > > > On Tuesday 30 April 2019 12:42:28 Luiz Augusto von Dentz wrote: > > > 1. At least Android seems to prefer aptX-HD but that doesn't seems to > > > produce any au

Re: [pulseaudio-discuss] [PATCH v9 0/8] Bluetooth A2DP codecs

2019-05-03 Thread Pali Rohár
On Tuesday 30 April 2019 12:42:28 Luiz Augusto von Dentz wrote: > 1. At least Android seems to prefer aptX-HD but that doesn't seems to > produce any audio, in fact it crashed a few times so either have to > find out why aptX-HD is not working or don't include it. It is possible that android sends

Re: [pulseaudio-discuss] new module module-plugin-sink

2019-05-03 Thread Alexander E. Patrakov
пт, 3 мая 2019 г. в 11:57, Georg Chini : > The channel layout of input/output > and the playback device is known to module-plugin-sink, so if > a filter needs it, it can be passed as parameter. No need to > have it in the interface. (I have also received your next email, ACK on the thought that th

Re: [pulseaudio-discuss] new module module-plugin-sink

2019-05-03 Thread Georg Chini
On 03.05.19 08:57, Georg Chini wrote: On 03.05.19 06:56, Alexander E. Patrakov wrote: пт, 3 мая 2019 г. в 09:31, Georg Chini : On 03.05.19 02:22, Alexander E. Patrakov wrote: чт, 2 мая 2019 г. в 23:45, Georg Chini : Hi, I created a new module-plugin-sink and a small amplifier demo plugin bas

Re: [pulseaudio-discuss] new module module-plugin-sink

2019-05-03 Thread Georg Chini
On 03.05.19 16:32, Alexander E. Patrakov wrote: пт, 3 мая 2019 г. в 11:57, Georg Chini : The channel layout of input/output and the playback device is known to module-plugin-sink, so if a filter needs it, it can be passed as parameter. No need to have it in the interface. (I have also received

[pulseaudio-discuss] [PATCH v10 02/11] bluetooth: Fix usage of RTP structures in SBC codec

2019-05-03 Thread Pali Rohár
Rename struct rtp_payload to rtp_sbc_payload as it is specific for SBC codec. Add proper checks for endianity in rtp.h header and use uint8_t type where appropriated. And because rtp_sbc_payload structure is not parsed by decoder there is no support for fragmented SBC frames. Add warning for it. --

[pulseaudio-discuss] [PATCH v10 04/11] bluetooth: Parse remote timestamp from A2DP RTP packets when available

2019-05-03 Thread Pali Rohár
Some A2DP codecs (e.g. SBC or aptX-HD) use RTP packets. For sources use timestamps from RTP packets to calculate read index and therefore remote timestamp for synchronization. --- src/modules/bluetooth/a2dp-codec-api.h | 4 ++-- src/modules/bluetooth/a2dp-codec-sbc.c | 3 ++- src/mod

[pulseaudio-discuss] [PATCH v10 01/11] bluetooth: Fix A2DP codec API to provide information about data buffer

2019-05-03 Thread Pali Rohár
Each codec has different compression ratio and own method how to calculate buffer size of encoded or decoded samples. So change A2DP codec API to provide this information for module-bluez5-device module and fix a2dp_prepare_encoder_buffer() and a2dp_prepare_decoder_buffer() functions. API function

[pulseaudio-discuss] [PATCH v10 07/11] bluetooth: Add A2DP FastStream codec support

2019-05-03 Thread Pali Rohár
This patch provides support for FastStream codec in bluetooth A2DP profile. FastStream codec is bi-directional, which means that support both music playback and microphone voice at the same time. FastStream codec is just SBC codec with fixed parameters. For playback are used following parameters:

[pulseaudio-discuss] [PATCH v10 06/11] bluetooth: Add A2DP aptX and aptX HD codecs support

2019-05-03 Thread Pali Rohár
This patch provides support for aptX and aptX HD codecs in bluetooth A2DP profile. It uses open source LGPLv2.1+ licensed libopenaptx library which can be found at https://github.com/pali/libopenaptx. aptX for s24 stereo samples provides fixed 6:1 compression ratio and bitrate 352.8 kbit/s, aptX H

[pulseaudio-discuss] [PATCH v10 00/11] Bluetooth A2DP codecs

2019-05-03 Thread Pali Rohár
Changes in v10: * SBC: Mark const table with "const" * SBC: Fix choosing frequency * SBC: Fix checking for channel mode capability * SBC: Fix usage of RTP structures * aptX-HD: Fix calculation of buffer size * aptX-HD: Wrap data to RTP packets * Fix choosing initial profile, use directly bluetooth

[pulseaudio-discuss] [PATCH v10 05/11] bluetooth: Set initial A2DP profile which bluez already activated

2019-05-03 Thread Pali Rohár
Bluez and remote device decide which A2DP codec would use. Use this selected A2DP codec as initial profile in pulseaudio. In most cases it is either last used codec or codec with higher priority by defined by remote device. To detect which A2DP profile was activated by bluez, look at bluez transp

[pulseaudio-discuss] [PATCH v10 09/11] bluetooth: policy: Reflect a2dp profile names

2019-05-03 Thread Pali Rohár
In next patches, codec name is appended end the end of a2dp profile names. --- src/modules/bluetooth/module-bluetooth-policy.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-

[pulseaudio-discuss] [PATCH v10 08/11] bluetooth: Add more variants of SBC codec

2019-05-03 Thread Pali Rohár
Specify configuration for Low, Middle, High and Ultra High Quality of SBC codec. SBC codec in Ultra High Quality has higher quality than aptX. Automatic Quality mode matches configuration of SBC codec which was used before this change. Which means that it accept configuration between Low and High

[pulseaudio-discuss] [PATCH v10 03/11] bluetooth: Update TODO: about tstamp in a2dp_process_push()

2019-05-03 Thread Pali Rohár
tstamp is local time when packet was received -- not remote time when packet was sent. --- src/modules/bluetooth/module-bluez5-device.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-d

[pulseaudio-discuss] [PATCH v10 11/11] bluetooth: policy: Treat bi-directional A2DP profiles as suitable for VOIP

2019-05-03 Thread Pali Rohár
Previously module-bluetooth-policy was switching from A2DP to HSP profile when VOIP application started recording of source. Now it switch to profile with the highest priority which has both sink and source. In most cases it is HSP profile, but it can be also bi-directional A2DP profile (e.g. FastS

[pulseaudio-discuss] [PATCH v10 10/11] bluetooth: Implement A2DP codec switching and backchannel support

2019-05-03 Thread Pali Rohár
Some A2DP codecs (like FastStream or aptX Low Latency) are bi-directional and can be used for both music playback and audio call. This patch implements usage of backchannel if A2DP codec provided by pulseaudio API supports it. A2DP codec switching needs new version of bluez as older version does n

Re: [pulseaudio-discuss] new module module-plugin-sink

2019-05-03 Thread Alexander E. Patrakov
пт, 3 мая 2019 г. в 23:04, Georg Chini : > > On 03.05.19 16:32, Alexander E. Patrakov wrote: > > пт, 3 мая 2019 г. в 11:57, Georg Chini : > >> The channel layout of input/output > >> and the playback device is known to module-plugin-sink, so if > >> a filter needs it, it can be passed as parameter.

Re: [pulseaudio-discuss] new module module-plugin-sink

2019-05-03 Thread Georg Chini
On 04.05.19 01:34, Alexander E. Patrakov wrote: пт, 3 мая 2019 г. в 23:04, Georg Chini : On 03.05.19 16:32, Alexander E. Patrakov wrote: пт, 3 мая 2019 г. в 11:57, Georg Chini : The channel layout of input/output and the playback device is known to module-plugin-sink, so if a filter needs it,