# snd_hda + ALC892 microphone problem after upgrading to latest 8-stable (2012/12/18)



## rivan (Dec 20, 2012)

Hello,
few days ago I updated my system to latest 8-stable code (I was kinda tracking 8-stable, but not that frequently, my last update was maybe 6-10 months ago), and since then my microphone is not working; everything else regarding sound works perfectly - there is playback in both speakers and headset (separated), but microphone is not working no matter if I plug it in front or back jack. I searched through sound and snd_hda manual pages but I couldn't find anything which could give me some pointers (from what I can see all associations there look fine). There is also one more weird thing, if I go to volume controls in gnome there microphone seems to be at 0 level, but when I try to increase its volume it is actually increasing igain and I start getting statics in speakers (or headset).

Here is /dev/sndstat with verbose level=4

```
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek ALC892 (Rear Analog)> on hdaa0 kld snd_hda (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 0, underruns 0, feed 0, 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 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
	interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
	channel flags=0x10000000<VIRTUAL>
	{userland} -> feeder_root(0x00000000) -> {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}
pcm1: <Realtek ALC892 (Front Analog)> on hdaa0 kld snd_hda (1p:1v/1r:1v)
	snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
	[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
	interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
	channel flags=0x2100<BUSY,HAS_VCHAN>
	{userland} -> feeder_mixer(0x00200010) -> {hardware}
	pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
	interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
	channel flags=0x10000000<VIRTUAL>
	{userland} -> feeder_root(0x00000000) -> {hardware}
	[pcm1:record:dsp1.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}
	pcm1:record:dsp1.r0[pcm1:virtual:dsp1.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}
pcm2: <Realtek ALC892 (Rear Digital)> on hdaa0 kld snd_hda (1p:1v/1r:1v)
	snddev flags=0x2e6<AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
	[pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
	interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
	channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
	{userland} -> feeder_mixer(0x00200010) -> {hardware}
	pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
	interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
	channel flags=0x10000000<VIRTUAL>
	{userland} -> feeder_root(0x00000000) -> {hardware}
	[pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000005
	interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
	channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
	{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
	pcm2:record:dsp2.r0[pcm2:virtual:dsp2.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}
pcm3: <Realtek ALC892 (Onboard Digital)> on hdaa0 kld snd_hda (1p:1v/0r:0v)
	snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
	[pcm3:play:dsp3.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
	interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
	channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
	{userland} -> feeder_mixer(0x00200010) -> {hardware}
	pcm3:play:dsp3.p0[pcm3:virtual:dsp3.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
	interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
	channel flags=0x10000000<VIRTUAL>
	{userland} -> feeder_root(0x00000000) -> {hardware}
```
File Versions:

```
$FreeBSD: src/sys/dev/sound/pci/hda/hdacc.c,v 1.6.4.5 2012/11/17 11:16:37 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.109.2.31 2012/11/17 11:16:37 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pci/hda/hdaa_patches.c,v 1.2.4.8 2012/11/17 11:18:31 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pci/hda/hdaa.c,v 1.15.2.12 2012/11/17 11:17:36 svnexp Exp $
$FreeBSD: src/sys/dev/sound/isa/sndbuf_dma.c,v 1.4.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/vchan.c,v 1.37.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/sound.c,v 1.123.2.5 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/sndstat.c,v 1.29.2.5 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/mixer.c,v 1.66.2.4 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.114.2.7 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/channel.c,v 1.124.2.6 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/buffer.c,v 1.38.2.5 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/ac97_patch.c,v 1.12.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.75.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_mixer.c,v 1.1.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_matrix.c,v 1.1.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_format.c,v 1.1.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_eq.c,v 1.1.2.3 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_chain.c,v 1.1.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_volume.c,v 1.7.2.2 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder_rate.c,v 1.29.2.3 2012/11/17 10:36:45 svnexp Exp $
$FreeBSD: src/sys/dev/sound/pcm/feeder.c,v 1.45.2.2 2012/11/17 10:36:45 svnexp Exp $
```

Kernel output when kldloading snd_hda with same verbosity is attached with post (it is very long )

I am not sure whether it is important - I was also trying to test microphone using rawrec and rawplay from ports/audio, and while using rawrec I got more messages (when in verbose mode) - also attached

Regards


----------



## wblock@ (Dec 20, 2012)

Posting log files to pastebin.com or similar services makes it easier for people to read them.  No download, decompress, view, delete temp file steps involved.


----------



## rivan (Dec 21, 2012)

wblock@ - Thanks for suggestion 

here is snd_hda verbose output http://pastebin.com/46VvLJKH

and here are messages popping out when trying to record sound from mic http://pastebin.com/ceW56kpR


----------

