Solved No sound from USB headset but it IS recognized by system

I still have no audio to my headset/microphone so here's a quick recap:

# cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC256 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC256 (Rear Analog Line-out)> (play)
pcm2: <Intel Alder Lake (HDMI/DP 8ch)> (play)
pcm3: <Yealink Yealink UH34> (play/rec)
No devices installed from userspace.

# mixer pcm=1.00
pcm.volume: 0.75:0.75 -> 1.00:1.00
pcm3:mixer: <Yealink Yealink UH34> on uaudio0 (play/rec) (default)
vol = 0.75:0.75 pbk
bass = 0.50:0.50 pbk
treble = 0.50:0.50 pbk
pcm = 1.00:1.00 pbk
rec = 0.75:0.75 pbk
monitor = 0.10:0.10 pbk


mixer vol=1.00
vol.volume: 0.75:0.75 -> 1.00:1.00
pcm3:mixer: <Yealink Yealink UH34> on uaudio0 (play/rec) (default)
vol = 1.00:1.00 pbk
bass = 0.50:0.50 pbk
treble = 0.50:0.50 pbk
pcm = 1.00:1.00 pbk
rec = 0.75:0.75 pbk
monitor = 0.10:0.10 pbk


cat /etc/sysctl.conf
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
security.bsd.see_other_uids=0
security.bsd.see_other_gids=0
security.bsd.see_jail_proc=0
security.bsd.unprivileged_read_msgbuf=0
security.bsd.unprivileged_proc_debug=0
kern.randompid=1
vfs.zfs.vdev.min_auto_ashift=12
# hw.snd.default_unit=3
hw.snd.default_auto=2

This command shows the headset is the default:

# sysctl hw.snd.default_unit
hw.snd.default_unit: 3

Per tyoc213, I tried both of the following commands, and they DO direct the sound to the headset:

beep -D 2000 -d /dev/dsp3

and

cat /dev/random > /dev/dsp3

I'm visiting YouTube videos and/or streaming, online radio stations, but I still have no audio. The pavucontrol GUI shows "Dummy Output" still. It's like the FBSD GUI simply doesn't recognize the headset/microphone. I have evn tried a completely different headset/microphone, and neither one produce sound. Finally, I've tried both LXQT and Fluxbox as my interface, and they yield the same result...no sound!

:-)

Suggestions?

Ed
 
to test sound try

Code:
beep -D 2000 -d /dev/dsp3

or

Code:
cat /dev/random > /dev/dsp3
use CTRL+C to end.
These command DO direct sound to my headset! I'm guessing that's a good sign, but I don't know what to do with these results?

Thank you for your suggestions!

Ed
 
Thank you...how do I change that?
Pulseaudio is a piece of shit that is very hard to control.

Normally hw.snd.default_unit: 3 should have set things up correctly so that you don't have to fiddle with PA. Did you restart the PA demon after the sysctl?
 
Pulseaudio is a piece of shit that is very hard to control.

Normally hw.snd.default_unit: 3 should have set things up correctly so that you don't have to fiddle with PA. Did you restart the PA demon after the sysctl?
Hey, if I don't need Pulseaudio, I'm happy to remove it. I like a "lean" install, which is why I like fluxbox!

I did this: # echo "hw.snd.default_auto=2" >> /etc/sysctl.conf and then rebooted.

