LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-08-2020, 02:18 PM   #1
Panagiotis Nik
Member
 
Registered: Jul 2014
Distribution: Slackware64-Current, Slackware64-14.2
Posts: 32

Rep: Reputation: Disabled
ALSA and bluetooth audio


Hello,

Recently I received as a gift a bluetooth speaker. My Slackware64-current desktop (Xfce) is pure ALSA and when I first tried to connect with my speaker trough blueman-manager I received a “protocol error”.

Searching for a solution I founded that there's a program called "bluez-alsa" that offers integration between BlueZ >= 5 and ALSA.
There’s already a SlackBuild for "bluez-alsa" buit since it was outdated I tweaked it in order to install the latest version of "bluez-alsa" and then I was able to connect with my speaker.

After some changes in my asound.conf I was able to have sound in my speaker although they're some problems:
When I’m in youtube the only way to switch to an other sound source is to close the tab since to stop the player is not enough (I’m using Firefox as my browser.)
Also I need to add the output line in my xfce4-mixer since now is missing and there’s no option to adjust the sound level.

I’m wondering if somebody else using "bluez-alsa" and can share more information.
 
Old 01-08-2020, 04:18 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,661

Rep: Reputation: Disabled
Caveat emptor: this post is OT as my setting is not pure-alsa.

Last month I received as gifts from my sons an USB sound board and a bluetooth headset.

As soon as I connect one of these devices it appears in the pavucontrol GUI in both Setup and Output devices tabs, so I can do what I want easily, like mute or unmute one of them, set its volume specifically etc.

I have nothing in /etc/asound.conf (no redirection to pulse) but have this setting in /etc/pulse/default.pa:
Code:
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop
Just my

EDIT. I almost forgot: I can do also many settings with a right click in the mixer applet of Mate Panel choosing Preferences. It has several tab: sound effects (set a sound alert and its volume), hardware (choose of the profile and test of the channels), input (choice of the device and input volume), output (setting of the volumes of the devices) applications (setting of the volume of the sound produced by each application).

Last edited by Didier Spaier; 01-08-2020 at 04:51 PM. Reason: EDIT added.
 
Old 01-09-2020, 10:00 PM   #3
Panagiotis Nik
Member
 
Registered: Jul 2014
Distribution: Slackware64-Current, Slackware64-14.2
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
I have nothing in /etc/asound.conf (no redirection to pulse) but have this setting in /etc/pulse/default.pa:
Code:
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop
Thanks for the suggestion. I already tried to add dmix in my asoundrc although without luck.

Quote:
Originally Posted by Didier Spaier View Post
EDIT. I almost forgot: I can do also many settings with a right click in the mixer applet of Mate Panel choosing Preferences. It has several tab: sound effects (set a sound alert and its volume), hardware (choose of the profile and test of the channels), input (choice of the device and input volume), output (setting of the volumes of the devices) applications (setting of the volume of the sound produced by each application).
For the moment I made a small script to change from my headphones to the bluetooth speaker and vice versa since xfce audio mixer is missing the output.
Any way I'm very happy that I can have bluetooth audio without to use pulse
 
1 members found this post helpful.
Old 01-10-2020, 04:02 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,661

Rep: Reputation: Disabled
Quote:
Originally Posted by Panagiotis Nik View Post
Thanks for the suggestion. I already tried to add dmix in my asoundrc although without luck.
The goal of these settings in default.pa is have pulse using the dmix alsa mixer so they only make sense if pulse is installed

Quote:
For the moment I made a small script to change from my headphones to the Bluetooth speaker and vice versa since xfce audio mixer is missing the output.
Any way I'm very happy that I can have Bluetooth audio without to use pulse
I just checked in XFCE 4.14. Same as in Mate 1.22: as soon as I switch on my Bluetooth headset the xfce4 mixer on the panel can handle it.

But feel free to make your life more complicated just to avoid installing pulse.

As an aside, I still didn't find in the many posts from pulse haters in this forum a rationale not to have it installed. I suspect that most just don't know how to properly set alsa + pulseaudio (+ optionally jack) for their use case. To learn it's worthwhile reading PulseAudio under the hood from Victor Gaydov.

Last edited by Didier Spaier; 01-10-2020 at 04:06 AM.
 
Old 01-12-2020, 07:25 AM   #5
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 556

Rep: Reputation: 190Reputation: 190
You need pulse audio for bluetooth audio to work in current.
"bluez-alsa" didn't work with any bluetooth headphone or headsets last time that i tried but maybe it works better now.
I had problems with my computer hanging all the time when i tried to use bluetooth audio without pulse audio.

