Bughunting bluetooth audio

Crivens

Administrator
Staff member
Administrator
Moderator
service hcsecd onestart
# service hcsecd onestart
hcsecd does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable


service bluetooth start ubt0
# service bluetooth start ubt0
bluetooth does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable



This is how far I get. What is missing here?
 
No, that is not there. I'm running
FreeBSD Wanderer 13.0-RELEASE-p5 FreeBSD 13.0-RELEASE-p5 #23 releng/13.0-n244765-2646dd66590: Fri Dec 3 03:11:32 CET 2021
 
I had touched src.conf last time when I was still running 8.x, and lo and behold, the only line in there was the one about bluetooth.
Since this is the howto section (I didn't realize that in time), may I collapse all the posts and simply point out that this might be a problem?
 
Maybe here for the src.conf discussion:

 
Or make a separate topic and move the posts there.
I'm also curious what specific needs you have to build a custom kernel.
Well, I did development of kernel drivers once, and now was asked to get the kernel module up and running on 13+ as the development had stopped on 8.x several years ago. I have almost all the time compiling world+kernel from releng, but stopped to do that to ports.
 
Oh, and today I recompiled a kernel without any sound support. You need to do that when you want to use the oss port instead of the kernel provided one. And I assume we have a regression somewhere, since the kernel provided one does not work with a headphone jack, plugging in a headphone does nothing as does setting the default unit. But I want to connect my stereo, so I tried to use a BT->Analog box for that so I could connect the stereo by bluetooth. That works with my phone, but not the laptop since the laptop sees all the headphones I tried it on but does not get the BT_Audio bridge I used for the stereo. This is most unfortunate, but switching to the oss port should enable me to simply connect the docking station to the 3.5 cable and be done with it.
 
… I assume we have a regression somewhere, since the kernel provided one

Still 13.0-RELEASE-p5, yes?

does not work with a headphone jack, plugging in a headphone does nothing as does setting the default unit. …

Hmm. Rewind to 23rd December:

… I'm left with no audio – nothing from integral loudspeakers or the headset on USB, which is frustrating. …

No response there 😿 so I restarted the OS.

I typically use GTK-Mixer to set the default unit.

Today, without me altering the default – external loudspeakers working with their jack plug to the headphone socket, integral loudspeakers working (but barely audible) when I unplug:

Code:
% cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <IDT 92HD81B1X (Analog 2.0+HP/2.0)> (play/rec) default
pcm2: <IDT 92HD81B1X (Analog)> (play/rec)
pcm3: <USB audio> (rec)
No devices installed from userspace.
%

(I never understood the difference between pcm1 and pcm2.)

I wondered whether I might reproduce no audio through setting the default to something other than IDT 92HD81B1X (Analog 2.0+HP/2.0), then back.

Brief use of ATI R6xx (HDMI) as the default (with sound audible through loudspeakers on a Philips display on DisplayPort) was followed by no problem with default use of IDT 92HD81B1X (Analog 2.0+HP/2.0) (sound audible, again, through external loudspeakers with the headphone socket of the notebook), i.e. not reproducible.



Code:
% pkg info -x audio/oss
pkg: No package(s) matching audio/oss
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #118 main-n251923-4bae154fe8c: Sat Dec 25 08:03:37 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBU
G  amd64 1400045 1400045
%

Crivens please, how might you summarise the difference between sound.ko and audio/oss?
 
The difference is as follows, according to my experience:
- pkg OSS: the switch between back/front works as expected, without any manual interaction.
- pkg OSS: Audio crackles
- onboard OSS: Switching needs manual setting of the sysctl, BEFORE the app is started. Switching a running stream is not possible.
 
Thanks,

back/front

The back and front of what?

I'll be interested in the port if it can somehow automatically switch to a USB headset, when I connect it; and automatically switch away when I disconnect.

- onboard OSS: … Switching a running stream is not possible.

Yep, with Firefox (for example) a switch must be followed by a reload of the tab to be played.
 
No. You create a file "/root/MyKernel", and in that you write

include GENERIC
ident MyKernel
nodevice sound # Generic sound driver (required)
nodevice snd_cmi # CMedia CMI8338/CMI8738
nodevice snd_csa # Crystal Semiconductor CS461x/428x
nodevice snd_emu10kx # Creative SoundBlaster Live! and Audigy
nodevice snd_es137x # Ensoniq AudioPCI ES137x
nodevice snd_hda # Intel High Definition Audio
nodevice snd_ich # Intel, NVidia and other ICH AC'97 Audio
nodevice snd_via8233 # VIA VT8233x Audio

Then you create the symbolic link in /usr/src/sys/amd64/conf/MyKernel to your kernel and proceed then with
make buildkernel KERNCONF=MyKernel
 
Thanks, so the developers' wiki page is outdated, partially invalid?

Or is it (written at the time of FreeBSD 10) an approach that's still valid, but no longer preferred?
 
I don't know what is written there, but the developers are always right ;)

The benefit of this method is, you keep your config when you remove all of /usr/src for any reason. Maybe switching from svn to git, and then this "now, where was my fine tuned config?".
Also, you are now based on the normal GENERIC, so when GENERIC changes, adds new drivers f.e., you get them too. This makes things more smooth when you suddenly find vt./.sc conflicts for example.
 
i tried installing comms/iwmbt-firmware in my
thinkpad 520. it did not work so my buid-in bluetooth must not be intel.
 
Back
Top