No Sound at All

I've reached my next hurdle in setting up my FreeBSD laptop. I can get no sound output at all. I have verified that none of the channels are muted.
When I run
Code:
# cat /dev/random > /dev/dsp
It has no output, and there is no sound coming out of the speakers.

My /boot/loader.conf
Code:
boot_verbose="YES"
sound_enable="YES"
#snd_driver_load="YES"
snd_hda_load="YES"
#snd_ihc_load="YES"
if_bwi_load="YES"
kern.vty=vt

I read about checking the gpio pins, but I'm not sure where to find them or how to modify them if needed.
My /etc/sysctl.conf
Code:
dev.hdac.5.pindump=1
hw.snd.default_auto=1
hw.snd.default_unit=0
hw.snd.verbose=4

Code:
#cat /dev/sndstat
FreeBSD Audio Driver (32bit 2009061500/i386)
Installed devices:
pcm0: <Intel ICH6 (82801FB)> at io 0xb0040800, 0xb0040400 irq 17 bufsz 16384  (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 7182, underruns 0, feed 7182, 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 0x00201000/0x00200010, flags 0x10000000, 0x0000002b
  interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:131072/4096/32]
  channel flags=0x10000000<VIRTUAL>
  {userland} -> feeder_root(0x00201000) -> feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
  [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
  interrupts 0, overruns 0, feed 0, 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 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
  interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
  channel flags=0x10000000<VIRTUAL>
  {hardware} -> feeder_root(0x00000000) -> {userland}

File Versions:
$FreeBSD: releng/10.1/sys/dev/sound/pcm/vchan.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/sound.c 243459 2012-11-23 15:31:00Z mav $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/sndstat.c 248381 2013-03-16 17:57:00Z joel $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/mixer.c 271193 2014-09-06 15:24:48Z mav $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_volume.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_rate.c 209193 2010-06-15 07:06:54Z avg $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_mixer.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_matrix.c 243138 2012-11-16 07:05:57Z mav $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_format.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_eq.c 209193 2010-06-15 07:06:54Z avg $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder_chain.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/feeder.c 227293 2011-11-07 06:44:47Z ed $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/dsp.c 249585 2013-04-17 11:45:15Z gabor $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/channel.c 243138 2012-11-16 07:05:57Z mav $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/buffer.c 243450 2012-11-23 13:43:51Z mav $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/ac97_patch.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pcm/ac97.c 227293 2011-11-07 06:44:47Z ed $
$FreeBSD: releng/10.1/sys/dev/sound/pci/hda/hdacc.c 264961 2014-04-26 01:00:28Z marius $
$FreeBSD: releng/10.1/sys/dev/sound/pci/hda/hdac.c 264961 2014-04-26 01:00:28Z marius $
$FreeBSD: releng/10.1/sys/dev/sound/pci/hda/hdaa_patches.c 269546 2014-08-05 01:03:10Z markj $
$FreeBSD: releng/10.1/sys/dev/sound/pci/hda/hdaa.c 264961 2014-04-26 01:00:28Z marius $
$FreeBSD: releng/10.1/sys/dev/sound/pci/via8233.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pci/ich.c 216518 2010-12-18 14:21:28Z tijl $
$FreeBSD: releng/10.1/sys/dev/sound/pci/es137x.c 254263 2013-08-12 23:30:01Z scottl $
$FreeBSD: releng/10.1/sys/dev/sound/pci/csapcm.c 193640 2009-06-07 19:12:08Z ariff $
$FreeBSD: releng/10.1/sys/dev/sound/pci/csa.c 254263 2013-08-12 23:30:01Z scottl $
$FreeBSD: releng/10.1/sys/dev/sound/pci/cmi.c 254263 2013-08-12 23:30:01Z scottl $
$FreeBSD: releng/10.1/sys/dev/sound/isa/sndbuf_dma.c 193640 2009-06-07 19:12:08Z ariff $

Code:
# dmesg | grep pcm
pcm0: chn_trigger() pcm0:play:dsp0.p0: calling go=0xffffffff , prev=0x00000001
pcm0: chn_trigger() pcm0:virtual:dsp0.vp0: calling go=0xffffffff , prev=0x00000001
pcm0: chn_resizebuf(): PCMDIR_PLAY (hardware) timeout=21 b[4096/2048/2] bs[4096/2048/2] limit=0
pcm0: chn_resizebuf(): PCMDIR_PLAY (virtual) timeout=21 b[0/0/0] bs[131072/4096/32] limit=7526

If I load in my /boot/loader.conf
Code:
snd_driver_load="YES"

It shows two pcm0 devices. Intel ICH6 and Conexant.
Code:
# dmesg | grep pcm
pcm0: <Intel ICH6 (82801FB)> port 0x1c00-0x1cff,0x18c0-0x18ff mem 0xb0040800-0xb00409ff,0xb0040400-0xb00404ff irq 17 at device 30.2 on pci0
pcm0: <Conexant CX20468-21 AC97 Codec (id = 0x43585430)>
pcm0: Codec features reserved, headphone, 18 bit DAC, 18 bit ADC, 5 bit master volume, no 3D Stereo Enhancement
pcm0: Primary codec extended features reserved 1, AMAP, reserved 5
pcm0: ac97 codec dac ready count: 0
pcm0: Mixer "vol":
pcm0: Mixer "pcm":
pcm0: Mixer "speaker":
pcm0: Mixer "line":
pcm0: Mixer "mic":
pcm0: Mixer "cd":
pcm0: Mixer "rec":
pcm0: Mixer "igain":
pcm0: Mixer "ogain":
pcm0: measured ac97 link rate at 48005 Hz, will use 48000 Hz
firmware: 'bwi_v3_pcm4' version 0: 1320 bytes loaded at 0xc780a810
firmware: 'bwi_v3_pcm5' version 0: 1320 bytes loaded at 0xc780ad38

I'm out of ideas getting this configured right. Thank you for your help!
 
In 10.1 the snd_hda(4) code is statically compiled in the kernel - you do not need to load it a second time as a module in /boot/loader.conf.

The make/model of your laptop will be helpful - someone might have already worked out the problem. Also pertinent is the physical layout of the speakers/jacks/mics. Some have front and rear jacks and built in mics.

Once you remove snd_hda(4) from /boot/loader.conf, run

# sysctl dev.hdac.0.pindump=1
followed by
# dmesg
to get more details on your gpio pins.
 
My laptop is a Gateway M250E. It has a left and right speaker, a mic and headphone jack, and a switch to increase, decrease, or mute the volume, all on the front of the machine. I'm running on an XFCE desktop. When I start XFCE, the volume icon shows muted, but I can use the volume switch to lower the volume to its minimum, and then increase it to unmute it.

I removed snd_hda(4), but when I run # sysctl dev.hdac.0.pindump=1 it returns
Code:
sysctl: unknow oid 'dev.hdac.0.pindump': No such file or directory

I ran dmesg | grep pcm again
Code:
# dmesg | grep pcm
pcm0: <Intel ICH6 (82801FB)> port 0x1c00-0x1cff,0x18c0-0x18ff mem 0xb0040800-0xb00409ff,0xb0040400-0xb00404ff irq 17 at device 30.2 on pci0
pcm0: <Conexant CX20468-21 AC97 Codec (id = 0x43585430)>
pcm0: Codec features reserved, headphone, 18 bit DAC, 18 bit ADC, 5 bit master volume, no 3D Stereo Enhancement
pcm0: Primary codec extended features reserved 1, AMAP, reserved 5
pcm0: ac97 codec dac ready count: 0
pcm0: Mixer "vol":
pcm0: Mixer "pcm":
pcm0: Mixer "speaker":
pcm0: Mixer "line":
pcm0: Mixer "mic":
pcm0: Mixer "cd":
pcm0: Mixer "rec":
pcm0: Mixer "igain":
pcm0: Mixer "ogain":
pcm0: measured ac97 link rate at 48005 Hz, will use 48000 Hz
firmware: 'bwi_v3_pcm4' version 0: 1320 bytes loaded at 0xc780a810
firmware: 'bwi_v3_pcm5' version 0: 1320 bytes loaded at 0xc780ad38

It still shows Intel ICH6 and Conexant CX20468-21 both as pcm0. Is this correct?
 
It still shows Intel ICH6 and Conexant CX20468-21 both as pcm0. Is this correct?
Maybe not. snd_ich(4) indicates that later chips (ich6 and ich7) can be wired to use snd_hda. The chip ID would tell the kernel nothing about how it was wired.
DESCRIPTION
The snd_ich bridge driver allows the generic audio driver sound(4) to
attach to Intel ICH AC'97 and compatible audio devices.

Some later chips, like ICH6/ICH7, depending on wiring can instead imple-
ment newer Intel HD Audio specification, which is supported by snd_hda(4)
driver.
.

I'm not sure what to suggest in FreeBSD. In Linux one could blacklist the ich module and in OpenBSD use ukc> to remove the module. You could compile a custom kernel removing snd_ich(4) but that is a long run for a short problem. Perhaps some other forum users can help?

Edit: Another option would be to try the OSS drivers although I cannot state with any confidence that they will work. This also entails a custom kernel as detailed here.
 
I have looked into the OSS and wonder if that may be my issue. When I start the XFCE Mixer, it clearly states "Intel ICH6 (82801FB) (OSS Mixer)". But, I admit, I am a tad intimidated by rebuilding my kernel. I might try another Mixer program.

I booted my laptop into Windows XP(I have the laptop setup to dual boot), It shows Conexant AC-Link Audio or Conexant AMC Audio. I did some searching with those terms for FreeBSD. I stumble upon this thread.
https://lists.freebsd.org/pipermail/freebsd-multimedia/2006-November/005319.html
It's old, but it gave me some ideas.
I edited my /etc/sysctl.conf
Code:
hw.snd.default_auto=1
hw.snd.verbose=4
hw.snd.maxautovchans=10
dev.pcm.0[play|rec].vchanformat=s16le:2.0

I still have no sound, but when I run # cat /dev/random /dev/dsp, it prints out a bunch of gibberish characters to the console.
 
Code:
# mixer
Mixer vol  is currently set to  80:80
Mixer pcm  is currently set to  90:90
Mixer speaker  is currently set to  90:90
Mixer line  is currently set to  75:75
Mixer mic  is currently set to  55:55
Mixer cd  is currently set to  75:75
Mixer rec  is currently set to  63:63
Mixer igain  is currently set to  67:67
Mixer ogain  is currently set to  54:54
Recording source: vol
 
Ok. If you don't mind, lets take a better look at what FreeBSD says about your hardware. Remove or comment out any audio related settings you have added to /boot/loader.conf and/or /etc/sysctl.conf and reboot the laptop. When the laptop reboots, at the boot menu choose "6" for boot options and choose "6" again for verbose boot then press enter. After FreeBSD has fully booted, please login and show the full output of cat /dev/sndstat as well as cat /var/run/dmesg.boot. You may want to copy the output of cat /var/run/dmesg.boot to a website such as www.pastebin.com and post a link to it here as the output will most likely be quite long.
 
Everything looks fine from the output you posted. It should output sound. Unfortunately the snd_ich(4) or sound(4) man pages don't provide any useful configuration options that look relevant here. Just out of curiosity, do you get any sound output out of the headphone jack?
 
Another suggestion that would take a few minutes to look at: Older systems used to provide some sound configuration options in the BIOS. I had an old SiS sound chip that could be set to emulate the old SoundBlaster16 cards.
 
I checked in the BIOS and didn't see anything pertaining to the sound. Seems like it is configured correctly on that level, because the sound works when I boot Windows XP.

No sound out of the headphone jack. I was thinking about installing Audacity to see if I could record any input from the microphone jack.

Would it be feasible to install linux drivers? I had Ubuntu installed on this laptop previously, and sound was fine.
I suppose I could man-up and try to recompile the kernel with the OSS driver.

Thank you guys for your help, I'm fearing I may be out of luck on this, but any other ideas?
 
Right, you can't get a pin dump because your defaulting to the snd_ich(4) driver, which according to your output above, is the correct driver but doesn't support pin configuration. As shepper mentioned above the only thing I know of left to try is compiling a custom kernel preventing the snd_ich(4) sound driver from being statically compiled in and attaching to your sound card at boot. You might then be able to try using the snd_hda(4) driver instead. It may or may not work for your hardware. You could also try asking this question on the mailing list to possibly get the eyes of someone more knowledgeable as well as filing a bug report.
 
Most chips have a vendor ID which can be used to trigger the attachment of the driver. I'm wondering if your chip ID is triggering snd_ich(4) when it is wired as snd_hda(4)? I think the snd_ich(4) device ID are in
/sys/dev/sound/pci/ich.c as
Code:
#define INTEL02801FB  0x266e /*ICH6 needs to be treated as ICH4 */

This ID need to be commented out: /*_____*/
and entered in
/sys/dev/sound/pci/hda/hdac.c

I would try the OSS drivers prior to hacking on the device ID's. The link I gave you above essentially gives you copy/paste commands, it is not that difficult, particularly if you just confine yourself to the sound drivers.

Edit: Although it is not as snappy as FreeBSD, OpenBSD has pretty good laptop support and there is a current livecd that would make checking the sound driver easy.
 
I tried to make a custom kernel without the snd_ich(4), but there were errors when installing the kernel.

I then made a custom kernel without all of the sound modules so I could load OSS. It loads fine, but there is no sound, and I'm not sure how to go about configuring it, if it already isn't.
Code:
root@theUniverse:~ # ossinfo

Version info: OSS 4.2 (b 2009/201507140524) (0x00040100) BSD

Platform: FreeBSD/i386 10.1-RELEASE FreeBSD 10.1-RELEASE #1: Fri Jul 24 08:40:02
CDT 2015  root@theUniverse:/usr/obj/usr/src/sys/newGEN (theUniverse)



Number of audio devices:   1

Number of audio engines:   6

Number of MIDI devices:     0

Number of mixer devices:   1




Device objects
0: oss_ich0 Intel ICH6 (266E) interrupts=0 (13119)



MIDI devices (/dev/midi*)



Mixer devices
0: ICH AC97 Mixer (0x43585430) (Mixer 0 of device object 0)



Audio devices

Intel ICH6 (266E)  /dev/oss/oss_ich0/pcm0  (device index 0)



Nodes

  /dev/dsp -> /dev/oss/oss_ich0/pcm0

  /dev/dsp_in -> /dev/oss/oss_ich0/pcm0

  /dev/dsp_out -> /dev/oss/oss_ich0/pcm0

  /dev/dsp_ac3 -> /dev/oss/oss_ich0/pcm0

  /dev/dsp_mmap -> /dev/oss/oss_ich0/pcm0

  /dev/dsp_multich -> /dev/oss/oss_ich0/pcm0

I tried an OpenBSD live CD, it loaded a driver, I believe an ich driver. I tried to play a short WAV file following their instructions, but there was no output.

Unless I can get OSS working, I'm about drained on this. I might try editing the device ID files, like shepper suggested. They look like C files, do I need to recompile them, if so, how do I go about this? Or can I just reboot?

If that or setting up OSS doesn't give me sound, I think I'm going to abandon ship and go back to Linux for the time being:/
 
I rebuilt the kernel, commenting out the snd_ich(4) module. My sound card wouldn't attach to snd_hda(4). There shows to be no sound devices.

I loaded a kernel without all of the sound modules, and installed OSS from the ports.
When I run soundon
Code:
# soundon
kldload: can't load /usr/local/lib/oss/modules/osscore.ko: module already loaded
or in kernel
Loading the osscore module failed

I followed some of the testing and troubleshooting directions from that Arch Linux link you gave.
I ran osstest. It said it was playing sound and the test completely successfully, but no sound played.

I then ran osstest -lV to get it to continuously output test sound, and I started ossxmix. I messed around with checkboxes and scrollbars, but I could never hear any sound.

Here is the main page for the OSS site. http://www.4front-tech.com/wiki/index.php/Main_Page
I haven't looked at much it's troubleshooting guides yet.

And if this helps, this is the driver that is loading.
http://www.manualpages.de/FreeBSD/FreeBSD-ports-9.0-RELEASE/man7/oss_ich.7.html
 
Do you have anything in /dev/oss? According to the Arch Wiki, if you do you can assign a device to the mixer:
Check that vmix is enabled by running:

$ ossmix -a | grep -i vmix

You should see a line like vmix0-enable ON|OFF (currently ON). If you do not see any lines beginning with vmix, it probably means that vmix has not been attached to your sound device. To attach vmix, issue the command:

$ vmixctl attach device

where device is your sound device, e.g. /dev/oss/oss_envy240/pcm0.

To avoid having to issue this command manually in the future, you can add it to /usr/lib/oss/soundon.user, as suggested here.

If you get a "Device or resource busy" error, you need to add vmix_no_autoattach=1 to /usr/lib/oss/conf/osscore.conf and then reboot.

See which devices are detected by running:

$ ossinfo

You should be able to see your devices listed under Device Objects or Audio Devices. If the device that you want to use is not at the top of one of these sections, you have to edit /usr/lib/oss/etc/installed_drivers and place the driver for your device at the very top. It may be required to do a:

$ soundoff && soundon

If this does not work, comment all drivers listed except the ones for your device.
 
I followed your advice and I dug a little deeper into the troubleshooting procedures, and I found the troublesome setting.

http://www.4front-tech.com/wiki/index.php/Troubleshooting#I_can.27t_hear_any_sound.21
Ich: Some computers have an inverted external amplifier settings, so setting ac97_amplifier to 0 in $OSSLIBDIR/conf/osscore.conf would help. Gateway notebooks (Gateway 4542GP, 4028GZ, 7326GZ) in particular often have this problem.
  • $OSSLIBDIR is almost always /usr/lib/oss, and can be determined exactly by the contents of /etc/oss.conf.

Low and behold, I add to my /usr/local/lib/oss/conf/osscore.conf
Code:
ac97_amplifier=0
I now have sound!!!

But I have one more immediate question. I can watch Youtube videos with sound now, but how do I play CDs? What program do you use and how can I get it set up? I feel like I have tried every CD player package there is. They either don't run at all, or seem to play, but have no sound output.

I'll install Audacity later to make sure my recording works properly.
 
One possible issue is that the user does not have permissions to access the CD drive. You can quickly check this by starting your session as root and trying to play a CD. If that is the case post back, obtaining user access to the CD varies with the version of FreeBSD.

You have a myriad of options for playing CD's and can search the port description at Freshports. If you are running a Desktop Environment, there are also specific players for each DE.
 
That isn't the issue.
I have a program called Grip. I reads the the cd fine, shows me the artist, album name, track names and times. And I can press play, and it reads and plays the cd. But there is no sound output.
The closest I have gotten is Audacious. It plays sound, but skips and clips like nothing I've heard before!
SMplayer doesn't start play or reading the disc when I press play.
I can't figure out xmms or Amarok.
Banshee crashes a second or two after I start it.
I can't start VLC media player as root. XWindows won't work under a normal user, the computer crashes.
 
My guess is that the default sound output for most applications is the default FreeBSD sound system. Some applications set this at compilation, others can change it as a configurations setting. This link gives the specifics for using OSS output for number of audio/multimedia players. The Arch OSS wiki also describes setting the output using mplayer
$ mplayer -ao oss /some/file/to/play.mkv
 
Back
Top