snd_hda & front panel

Greetings. I have Asus M2N-E motherboard and I want to setup sound on the front panel. Unfortunately, there is a problem:

Code:
$ cat /dev/sndstat 
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Analog Devices AD1988B PCM #0 Analog> (play/rec) default
pcm1: <HDA Analog Devices AD1988B PCM #1 Analog> (play)
pcm2: <HDA Analog Devices AD1988B PCM #2 Digital> (play)

Code:
$ mixer 
Mixer vol      is currently set to  60:60
Mixer pcm      is currently set to  99:99
Mixer speaker  is currently set to  66:66
Mixer line     is currently set to  66:66
Mixer mic      is currently set to  66:66
Mixer cd       is currently set to  79:79
Mixer mix      is currently set to  81:81
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to  74:74
Mixer monitor  is currently set to  58:58
Recording source: monitor

Code:
$ mixer -f /dev/mixer1 
Mixer vol      is currently set to  62:62
Mixer pcm      is currently set to  61:61
Mixer mix      is currently set to   0:0
Mixer igain    is currently set to   0:0

If I'm correct, /dev/mixer1 and pcm1 are related to the front panel and there is no recording source available. Sound and microphone works while headset is connected to the rear panel. Sound works via /dev/dsp1.0 when headset is connected to the front panel, but microphone doesn't. I don't know what kind of front panel I have :] There is 2x USB, green sound out and pink sound in ports. I tried to switch between AC'97 and HDA in the BIOS front panel settings, but it didn't help.
 
Crap, it's difficult to be so stupid.
$ mixer =rec mix

In my case this option switched microphone to the front panel and it's working. One more question: why does mixer lose microphone settings after reboot? I can't switch recording source in KDE mixer's GUI, I can do so only using command line tool. But after reboot recording source is being set back to MIC and microphone doesn't work neither in front nor in rear panels. I have to set it to Monitor (rear) or Mix (front) after each reboot. Kinda annoying :]
 
Check /var/db/mixer0-state, it should contain mixer settings from previous boot. The file is populated by /etc/rc.d/mixer.
 
Today I tried to make the front panel work under FreeBSD. Under OpenSolaris everything is OK, but FreeBSD won't stream any sound to the front panel. After some research I found this sysctl oid works for snd_hda driver, for which hw.snd.default_unit will control where sound be directed.
if hw.snd.default_unit=0, sound goes to the rear panel, hw.snd.default_unit=1, sound goest to the front panel. I don't know what is going behind all this, but it works...
 
Back
Top