CA0106 Soundblaster: no sound.

Hi everyone,

I've installed FreeBSD (GNOME 2) and am very pleased with it. :) I'd very much appreciate some help with this. I've spent hours trying to get sound from a PCI Soundblaster card, but without luck so far. The main problem appears to be that its place is being hogged by the NVIDIA HDMI audio, so I wish to set the Soundblaster as the default.

I've installed FreeBSD 9.1-RELEASE-p3.

I'm trying to get 5.1 (surround sound) working. I got no sound from the default audio setup when I had practically the same result as I have now with OSS4 having compiled the kernel exactly as detailed at www.4front-tech.com/freebsd.html. I installed OSS4 with # pkg_install -r -v oss

Code:
# ossdetect -v
Detected Sound Blaster Audigy LS / Live7.1

There's no problem with hardware; I know the card works perfectly.However,only NVIDIA HDMI audio is shown by
Code:
# cat /dev/sndstat 
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> (play) default
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
dmesg only shows:
Code:
# dmesg | grep 'pcm[0-9]'
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa2
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa3
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa2
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> at nid 5 on hdaa3
But
Code:
$ pciconf -lv
    vendor     = 'nVidia Corporation'
    device     = 'High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
re0@pci0:3:0:0:	class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x02 hdr=0x00
    vendor     = 'Creative Labs'
    device     = 'CA0106 Soundblaster'
    class      = multimedia
    subclass   = audio
There's another onboard audio card but that's disabled in the BIOS. So I'm at a bit of a loss as to how to enable OSS4. Neither ossmix nor ossxmix work:

Code:
$ ossmix
No such file or directory
$ ossxmix
SNDCTL_MIX_NRMIX: Invalid argument
Error: OSS version 4.0 or later is required
.
There seems to be no way at the moment I can do anything with a command like:
Code:
# sysctl hw.snd.default_unit=0
hw.snd.default_unit: 1 -> 0

Short of removing the NCIDIA graphics/audio card, is there some way I can disable the NVIDIA audio? Finally, which do you recommend? The default audio setup for this card or would it be preferable to use the OSS4 driver for 5.1 surround sound?

Thank you for reading.
 
Thank you @adamk for your reply; you are right but I understood that the steps for rebuilding the kernel which I referenced here would result in a kernel without any of the native FreeBSD sound drivers having commented out all the lines under Sound as follows:
Code:
$ cd /usr/src/sys/amd64/conf && tail GENERIC
# 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_uaudio	# USB Audio
#device		snd_via8233	# VIA VT8233x Audio
I did that before proceeding with:
Code:
config GENERIC 
cd ../compile/GENERIC 
make cleandepend && make depend 
make; make install 
reboot
After rebooting I grep'd dmesg only to find:
Code:
$ dmesg |grep -i "Open Sound System" && dmesg |grep osscore
osscore: Open Sound System conflicts with FreeBSD driver
osscore: Please remove sound(4) from kernel or unload it
module_register_init: MOD_LOAD (osscore, 0xffffffff824464e0, 0) error 16
I've tried creating
Code:
# cat /boot/loader.conf
sound_enable="NO"
And also unloading it without success:
Code:
# kldunload sound
kldunload: can't find file sound
Finally,
Code:
# /usr/local/etc/rc.d/oss start
Starting Open Sound System
kldload: can't load /usr/local/lib/oss/modules/osscore.ko: Exec format error
Loading the osscore module failed
I followed the www.4front-tech.com/freebsd steps for rebuilding the kernel exactly but they are evidently incomplete because the sound module still gets loaded and cannot apparently be unloaded using kldunload(8).
 
Last edited by a moderator:
Woodman said:
I did that before proceeding with:
Code:
config GENERIC 
cd ../compile/GENERIC 
make cleandepend && make depend 
make; make install 
reboot
This is a very old way of doing things. It may not work as intended.

Code:
cd /usr/src
make buildkernel
make installkernel

And please, don't change GENERIC. We expect it to be standard. If you're going to make changes make a copy of the GENERIC file and name it MYKERNEL (or something else). Also don't forget to change the ident line.

Code:
make buildkernel KERNCONF=MYKERNEL
make installkernel KERNCONF=MYKERNEL
Or simply add to /etc/make.conf:
Code:
KERNCONF=MYKERNEL
 
Thank you @SirDice for your detailed reply which has solved the problem :); I now have sound. ossmix, ossxmix and osstest, etc., all work and I can play videos in Epiphany, although Firefox crashes so I'll try Lightspark or maybe Flash.

To recapitulate:
Code:
# cd /usr/src/sys/amd64/conf
I first edited GENERIC to remove the # comments to restore it to the default. I then copied it, renaming it MYKERNEL thus:
Code:
root@localhost:/usr/src/sys/amd64/conf # cp GENERIC MYKERNEL
I also changed the ident as you said:
Code:
ident		MYKERNEL
and commented out the sound drivers as before:
Code:
$ cd /usr/src/sys/amd64/conf && tail MYKERNEL
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_uaudio	# USB Audio
#device		snd_via8233	# VIA VT8233x Audio
I don't know if it was necessary but, just in case, I also edited /etc/make.conf, having also consulted the /handbook/kernelconfig-building.html to include:
Code:
WITHOUT_MODULES = sound
.
before continuing with:
Code:
root@localhost:/root # cd /usr/src
root@localhost:/usr/src # make buildkernel KERNCONF=MYKERNEL
followed by:
Code:
# make installkernel KERNCONF=MYKERNEL
And rebooted the new kernel with no problems. There are one or two minor details but I'm very pleased with the result, so thanks again to you and @adamk for your helpful replies. I'll mark this topic solved. :)
 
Last edited by a moderator:
Code:
$ cat /etc/make.conf
# added by use.perl 2013-06-01 18:37:54
PERL_VERSION=5.14.2
# added by user 2013-06-01 1:21:45
#WITHOUT_MODULES = sound 
#changed to
WITHOUT_MODULES=sound
QT4_OPTIONS= CUPS QGTKSTYLE
WITHOUT_NOUVEAU=yes
Thanks for drawing attention to that inaccuracy; everything works fine even though the spaces were inadvertently inserted but next time I rebuild I'll remember that. Must have been a bit drowsy at the time!
 
Yes, I obtain surround sound with the CA0106 Soundblaster with a "Creative Inspire Speaker 5.1" System A500. I get sound from all speakers using ossmix.
 
Back
Top