mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.55k stars 1.29k forks source link

Bluetooth Headset (via pulse) severe buffer underruns (scrambled sound) #7148

Open mixxxbot opened 2 years ago

mixxxbot commented 2 years ago

Reported by: quequotion Date: 2013-08-19T18:21:42Z Status: In Progress Importance: High Launchpad Issue: lp1214079 Tags: portaudio


I have an audio setup with Dolby 5.1 Surround (synthetic A52 device) via spdif (Realtek ALC892) and an A2DP bluetooth headset (Sony DR-BT101).

Whatever I choose for a buffer length, the a52 output is fine, but to get comprehensible audio through the headset I have to set it as high as it can go.

Even at the highest setting, the audio through the headphones is choppy, poppy, and somewhat scrambled. At lower buffers I get no audio or high-pitched noise (completely scrambled).

Strangely, the buffer underrun count shows zero at all times.

mixxxbot commented 2 years ago

Commented by: quequotion Date: 2013-08-19T18:26:11Z


By the way, in order to use the a52 and a2dp simultaneously, I specify "a52" for Master and "pulse" for headphones, after connecting the headset and setting it as the default pulseaudio output using blueman and pavucontrol.

There's no other way to access the headset than indirectly through pulseaudio, which I think is an alsa problem (no functionality to identify or control bluetooth devices, even with bluez-alsa installed).

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2013-08-19T21:15:20Z


This might be a variant of Bug #⁠1203249

mixxxbot commented 2 years ago

Commented by: quequotion Date: 2013-08-20T01:25:14Z


Schürmann

Possibly. Perhaps the additional constraints of bluetooth exasperate the issue.

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2016-09-26T07:00:11Z


The "pulse" bridge in Mixxx is just a workaround to use Mixxx as PulsAudio client along with other desktop apps. It uses an additional buffer to for syncing, so you cannot expect to achieve low latency or use a small audio buffer.

The situation was lately a bit improved. You find untested alpha builds here: http://downloads.mixxx.org/builds/master/release/

A workaround for bluetooth is described here:

http://askubuntu.com/questions/713145/how-do-i-connect-bluez-alsa-to-an-audio-device

There is also an experimental native Pulsaudio integration available here: https://github.com/illuusio/portaudio-pulseaudio/tree/hostapi-pulseaudio

mixxxbot commented 2 years ago

Commented by: illuusio Date: 2016-09-27T05:39:28Z


I assume headset work as expected without Mixxx for example with mpv, vlc or firefox? You can test with VLC because it uses also ALSA-PulseAudio bridge if you choose ALSA from audio settings. Multiple Bluetooth devices seems to have pops and clicks because of their very high end demands or not supporting A2DP or a52 correctly. Does 'dmesg' say anything?

New GIT address and fixed Pull Request can be found at https://app.assembla.com/spaces/portaudio/subversion/source/HEAD/portaudio/trunk

So if you are advanced and can compile it I can help you through using it.

If you feel lucky you can test binary package which have this patch applied from: http://download.opensuse.org/repositories/home:/illuusio:/portaudio/

Small disclaimer it will override your current portaudio so if isn't working then nothing that uses portaudio ain't working but it should solve most PulseAudio problems.