[pulseaudio-discuss] [PATCH] Fix: Distorted audio during Bluetooth SCO HFP/HSP playback

Georg Chini georg at chini.tk
Fri Jan 27 20:40:44 UTC 2017


On 03.01.2017 18:17, Tanu Kaskinen wrote:
> On Thu, 2016-12-15 at 12:34 +0530, Renjith Thomas wrote:
>> Issue: When HFP/HSP profile is used with certain BT chipsets, the
>> audio sounds heavily distorted, with very slow playback full of noise.
>> During recording, the samples are dropped and it distorts the recorded
>> audio samples.
>>
>> The root cause of both the issues are related to the fixed MTU sizes
>> in the PA stack, which is 48 bytes. Here, the BT chipset CC256x had
>> 180 bytes MTU and it was being under-utilized and the rate at which
>> the samples were being accepted where not matching the expected rate,
>> and hence the distortion.
>>
>> Solution: The appropriate solution to this problem is by reading the
>> MTU size of the SCO socket using getsockopts dynamically.
>>
>> BugLink: http://bit.ly/2gDpGPv
>> BugLink: http://bit.ly/2hQsARK
>> ---
>>   src/modules/bluetooth/backend-native.c | 28 ++++++++++++++++++----------
>>   1 file changed, 18 insertions(+), 10 deletions(-)
> Thanks! Applied to the "next" branch.
>
Hi,

this patch breaks HSP for me. My headset (Plantonics Backbeat Pro)
returns an MTU of 64, but it looks like this is only working for recording.
When I try to play back something, I cannot hear any sound and the
headset disconnects after a few seconds.

When I set omtu to 48, everything is working again.

Regards
              Georg



More information about the pulseaudio-discuss mailing list