Bluez5 dropped alsa support.
https://git.kernel.org/pub/scm/bluet...328cb0b1ab0818
https://github.com/Arkq/bluez-alsa

Last edited by Nille_kungen; 01-12-2020 at 10:30 AM.
 
Old 01-12-2020, 09:24 AM   #6
Tonus
Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 828
Blog Entries: 3

Rep: Reputation: 213Reputation: 213Reputation: 213
ALSA and bluetooth audio

@Didier :
I have pulse installed.
I find it overall complicated and hard to deal with.
I had lot of work to script the switch speakers/bt/jack. Nothing is simple with it and documentation is a pity.

That said, it works.
 
1 members found this post helpful.
Old 01-13-2020, 09:12 PM   #7
Panagiotis Nik
Member
 
Registered: Jul 2014
Distribution: Slackware64-Current, Slackware64-14.2
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Nille_kungen View Post
You need pulse audio for bluetooth audio to work in current.
"bluez-alsa" didn't work with any bluetooth headphone or headsets last time that i tried but maybe it works better now.
I had problems with my computer hanging all the time when i tried to use bluetooth audio without pulse audio.

Bluez5 dropped alsa support.
https://git.kernel.org/pub/scm/bluet...328cb0b1ab0818
https://github.com/Arkq/bluez-alsa
In my case bluealsa works with my speakers although there're some small glitches like the xfce audio mixer is missing the output line and I can have sound in Firefox in one tab at the time...

In order to load successfully bluealsa in my system (Slackware64-current) I made a script to start-stop bluealsa and restart rc.alsa at the same time instead an entry in rc.local (/usr/bin/bluealsa &) that was suggested by the SlackBuild.
With that way I can switch the sound between my bluetooth speaker and my headphones without a problem.

I believe that bluez-alsa is a project that needs more attention since after bluez dropped support for alsa one in order to have bluetooth audio in Slackare needs to install pulse audio.
 
1 members found this post helpful.
Old 11-16-2020, 10:43 AM   #8
jobsworth
LQ Newbie
 
Registered: Jan 2010
Location: brighton england
Distribution: Debian not Ubuntu
Posts: 22

Rep: Reputation: 0
in order to get any sound at all running raspian on a pi 4 i must
sudo apt purge pulseaudio.
just now i bought some bluetooth earbuds and can connect to them but no sound.
now i learn that pulseaudio supports bluetooth while alsa does not.
what to do?
 
Old 11-16-2020, 10:55 AM   #9
LuckyCyborg
Member
 
Registered: Mar 2010
Posts: 952

Rep: Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708
Quote:
Originally Posted by jobsworth View Post
what to do?
How about to install and setup properly the PulseAudio?

Just because something does not work out of box is not a reason to just remove it...

Last edited by LuckyCyborg; 11-16-2020 at 10:59 AM.
 
Old 11-16-2020, 12:11 PM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,704

Rep: Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298
Quote:
Originally Posted by jobsworth View Post
in order to get any sound at all running raspian on a pi 4 i must
sudo apt purge pulseaudio.
just now i bought some bluetooth earbuds and can connect to them but no sound.
now i learn that pulseaudio supports bluetooth while alsa does not.
what to do?
I'd recommend getting help on a Raspian forum. This is the Slackware subforum and other distros might have things configured differently.
 
Old 11-16-2020, 02:49 PM   #11
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 14.1_32
Posts: 364

Rep: Reputation: 200Reputation: 200Reputation: 200
Quote:
Originally Posted by Didier Spaier View Post
The goal of these settings in default.pa is have pulse using the dmix alsa mixer so they only make sense if pulse is installed

I just checked in XFCE 4.14. Same as in Mate 1.22: as soon as I switch on my Bluetooth headset the xfce4 mixer on the panel can handle it.

But feel free to make your life more complicated just to avoid installing pulse.

As an aside, I still didn't find in the many posts from pulse haters in this forum a rationale not to have it installed. I suspect that most just don't know how to properly set alsa + pulseaudio (+ optionally jack) for their use case. To learn it's worthwhile reading PulseAudio under the hood from Victor Gaydov.
Since you're such the pompous one, and seem to pick-and-choose what you read and see, here it is *AGAIN*...I've posted (as have quite a few others) many times that ALSA sound is far superior to the abortion you love over everything else, also known as pulse audio. It sounds better, and has far better controls to adjust as I needed for my music and my speakers. Pulse has nothing to contribute that comes close nor does it sound as good. It does nothing but take over...like a bad disease that has no cure yet for it...about like that waste of air systemd.

