FreeBSD without audio

Sound in FreeBSD is complex and the page you linked is dated. Several of the most popular sound drivers have already been compiled into the kernel for FreeBSD version 10.* and 11.0. Even if you have an uncommon sound chip, you can load the module using kldload.

FreeBSD commonly sets up several pcm* devices and unless specified, pcm0 is the default. pcm0 is often the hdmi driver for the video card. In order to sort this out, I would start by posting your device information as was done is this thread : Thread 56956
 
Audio is detected and active. But the output is sent to the rear analog output (you can check with cat /dev/sndstat). You may be expecting to hear the audio from the built-in monitor speakers?
 
Stick to one issue at a time. Where do you expect the audio to output? Via the rear connector or via HDMI?
 
If you are using speakers on the rear jack (should be the green one) and your default is pcm0, you should have sound. How to change the default is in section 7.2.3 of the handbook you reference on your first post. If pcm0 does not work, and you want to use the rear speakers, then there is a problem that needs to be sorted out. To go down this path, provide the audio portion of a verbose dmesg. How to do this and what the code looks like are in the manual page for snd_hda(4).

It may also prove useful to also test the front jack by setting the default to pcm1. On a standard desktop, most users would like the rear sound to be muted when plugging headphones into the front. Knowing if the front jack works will help in reassigning the nid pins.
 
Hi, maybe the FreeBSD not be recognizing why my machine in virtualbox installed FreeBSD and I didn't have to configure anything, I was able to play audio and video on virtualbox, using another system
 
3450


3451


3452


in virtualbox works on my desktop not
 

Attachments

  • Captura de tela_2016-11-15_19-35-09.png
    Captura de tela_2016-11-15_19-35-09.png
    242.4 KB · Views: 2,198
  • Captura de tela_2016-11-15_19-47-31.png
    Captura de tela_2016-11-15_19-47-31.png
    30.3 KB · Views: 1,887
  • Captura de tela_2016-11-15_23-00-56.png
    Captura de tela_2016-11-15_23-00-56.png
    24.7 KB · Views: 1,982
Hi,

r0g3r , are you saying that FreeBSD is able to play when booted as a guest OS ? If so and the host itself, whatever OS it is, is capable of playing music, it is because the VirtualBox emulates a supported audio device to FreeBSD and the host OS , which also has its own audio driver, outputs the sound from VirtualBox.

If you want FreeBSD to test and use the audio device as a host OS, everything changes. Those dmesg and sysctl output came from FreeBSD as a host or guest OS ?

One thing you can do: boot FreeBSD - as host OS - and start some program( audio/mpg23 , multimedia/mplayer , audio/sox , whatever ... ) to play a sound file. Take a look at mixer(8) and try to change volume levels from vol, pcm, etc ... also try to change output (rear, front, hdmi , etc...) .

It seems you have the driver loaded - if that dmesg came from FreeBSD as a host OS.

sysctl hw.snd.default_unit=0 will output to pcm0 . =1 to pcm1, and so on. This way you set the output device.

Good work, cheers.
 
actually I have two problems, not reproduces audio or videos from youtube

I know nothing about multimedia. All I can tell you is what I did. I grabbed a FreeBSD 10.3 installation cd and installed. My opinion is that this version comes with sound enabled.


I went to the terminal and typed:
Code:
$ alsamixer

And went thru all the channels unmuting with the letter m.

Went to Firefox Extensions and typed "html 5" and got YouTube All HTML5, this one is for watching videos and movies. Just to make sure, I rebooted.
Went back and chose a video and no problems. Went to youtube.com chose a song and it worked.



On my other box, I installed DragonFlyBSD, no sound at all, but it's a fork from FreeBSD so I went to the link at the top of this thread:

www.freebsd.org/doc/handbook/sound-setup.html

And did the first 3 things: from the terminal:

First,
Code:
# kldload snd_hda
Pressed Enter

Second,
And put this:
Code:
snd_hda_load="YES"

in my /boot/loader.conf

And last, but not least:
Then just to make sure, I loaded in the file /boot/defaults/loader.conf
this driver:
Code:
# kldload snd_driver

#reboot

Everything is working fine in both OSes, what can I tell you, luck of the Irish.
 
Last edited:
Back
Top