*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I wavered between putting this here or in the Virtualization Forum and then decided on here because I think the answer will more likely be in BSD than in VirtualBox.
I use VMs for distro-hopping and learning. Recently, I've been trying to learn something about BSD (I was inspired to do so by Mary at SMLR). Note that this is not an urgent problem, but I am mighty curious.
I have both FreeBSD and PC-BSD in separate VMs and I cannot get audio in FreeBSD. I can get it in PC-BSD; indeed, it works quite nicely and I've been using it to listen to streaming audio just because I can. I tried all the diagnostics in the Free BSD Handbook short of trying to compile my own kernel and have had no luck.
Here are the facts:
VirtualBox v. 5.0.8 r103449 running on Slackware --Current.
Quote:
PC-BSD v. 10.2-Release-p4
FreeBSD v 10.1-RELEASE-P24
Both are up-to-date.
The host settings for both VM's say
Quote:
Host Driver: ALSA Audio Driver
Controller: Intel HD Audio
Note that I have tried all the available virtual controller settings with the FreeBSD VM; the other two options are "ICH AC97" and "SoundBlaster 16."
Here's the output of some diagnostics on PC-BSD.
Code:
# dmesg | grep pcm
pcm0: <Sigmatel STAC9221 (Analog 5.1/2.0)> at nid 12,11,15 and 13 on hdaa0
pcm1: <Sigmatel STAC9221 (Analog)> at nid 10 and 21 on hdaa0
pcm2: <Sigmatel STAC9221 (Rear Digital)> at nid 16 and 17 on hdaa0
Here's some diagnostics on FreeBSD.
Code:
$ dmesg | grep pcm
pcm0: <Sigmatel STAC9221 (Analog 5.1/2.0)> at nid 12,11,15 and 13 on hdaa0
pcm1: <Sigmatel STAC9221 (Analog)> at nid 10 and 21 on hdaa0
pcm2: <Sigmatel STAC9221 (Rear Digital)> at nid 16 and 17 on hdaa0
# cat /dev/sndstat
Installed devices:
pcm0: <Sigmatel STAC9221 (Analog 5.1/2.0)> (play/rec) default
pcm1: <Sigmatel STAC9221 (Analog)> (play/rec)
pcm2: <Sigmatel STAC9221 (Rear Digital)> (play/rec)
I must say that the FreeBSD Handbook is one of the finest pieces of documentation that I've ever RTFM'd (though the section about MP3's and XMMS needs a bit of updating).
I did try kldload snd_driver. It reported that the driver was already loaded or in the kernel.
The output of the mixer command in the FreeBSD VM is
Code:
Mixer vol is currently set to 75:75
Mixer pcm is currently set to 75:75
Mixer speaker is currently set to 75:75
Mixer mic is currently set to 50:50
Mixer rec is currently set to 1:1
Recording source: mic
I should have mentioned this earlier: when I try to play audio in qmmp, the player acts as if it's playing something, but no sound comes out. The little mixer window in the upper left of the main window goes up and down.
Sound comes out of my other VMs, so, if there's host setting somewhere for this particular VM that's the issue, I have no idea what it possibly might be.
Below is snippet from my kernel conf (I configure my kernels by hand). I have snd_hda and snd_ich built in for Intel ICH7 sound, you should have them as modules.
Code:
# Sound support
device sound # Generic sound driver (required)
# device snd_cmi # CMedia CMI8338/CMI8738
# device snd_csa # Crystal Semiconductor CS461x/428x
# device snd_emu10kx # Creative SoundBlaster Live! and Audigy
# device snd_es137x # Ensoniq AudioPCI ES137x
device snd_hda # Intel High Definition Audio
device snd_ich # Intel, NVidia and other ICH AC'97 Audio
# device snd_via8233 # VIA VT8233x Audio
I ran FreeBSD 10.2 on this box for a few days and I was able to get sound support working. However, I'm back to running OpenBSD 5.8 which supports my sound card out of the box with no messing about.
In your OS evaluations you may wish to consider giving OpenBSD 5.8/amd a shot in Virtualbox. I think you might like it. OpenBSD is my favourite BSD compared to FreeBSD and NetBSD.
Emerson, I'll try to track that down tomorrow, but I might not get to it until Monday. I try not to geek out too much when my girlfriend doesn't have to go to work.
hitest, I do want to give OpenBSD a try. I'm having a lot of fun learning about BSDs. I'd kind of like to figure this issue out as part of that learning process.
I promise I'll get around to OpenBSD. I'm not going to stop until I can manually partition a hard drive using BSD lingo.
I promise I'll get around to OpenBSD. I'm not going to stop until I can manually partition a hard drive using BSD lingo.
The OpenBSD man pages and on-line documentation are great sources of information. I purchased Absolute OpenBSD 2nd Edition by Michael Lucas; it is an exceptional book that covers disk partitioning and a myriad of other topics.
I must say I am on completely unfamiliar ground here.
I wandered around my file system and was mildly surprised to find that /proc was empty. I followed the instructions from several pages turned up by a web search and finally found an old post here at LQ to show loaded modules. Here's the output from that post (I added the grep for "snd"). Am I on the right track?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.