There it is, once again. Maybe this time you'll see it, but I won't hold my breath.
 
1 members found this post helpful.
Old 11-16-2020, 06:09 PM   #12
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,704

Rep: Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298
Quote:
Originally Posted by FTIO View Post
Since you're such the pompous one, and seem to pick-and-choose what you read and see, here it is *AGAIN*...I've posted (as have quite a few others) many times that ALSA sound is far superior to the abortion you love over everything else, also known as pulse audio. It sounds better, and has far better controls to adjust as I needed for my music and my speakers. Pulse has nothing to contribute that comes close nor does it sound as good. It does nothing but take over...like a bad disease that has no cure yet for it...about like that waste of air systemd.

There it is, once again. Maybe this time you'll see it, but I won't hold my breath.
And I've asked many times (including PMs), here it is *AGAIN*... Please stop using terminology like "abortion" when referring to pulseaudio. We get it, you don't like it, but this is a horrible word to use in reference to a piece of software.

Pulse is not ideal in all situations, but it seems to be better than pure alsa for the vast majority of people. I have noticed no difference in sound quality with pulse vs alsa on my htpc (using a high end stereo, using everything from youtube, to stereo, to DTS for my audio sources) or my desktop (fairly basic speakers). What I have noticed is it is a lot easier to set up the audio on my systems (not that it was hard with alsa, but definitely more work). You may notice differences in sound and others may notice lags that make pulse less than ideal for you, but that doesn't mean that pulse is the worst software ever... just that it is not ideal for you.
 
Old 11-17-2020, 02:00 PM   #13
Tonus
Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 828
Blog Entries: 3

Rep: Reputation: 213Reputation: 213Reputation: 213
Sorry but I can't let you day that : before pulse crap, juste had to have an look on docs, set, it worked for ages.
Now, everything might change if not break when you plug New device : the older stop working and do not even more when newer device is gone :-(
 
Old 11-17-2020, 02:31 PM   #14
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 7,704

Rep: Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298Reputation: 5298
Quote:
Originally Posted by Tonus View Post
Sorry but I can't let you day that : before pulse crap, juste had to have an look on docs, set, it worked for ages.
Now, everything might change if not break when you plug New device : the older stop working and do not even more when newer device is gone :-(
After "pulse crap", I didn't even have to look at the docs. Just start up pavucontrol and ensure the right output is selected. I've never had issues with things breaking, but then I'm not changing sound devices around. I never use headphones and my htpc is hooked up to my stereo with HDMI and my desktop is hooked up with the analog 3.5mm jack. I've heard that pulse is nicer for many people who use USB headphones as it allows for simple transfer of the output device, but I have never verified this.

This is not to say I had issues setting up alsa (I'd been doing it for years before pulse was added to Slackware), but it was definitely more work than pulse. Alsa would almost always default to the hdmi out on your video card, and unless someone had audio hooked up through their hdmi, they'd need to alter configs to change it. Prior to 14.2, pretty frequently, we'd need to help people on the forum adjust their alsa outputs to switch from hdmi to their motherboard's analog 3.5mm jack. Those posts have been mostly non-existent since 14.2 was released.

I will NEVER say that pulse is better than alsa for everyone. That is impossible to do. I don't think there's ever been a single product/software that is the absolute best for everyone. However, for MANY people, pulse is an improvement over alsa. If it is not an improvement for you, then that's fine. Pat has included pure-alsa in extra/ to help those that want to run pulse free, but just because it is not an improvement for you, doesn't mean that others have not benefited from it being added to Slackware.
 
Old 11-17-2020, 05:06 PM   #15
Tonus
Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 828
Blog Entries: 3

Rep: Reputation: 213Reputation: 213Reputation: 213
Just saying that "vaste majority" seems too much imho without saying how you really evaluate.

And without that, even if your posts are very balanced, good opinions seems less significant than bad experience to me (Karl Popper is right on this one.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bluetooth dongle + bluetooth speaker but no sound on the bluetooth speaker vonbiber Slackware 4 05-11-2017 10:53 AM
How to switch my alsa card 0 and alsa card 1 in ALSA? frenchn00b Debian 10 12-11-2009 01:16 PM
integrated hda audio modem bluetooth , (intel hda audio does not work) reggae linux Linux - Laptop and Netbook 1 07-05-2006 11:13 PM
integrated hda audio modem bluetooth , (intel hda audio does not work) reggae linux Linux - Laptop and Netbook 2 07-05-2006 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration