# Sound and Speakers Into The Future



## Geezer (Aug 18, 2021)

Sound works well under Freebsd, and has done for a long time. But I am worried.

In my household there are two laptops, one running FreeBSD (the other, windows). Sound works out of the box. But the speakers on both laptops are beginning to be no good. Quiet, a bit tinny, one side does not work and stuff like that.

On my desktop, running FreeBSD, I have got a loudspeaker set plugged into the soundcard jack. Two piddly little speakers and a so called sub-woofer. Cheap, a few years old, and reasonable. But no great sound.

Now, on any or all machines, how can I change the loudspeakers? On the windows laptop, I merely turn on a cheapo bluetooth loudspeaker, and it all works.

But what about FreeBSD? It is not so easy to get loudspeakers that plug into the sound card any more. There still are a few for sale, but not a great choice, and fewer than previously.

The only real choice for buying new speakers is bluetooth. Useful in that you can have them anywhere in the room. Unfortunately under FreeBSD, bluetooth is rather krap. It does not work out of the box. I have followed the handbook, and after installing iwmbt-firmware, virtual_oss and starting three services - `hcsecd`, `bluetooth`, `sdpd` - I can pair with a bluetooth loudspeaker. But I cannot play any music through it. 

After running `virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 768 -R /dev/null -P /dev/bluetooth/black_speakers -d dsp` the bluetooth loudspeaker dings and dongs and I get the repeating error
`backend_bt: PSM=0x19
backend_bt: Cannot get capabilities
backend_bt: DISCOVER FAILED`

I might well sort this out. I might not. Maybe someone here can suggest.

But still, what a right palava? And what if I get a new flashy expensive bluetooth set of loudspeakers, are they going to work?

So I am a bit worried.

Over the last few years, the ease of getting X to run on most machines has improved no end. I am glad to have a desktop that I can use. But a large part of the desktop experience is with sound. Music, conferencing, films, stuff like that.

Bluetooth and the availability of loudspeakers, is a bit unknown in the future of FreeBSD.


----------



## SirDice (Aug 18, 2021)

Geezer said:


> Now, on any or all machines, how can I change the loudspeakers?


If the laptops have a headphone or line-out then just connect a speaker set to that.



Geezer said:


> It is not so easy to get loudspeakers that plug into the sound card any more.


Of course there are. Maybe it's your local shop that doesn't sell them anymore but there are literally dozens of (computer) speaker sets that still have a line-in, either via left/right cinch or a 3.5mm mini-jack (3.5mm audio jack to dual cinch audio cables are a dime a dozen).


----------



## mer (Aug 18, 2021)

USB connected devices work;  I'm not sure what kinds of speakers are available using usb.


----------



## Geezer (Aug 18, 2021)

SirDice said:


> If the laptops have a headphone or line-out then just connect a speaker set to that.



Yes, thank you. _If_. 

I can see in the future, even laptops will not have headphone sockets, the same as they do not have CD/DVD readers any more. The only practical source of new/replacement speakers looks to be bluetooth.


----------



## SirDice (Aug 18, 2021)

mer said:


> USB connected devices work; I'm not sure what kinds of speakers are available using usb.


That'll work. There are plenty of snd_uaudio(4) USB devices that have a 3.5mm audio jack. Speakers don't have to be included with the USB audio device.


----------



## astyle (Aug 18, 2021)

Geezer said:


> Yes, thank you. _If_.
> 
> I can see in the future, even laptops will not have headphone sockets, the same as they do not have CD/DVD readers any more. The only practical source of new/replacement speakers looks to be bluetooth.


You planning to buy new laptops? Lucky dog. But even those will have a USB-C port that you can use to connect an external hub to. And those external hubs - you can connect anything to them, ethernet, HDMI, (micro)SD, you name it. You might have to look long and hard for a hub that has audio ports, though. It's amazing what you can find on Amazon or elsewhere on the Internet these days.


----------



## mer (Aug 18, 2021)

I'm old school.  To me Audio is a good pre-amp, amplifier, inputs (turntable) and analog speakers.  My ears aren't good enough to tell the difference between analog and digital anymore, but at one time they could.
So, personally, I'd look for some kind of USB codec/amp/whatever that I could use MonsterCable to connect a set of Kilipsch/Bose/Old school analog vented speakers with woofers to.


----------



## astyle (Aug 18, 2021)

Good hubs will have ports for any audio cable you want. Just don't confuse codecs (software) with sound amplifiers (hardware) with `# kldload snd_driver`.


----------



## Tieks (Aug 18, 2021)

mer said:


> I'm not sure what kinds of speakers are available using usb.


USB audio devices have line-out connectors too that can be used to drive loudspeakers directly. To get a decent volume for your heavy metal rave, make sure there is enough amplification. Either by putting an amplifier in between or by connecting it to active (=amplifier built-in) loudspeakers.


----------



## mer (Aug 18, 2021)

Tieks said:


> To get a decent volume for your heavy metal rave, make sure there is enough amplification.


Sorry, Bagpipes


----------



## astyle (Aug 18, 2021)

mer said:


> Sorry, Bagpipes


In which case you may need a high quality microphone to record the sound, and then play the recording. If you skip the recording part entirely, then any kind of computer is going to be irrelevant in your setup, mer .


----------



## Tieks (Aug 18, 2021)

mer said:


> Sorry, Bagpipes


Don't worry. Line-outs can drive noise-canceling headphones too.


----------



## mer (Aug 18, 2021)

Really?  No love for the pipe and drums?


----------



## Geezer (Aug 19, 2021)

astyle, SirDice, mer, Tieks well then, it looks as if somehow I will be able to use loudspeakers. But before this thread eventually disappears over the event horizon, it seems that absolutely no one is interested  that bluetooth.



astyle said:


> You planning to buy new laptops?


At some stage _*in the future*_. I think that is reasonable.



astyle said:


> Lucky dog.


Woof.


----------



## astyle (Aug 19, 2021)

Geezer said:


> it seems that absolutely no one is interested that bluetooth.


Well, Bluetooth has been unreliable for me even under Windows, and getting it to work under FreeBSD is not a priority for me. In my case, I just need Bluetooth for a mouse, and headphones/speakers.  Or, I can reliably plug them into USB ports and forget about them. In the future, I might put in the effort and figure something out - by then Bluetooth 5 will be more common, and hopefully more reliable.


----------



## richardtoohey2 (Aug 19, 2021)

There are also USB to Bluetooth dongles - so you _might_ be able to get BT speakers to work with that?

e.g. Creative BT-W2

BUT I'm not exactly sure what they do or how they work so might not be a good idea!


----------



## Geezer (Aug 19, 2021)

richardtoohey2 said:


> There are also USB to Bluetooth dongles - so you _might_ be able to get BT speakers to work with that?
> 
> e.g. Creative BT-W2
> 
> BUT I'm not exactly sure what they do or how they work so might not be a good idea!



Thank you. Might be a great idea or another layer of problem.

I am actually using a BT USB dongle. Am not quite sure how this creative one is different (apart from more expensive).


----------



## richardtoohey2 (Aug 19, 2021)

Geezer said:


> it seems that absolutely no one is interested that bluetooth.


It kinda works ... but even on my idiot-proof Mac it stops working, volume controls don't do anything, it stutters, connection drops.  Have to restart the computer, turn things on/off and most of the it starts working again ... for a while.  Sometimes they disagree (Mac and speakers) and the volume goes insanely loud or whisper quiet.  Obviously these may be bugs in Mac OS X, the speakers, Bluetooth, the Music app etc. etc. so might not all be Bluetooth's fault.

Then we got a new Corolla and when my son went to drive off my phone decided to hand the connection over to the car and he drove off wondering why someone was talking to him (my caller).  So we had to turn Bluetooth off in the car.

I also use OpenBSD and there's no Bluetooth support on there at all (and someone mentioned that USB/BT gadget) so I'm used to living without it.

But others have said, the older hardware seems likely to be around for a good while longer.  Hopefully.


----------



## Geezer (Aug 19, 2021)

richardtoohey2 said:


> It kinda works ... but even on my idiot-proof Mac it stops working, volume controls don't do anything, it stutters, connection drops.  Have to restart the computer, turn things on/off and most of the it starts working again ... for a while.  Sometimes they disagree (Mac and speakers) and the volume goes insanely loud or whisper quiet.  Obviously these may be bugs in Mac OS X, the speakers, Bluetooth, the Music app etc. etc. so might not all be Bluetooth's fault.



Oh, er, ooh, argh. Is that a good reason not to use BT, or not to use a mac?


----------



## Tieks (Aug 19, 2021)

Geezer said:


> Is that a good reason not to use BT


The problem could be the support in FBSD for BT. I tried a USB-BT stick once to send music to an amplifier with built-in DAC. It seemed to pair, but I never got it to work. The support for BT may be better by now, or improve in the future. Meanwhile you will have to resort to alternatives, like USB, Firewire, SPDIF or ethernet. If you have an amplifier that supports BT, it might support one of those as well.
In terms of quality all of these alternatives may be better than the 3.5mm jack. External DAC's are usually better and won't give the interference noise of a computer.


----------



## richardtoohey2 (Aug 19, 2021)

Geezer said:


> Oh, er, ooh, argh. Is that a good reason not to use BT, or not to use a mac?


Just saying on any OS that BT has its "moments" (but then that's true of most things!)  A colleague uses Windows and has the same occasional pairing issues, volume issues, control being handed off from (Android) phone to car etc.

Your original post seemed to be asking if BT works well in FreeBSD - I'm saying that I can't answer for the FreeBSD part, but that on other OSs it (BT) seems less reliable than a wired connection.


----------



## hselasky@ (Aug 22, 2021)

You will have to do some debugging. Some bluetooth devices require that you have virtual_bt_speaker running aswell. Also there is something with BT master/slave mode you need to check with hccontrol. Second, but not least, make sure your device is properly paired. The bluetooth-config script can help you do this.


----------

