[pulseaudio-discuss] bluetooth source not created

Alexander E. Patrakov patrakov at gmail.com
Mon May 9 15:06:16 UTC 2016

09.05.2016 18:42, Marco Trapanese пишет:
> Il 09/05/2016 15:38, Marco Trapanese ha scritto:
>> Removing that flag I now see the bluez source with pactl list sources.
>> But when I start playing a song from the smartphone something weird
>> happens:
> I add that pactl modules shows:
>> Module #14
>>     Name: module-bluez5-device
>>     Argument: path=/org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx
>>     Usage counter: 1
>>     Properties:
>>         module.author = "João Paulo Rechi Vita"
>>         module.description = "BlueZ 5 Bluetooth audio sink and source"
>>         module.version = "8.0"
>> Module #15
>>     Name: module-loopback
>>     Argument: source="bluez_source.xx_xx_xx_xx_xx_xx"
>> source_dont_move="true" sink_input_properties="media.role=music"
>>     Usage counter: n/a
>>     Properties:
>>         module.author = "Pierre-Louis Bossart"
>>         module.description = "Loopback from source to sink"
>>         module.version = "8.0"
> And it "play" if I pair the smartphone as user!
> The audio is pretty bad, though... lot of stutters and interruptions.

I suggest that you run pulseaudio as the same user that other software 
runs as (i.e. not in system mode). This will allow using shm safely.

The other tunable is the resampler. Nowadays the default is either 
speex-float-1 or speex-fixed-1, depending on how the speex library was 
compiled. Both of those resamplers are objectively much worse than the 
default in Windows 7 (i.e. they create easily audible distortions of 
high-frequency pure tones), but should still be good enough (as in: 
nobody would notice by ear the difference from the perfect resampler on 
99.99% of released music albums). However, this is still too much work 
for embedded CPUs.

You can try setting the resampler to speex-float-0 in daemon.conf. It 
will fall back to speex-fixed-0 if your speex library has been compiled 
with fixed point.

Also, verify whether your speex library is compiled with fixed point. On 
embedded devices, fixed-point is faster, but some speex API (related to 
automatic gain control and similar things) becomes unavailable, so it 
may or may not be an option for your application.

Alexander E. Patrakov

More information about the pulseaudio-discuss mailing list