No audio on freeBSD 11.1

I installed FreeBSD today and I have no sound, I can't play youtube, play videos or something like that, when I do dmesg | grep pcm I have the following:
Code:
dmesg | grep pcm
pcm0: <Realtek ALC255 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm1: <Realtek ALC255 (Front Analog Headphones)> at nid 33 on hdaa0
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm0: <Realtek ALC255 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm1: <Realtek ALC255 (Front Analog Headphones)> at nid 33 on hdaa0
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
pcm0: chn_write(): pcm0:virtual:dsp0.vp1: play interrupt timeout, channel dead
pcm0: chn_write(): pcm0:virtual:dsp0.vp2: play interrupt timeout, channel dead
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
Thanks!
 
Last edited by a moderator:
Did you load the driver at boot or in kernel?

Place this in /boot/loader.conf
Code:
sound_load="YES"
snd_hda_load="YES"

then reboot, or on a live system type: kldload snd_driver for a "generic" sound driver.
 
Agreed, the mixer is often too obvious and thus forgotten as a source of such a problem.
 
Thanks for your answers, I did all the above, and I still have not sound, It's a laptop, so I want the sound from my speakers, also if I play a video on Firefox I have something like: Can't playback, try to reboot your system, I can't watch videos on vlc too.
 
The front speakers should be pcm0, based on the information you shared in your first post.

Try running sysctl hw.snd.default_unit=0 to see if the sound come up.

Also, just in case the mixer be muted:

mixer vol 100
mixer pcm 100


EDIT:
However there is a problem related with pcm0:

Code:
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
 
May be a better idea, if you can, try using pcm1, what seem to be the headphone out. If it work we will know the pcm0 issue should be the only one to deal with, however I do not know how to fix that.

sysctl hw.snd.default_unit=1
 
I can't play any audio file, vlc says --:--, gstreamer doesn't play it, I don't know how can I play my music now, and youtube still says: If playback doesn't begin shortly, try restarting your device, I don't know what else can I do
 
It's seems like the sound now it's ok, when I open the wisker menu and press the Backspace key now I have something like beep on headphones and Speaker, but I can't play mp3 and youtube
 
Well I just installed kde to know if I have sound on that DE but now I dont have it on xfce or kde...

Im using firefox and vlc from pkg
 
To sort out your sound problem I strongly advice to stick to the basics at first and leave all audio tools from desktop environments, browsers, youtube and such alone.

What you want for now is to get sound on the console.

Your speakers will most likely not work for now because of this:
dmesg | grep pcm
pcm0: <Realtek ALC255 (Internal Analog)> at nid 20 and 18 on hdaa0
.....
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead

So grab your headphones and insert them into you 3,5mm jack, if you haven't allready done, and set the volume to a medium value like this mixer pcm 40 vol 40.

Please just hold your headphones just near your ears and don't put them on/in your ears as what comes now might still be quite loud even with the volume lowered.
Type cat /dev/random > /dev/dsp.1.0 to produce some noise on your headphones. Hit Ctrl+C to abort that.

If that works, you have a working sound driver at least. For sake of completeness you could try the same with your speakers, but as said, I'm pretty sure it won't work. Try using the above command with dsp0.0 instead, anyway.

When done, tell us what worked and what did not and we'll continue...
 
Use cat /dev/sndstat to find out which output is used by default.
 
Thanks for your answer, when I do:
Code:
cat /dev/random > /dev/dsp.1.0 it says: /dev/dsp.1.0 no operation supported

Installed devices:
pcm0: <Realtek ALC255 (Internal Analog)> (play/rec) default
pcm1: <Realtek ALC255 (Front Analog Headphones)> (play)
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> (play)
No devices installed from userspace.
When I connect the headphones says:
Code:
Installed devices:
pcm0: <Realtek ALC255 (Internal Analog)> (play/rec) 
pcm1: <Realtek ALC255 (Front Analog Headphones)> (play) default
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> (play)
No devices installed from userspace.
 
ok the first one:

FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek ALC255 (Internal Analog)> on hdaa0 (1p:1v/1r:1v) default
snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:4 44100 -> 48000) -> {hardware}
[pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
interrupts 2, overruns 0, feed 4, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, overruns 0, feed 0, hfree 0, sfree 65536 [b:0/0/0|bs:65536/2048/32]
channel flags=0x10000000<VIRTUAL>
{hardware} -> feeder_root(0x00200010) -> feeder_rate(0x00200010 q:4 48000 -> 44100) -> feeder_volume(0x00200010) -> {userland}
pcm1: <Realtek ALC255 (Front Analog Headphones)> on hdaa0 (1p:1v/0r:0v)
snddev flags=0x2e3<SIMPLEX,AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 1, underruns 0, feed 1, ready 0 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:4 44100 -> 48000) -> {hardware}
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> on hdaa1 (1p:1v/0r:0v)
snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
[pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65536/2048/32]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:4 44100 -> 48000) -> {hardware}
No devices installed from userspace.

The second one:

ls -F /dev/|grep dsp
dsp0.0
dsp0.1
dsp1.1
dsp2.1
 
tobik@ thanks for pointing that out. Didn't see that and was a little confused. yes, is was I typo... :confused:

Hei, joachin,
Thanks for posting the output.
Try cat /dev/random > /dev/dsp1.1 with your headphones connected. That should produce noise on your headphones.
Then cat /dev/random > /dev/dsp0.0 (or dsp0.1) should give you noise from your speakers. The errors from your first post don't seem to be there any more. Looks good from /dev/sndstat you postet.

When you hear the noise on your headphones and hopefully on your speakers, too, you could proceed installing a simple audio player like mpg321.
(easier to troubleshout sound with a player that got no brains).
Then try playing something with mpg321 [I]youraudiotrack.mp3[/I]
 
I think your terminal is confused. Could you log out and in again and try again...?
You could try as root as well, even though it's usually not neccessary.
 
I rebooted, logout, did it like user and root and have the same problem, I will going back to linux, thanks for your help guys!
 
Saying "I installed FreeBSD" is a bit vague. My feeling is that there's some assumption that's not declared.
 
Back
Top