# Internal Microphone not working correctly



## anonymous_shyster (Aug 4, 2010)

External microphone works normally when plugged in, however my laptops internal microphone does not work unless set sysctl hw.snd.default_unit=1, the default being 0.  However when I set hw.snd.default_unit to 1, the speakers do not work as mixer only shows up rec and monitor, with recording source set to monitor.  Monitor is not available with hw.snd.default_unit set to 0.
Any help is appreciated, thanks.


----------



## SirDice (Aug 4, 2010)

Please post the output of [cmd=]cat /dev/sndstat[/cmd]


----------



## anonymous_shyster (Aug 4, 2010)

```
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA Realtek ALC272 PCM #0 Analog> (play/rec)
pcm1: <HDA Realtek ALC272 PCM #1 Analog> (rec) default
```


----------



## plamaiziere (Aug 5, 2010)

anonymous_shyster said:
			
		

> ```
> FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
> Installed devices:
> pcm0: <HDA Realtek ALC272 PCM #0 Analog> (play/rec)
> ...



This does not help. See the snd_hda(4) manual page about the association number (as). I think you can try to change the 'AS' of the pin affected to the internal microphone to group it with the external microphone pin in the same pcm device. (see the examples in the manual)

To dump the pin configuration, boot in verbose mode.
HTH.


----------



## anonymous_shyster (Aug 5, 2010)

Got the output from booting in verbose mode, it's quite long so I paste bin'd it.  Not sure where to go from here with it...

http://paste.pocoo.org/show/246389/


----------



## mav@ (Aug 6, 2010)

Add to the /boot/loader.conf line:

```
hint.hdac.0.cad0.nid18.config="as=2 seq=1"
```


----------



## anonymous_shyster (Aug 7, 2010)

Thanks, gave it a try, but alas it did not help...


----------



## mav@ (Aug 7, 2010)

anonymous_shyster said:
			
		

> Thanks, gave it a try, but alas it did not help...



What do you mean by that? Do you still have two pcm devices? You should have one, but on pcm0 record you should have two recording sources: mic and monitor. The last is built-in mic. Choose it with:

```
mixer =rec monitor
```


----------



## anonymous_shyster (Aug 8, 2010)

Ah, I see now, thank you!  I have got monitor on device one, and device two is gone. 

The only problem I'm having is with this:


```
% mixer =rec monitor
mixer: unknown device: /usr/local/bin/rec
```
Any ideas on what is causing that?  Perhaps a bad install of sox?  Rec, it appears, is a symlink to sox...


----------



## anonymous_shyster (Aug 8, 2010)

Completely fixed, thank you everybody for your help.
Seems I needed an escape character in my terminal!

```
% mixer \=rec monitor
```


----------