I have also added these (Source: https://man.freebsd.org/cgi/man.cgi?query=snd_uaudio&sektion=4&manpath=freebsd-release-ports):

In rc.conf(5):
kld_list="snd_uaudio"

In sysctl.conf(5):
hw.usb.uaudio.buffer_ms
hw.usb.uaudio.default_bits
hw.usb.uaudio.default_channels
hw.usb.uaudio.default_rate
hw.usb.uaudio.handle_hid
hw.usb.uaudio.debug

in my effort to solve my headset/microphone issue, but they haven't changed anything for the better. No worse...no better.

Ed
 
To get firefox talking directly to freebsd's OSS sound layer, you need to set the browser's backend to 'oss', as follows:-

Go to 'about:config' and set the system variable:-
media.cubeb.backend = oss

That will bypass pulseaudio and talk to oss directly.
 
The question here is why the sysctl is not effective in redirecting pulseaudio to dsp3.

Can you do a `fuser /dev/dsp` for all your dsp devices and see whether any of the pids returned correspond to pulseaudio?
 
The question here is why the sysctl is not effective in redirecting pulseaudio to dsp3.

Can you do a `fuser /dev/dsp` for all your dsp devices and see whether any of the pids returned correspond to pulseaudio?
Since you said pulseaudio is a POS, I have reinstalled FBSD from scratch and specifically NOT installed either pulseaudio or pavucontrol packages. I was hoping that might help solve my audio issues, but they're still the same. My sound icon "tooltip" says "Dummy Output".

I'm not sure what to try at this point.

Ed
 
Is it just the browser that is not playing music? Did you try setting the firefox audio backend as I suggested? A more reliable test is to use a command line program like mpg123 or mpv to play an mp3 or m4a file directly, what happens if you try one of those? You already said the beep command works so something is working.
 
Is it just the browser that is not playing music? Did you try setting the firefox audio backend as I suggested? A more reliable test is to use a command line program like mpg123 or mpv to play an mp3 or m4a file directly, what happens if you try one of those? You already said the beep command works so something is working.
Yes, I tried that. I even installed Chromium and Brave to see if it was a browser issue, but it's not. For some unknown reason, the system refuses to see the USB headset/microphone.

Ed
 
It would be good to try a different set of headphones or earbuds just for a sanity check. Maybe the problem is that particular usb headset.
 
The browsers you tried are probably compiled with pulseaudio only. See above for making Firefox play directly to OSS.

As I said, it is strange that the sysctl doesn't make PA use dsp3.

If you want a more professional setup you can run jackd on the audio device and pulseaudio on top of jack. That avoids some of PA's messiness:
Code:
jackd -r -d oss -r 48000 -C /dev/dsp3 -P /dev/dsp3 &
sleep 3
killall pulseaudio
sleep 0.53
pulseaudio -v -L module-jack-sink -L module-jack-source &
 
The browsers you tried are probably compiled with pulseaudio only. See above for making Firefox play directly to OSS.

As I said, it is strange that the sysctl doesn't make PA use dsp3.

If you want a more professional setup you can run jackd on the audio device and pulseaudio on top of jack. That avoids some of PA's messiness:
Code:
jackd -r -d oss -r 48000 -C /dev/dsp3 -P /dev/dsp3 &
sleep 3
pulseaudio -v -L module-jack-sink -L module-jack-source &
Thank you.

In your suggestion, I would need to install pulseaudio, which is easy. Is "jackd" a pkg I would need to install as well?

Forgive my ignorance; is your code example something I need to out into a script and run on startup, or...??

Ed
 
Thank you.

In your suggestion, I would need to install pulseaudio, which is easy. Is "jackd" a pkg I would need to install as well?

Forgive my ignorance; is your code example something I need to out into a script and run on startup, or...??

Ed

The port for jackd is audio/jack. You should also `killall pulseaudio` before starting that PA on top of jack.

Did you do the fuser commands I pointed out above? That might lead to an easier solution.

Yes, I have a script that does this stack.
 
After this fresh install, I currently don't have pulseaudio or pavucontrol installed.

Here's the result of your suggestion:
# fuser /dev/dsp
/dev/dsp:

Thank you,
Ed
 
Ed, for a sanity check. Try downloading a couple of the mp3 test files from here https://truefilesize.com/audio/mp3/
Then install mpg123 (pkg install mpg123) and try playing any of those files using that program, from the command line.
That will bypass any strangeness in things like browser configuration.

So, for example, try
$ mpg123 sample-stereo.mp3

You should hear a repeating, ascending sequence of notes.

To output specifically to oss (freebsd's sound layer) you can say
$ mpg123 -o oss sample-stereo.mp3
 
Thank you.

Here's the output:

root@freebsd:/home/ed # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC256 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <Realtek ALC256 (Rear Analog Line-out)> (play)
pcm2: <Intel Alder Lake (HDMI/DP 8ch)> (play)
pcm3: <Yealink Yealink UH34> (play/rec) default
Installed devices from userspace:
dsp: <virtual_oss device> (play/rec)
dsp.loop: <virtual_oss device> (play/rec)
root@freebsd:/home/ed # fuser /dev/dsp0
/dev/dsp0:
root@freebsd:/home/ed # fuser /dev/dsp1
/dev/dsp1:
root@freebsd:/home/ed # fuser /dev/dsp2
/dev/dsp2:
root@freebsd:/home/ed # fuser /dev/dsp3
/dev/dsp3: 68512w
root@freebsd:/home/ed #

Ed
 
Thank you.

Here's the output:

root@freebsd:/home/ed # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC256 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <Realtek ALC256 (Rear Analog Line-out)> (play)
pcm2: <Intel Alder Lake (HDMI/DP 8ch)> (play)
pcm3: <Yealink Yealink UH34> (play/rec) default
Installed devices from userspace:
dsp: <virtual_oss device> (play/rec)
dsp.loop: <virtual_oss device> (play/rec)
root@freebsd:/home/ed # fuser /dev/dsp0
/dev/dsp0:
root@freebsd:/home/ed # fuser /dev/dsp1
/dev/dsp1:
root@freebsd:/home/ed # fuser /dev/dsp2
/dev/dsp2:
root@freebsd:/home/ed # fuser /dev/dsp3
/dev/dsp3: 68512w
root@freebsd:/home/ed #

Ed

And is 68512 the pid of your pulseaudio?

ps ax | grep 68512
 
Ed, for a sanity check. Try downloading a couple of the mp3 test files from here https://truefilesize.com/audio/mp3/
Then install mpg123 (pkg install mpg123) and try playing any of those files using that program, from the command line.
That will bypass any strangeness in things like browser configuration.

So, for example, try
$ mpg123 sample-stereo.mp3

You should hear a repeating, ascending sequence of notes.
Thank you.

Here's what I get:

root@freebsd:/home/ed # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC256 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <Realtek ALC256 (Rear Analog Line-out)> (play)
pcm2: <Intel Alder Lake (HDMI/DP 8ch)> (play)
pcm3: <Yealink Yealink UH34> (play/rec) default
Installed devices from userspace:
dsp: <virtual_oss device> (play/rec)
dsp.loop: <virtual_oss device> (play/rec)
root@freebsd:/home/ed #

root@freebsd:/home/ed # sysctl hw.snd.default_unit
hw.snd.default_unit: 3
root@freebsd:/home/ed #

ed@freebsd:~/Downloads $ mpg123 sample-5mb.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.33.7; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
[src/libout123/modules/oss.cpen_oss():174] error: Can't open default sound device!
[src/libout123/libout123.c:check_output_module():1167] error: Module 'oss' device open failed.
[src/libout123/libout123.cou123_open():485] error: Found no driver out of [oss] working with device <default>.
main: [src/mpg123.c:check_fatal_output():338] error: out123 error 3: failure loading driver module
ed@freebsd:~/Downloads $

Ed
 
Back
Top