# No sound input -- Thinkcentre M81, ALC662 HDA codec



## eee2015 (Mar 9, 2018)

On FreeBSD 11.1, I'm using audio/xmixer to select the sound input, but when trying to record sound, no input device is available.
On this Lenovo Thinkcentre  M81, I see these analog jacks: front has a Headphone output, a Microphone input and a Speaker, rear has the standard coloured connectors -- Line in, Line out, Microphone.

With `hw.snd.default_unit=0` , sound plays to the Headphones, with `hw.snd.default_unit=1` , sound plays to the Speaker. Maybe I should blacklist the HDMI somehow.

I would like to record sound from Line in at least, and output sound to the Headphones, it would be nice if the Speaker would switch on when the Headphones jack is removed, or if I could output to Line out.

I don't now how to edit /boot/device.hints , I did not find any reference on how to provide the hints.

`cat /dev/sndstat`

```
Installed devices:
pcm0: <Realtek ALC662 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC662 (Analog)> (play/rec)
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> (play)
No devices installed from userspace.
```

`sysctl -a | grep hda | uniq`

```
device    snd_hda
dev.pcm.2.%parent: hdaa1
dev.pcm.1.%parent: hdaa0
dev.pcm.0.%parent: hdaa0
dev.hdaa.1.reconfig: 0
dev.hdaa.1.gpo_config:
dev.hdaa.1.gpo_state:
dev.hdaa.1.gpio_config:
dev.hdaa.1.gpio_state:
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid8: vendor widget [DISABLED]
dev.hdaa.1.nid7_original: 0x58560030 as=3 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid7_config: 0x58560030 as=3 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid7: pin: Digital-out (None) [DISABLED]
dev.hdaa.1.nid6_original: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid6_config: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid6: pin: Digital-out (Jack)
dev.hdaa.1.nid5_original: 0x58560010 as=1 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid5_config: 0x58560010 as=1 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid5: pin: Digital-out (None) [DISABLED]
dev.hdaa.1.nid4: audio output [DISABLED]
dev.hdaa.1.nid3: audio output
dev.hdaa.1.nid2: audio output [DISABLED]
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x17aa3077
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Intel Cougar Point Audio Function Group
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config: 0=keep 1=keep
dev.hdaa.0.gpio_state: 0=disabled 1=disabled
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid38: vendor widget [DISABLED]
dev.hdaa.0.nid37: vendor widget [DISABLED]
dev.hdaa.0.nid36: vendor widget [DISABLED]
dev.hdaa.0.nid35: audio mixer
dev.hdaa.0.nid34: audio mixer
dev.hdaa.0.nid33: vendor widget [DISABLED]
dev.hdaa.0.nid32: vendor widget [DISABLED]
dev.hdaa.0.nid31: vendor widget [DISABLED]
dev.hdaa.0.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid30_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid30: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid29_original: 0x4004c601 as=0 seq=1 device=Line-out conn=None ctype=RCA loc=0x00 color=Res.C misc=6
dev.hdaa.0.nid29_config: 0x4004c601 as=0 seq=1 device=Line-out conn=None ctype=RCA loc=0x00 color=Res.C misc=6
dev.hdaa.0.nid29: beep widget
dev.hdaa.0.nid28_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid28_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid28: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid27_original: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.0.nid27_config: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.0.nid27: pin: Headphones (Green Jack)
dev.hdaa.0.nid26_original: 0x0181304f as=4 seq=15 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=0
dev.hdaa.0.nid26_config: 0x0181304f as=4 seq=15 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=0
dev.hdaa.0.nid26: pin: Line-in (Blue Jack)
dev.hdaa.0.nid25_original: 0x02a19850 as=5 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=8
dev.hdaa.0.nid25_config: 0x02a19850 as=5 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=8
dev.hdaa.0.nid25: pin: Mic (Pink Jack)
dev.hdaa.0.nid24_original: 0x01a19840 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=8
dev.hdaa.0.nid24_config: 0x01a19840 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=8
dev.hdaa.0.nid24: pin: Mic (Pink Jack)
dev.hdaa.0.nid23: vendor widget [DISABLED]
dev.hdaa.0.nid22_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid22_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid22: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid21_original: 0x99130120 as=2 seq=0 device=Speaker conn=Fixed ctype=ATAPI loc=Onboard color=Unknown misc=1
dev.hdaa.0.nid21_config: 0x99130120 as=2 seq=0 device=Speaker conn=Fixed ctype=ATAPI loc=Onboard color=Unknown misc=1
dev.hdaa.0.nid21: pin: Speaker (Fixed)
dev.hdaa.0.nid20_original: 0x01014010 as=1 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.0.nid20_config: 0x01014010 as=1 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.0.nid20: pin: Line-out (Green Jack)
dev.hdaa.0.nid19: vendor widget [DISABLED]
dev.hdaa.0.nid18: vendor widget [DISABLED]
dev.hdaa.0.nid17: vendor widget [DISABLED]
dev.hdaa.0.nid16: vendor widget [DISABLED]
dev.hdaa.0.nid15: vendor widget [DISABLED]
dev.hdaa.0.nid14: audio mixer [DISABLED]
dev.hdaa.0.nid13: audio mixer
dev.hdaa.0.nid12: audio mixer
dev.hdaa.0.nid11: audio mixer
dev.hdaa.0.nid10: vendor widget [DISABLED]
dev.hdaa.0.nid9: audio input
dev.hdaa.0.nid8: audio input
dev.hdaa.0.nid7: vendor widget [DISABLED]
dev.hdaa.0.nid6: audio output [DISABLED]
dev.hdaa.0.nid5: vendor widget [DISABLED]
dev.hdaa.0.nid4: audio output [DISABLED]
dev.hdaa.0.nid3: audio output
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x17aa3077
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: Realtek ALC662 Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac0
dev.hdacc.1.%pnpinfo: vendor=0x8086 device=0x2805 revision=0x00 stepping=0x00
dev.hdacc.1.%location: cad=3
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Intel Cougar Point HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10ec device=0x0662 revision=0x01 stepping=0x01
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: Realtek ALC662 HDA CODEC
dev.hdacc.%parent:
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci0
dev.hdac.0.%pnpinfo: vendor=0x8086 device=0x1c20 subvendor=0x17aa subdevice=0x3077 class=0x040300
dev.hdac.0.%location: slot=27 function=0 dbsf=pci0:0:27:0
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: Intel Cougar Point HDA Controller
dev.hdac.%parent:
```


----------



## eee2015 (Mar 10, 2018)

Maybe this could help?

ALC662 block diagram


----------

