Intel HDA - Noise and GPIO Configs

Hello everyone.

I have some experience with Linux and now I'm trying FreeBSD for the first time, along with ArchLinux (dual-boot) just in case.

I had trouble configuring my audio settings. At first, my front panel had no output at all. I'm using a headset plugged on it. Google and snd_hda(4) fixed it to some extent. Now I have sound working for output, but something seems wrong with my input settings. There's some huge noise which shouldn't be there, unless I mute igain ( mixer igain 0). By doing so, however, there is no way for me to input sound. igain seems to be related to monitoring sources or something like that. I can't state for sure that's how it's supposed to work, though, since fixing my sound involved tweaking codec pins on /boot/device.hints.

At first, my only option for having sound was to disable everything but my headset. Upon reading snd_hda(4) and skimming through http://www.intel.com/content/www/us/en/standards/high-definition-audio-specification.html, I managed to have enabled again other output pins, such as "Line-out" and internal speakers (I kept this one disabled since I physically removed that "beeper" from my motherboard a couple of months ago). For that, I've set hint.hdaa.1.gpio_config="0x11"

That, however, was practically a guess. I supposed how these pins should more or less behave from those raw specs. And that unmuted my headphones (so I could enable other out pins), but that wasn't my point at all. I was trying to mute whatever is causing that noise. Still, tweak with this GPIO thing seems to be the on right track. But I have no more guesses, and there is no (human-readable) guide on GPIO and pins/widgets.

Any help is appreciated. I used Pastebin for pciconf -lv so my thread would fit into 20000 characters. Please let me know about any other logs or information I should provide.

Hardware (summary):
AMD Phenom II X4 925 (2.8 GHz)
ASUS M4A78LT-M LE
DDR3 8GB RAM
AMD/ATI Radeon 5450 1GB
Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA "Onboard" Audio Device)
Qualcomm Atheros AR8131 Gigabit Ethernet ("Onboard" Ethernet Controller)
Seagate Internal HD 1TB

/boot/device.hints

Code:
hint.fdc.0.at="isa"
hint.fdc.0.port="0x3F0"
hint.fdc.0.irq="6"
hint.fdc.0.drq="2"
hint.fd.0.at="fdc0"
hint.fd.0.drive="0"
hint.fd.1.at="fdc0"
hint.fd.1.drive="1"
hint.atkbdc.0.at="isa"
hint.atkbdc.0.port="0x060"
hint.atkbd.0.at="atkbdc"
hint.atkbd.0.irq="1"
hint.psm.0.at="atkbdc"
hint.psm.0.irq="12"
hint.sc.0.at="isa"
hint.sc.0.flags="0x100"
hint.uart.0.at="isa"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"
hint.uart.1.at="isa"
hint.uart.1.port="0x2F8"
hint.uart.1.irq="3"
hint.ppc.0.at="isa"
hint.ppc.0.irq="7"
hint.atrtc.0.at="isa"
hint.atrtc.0.port="0x70"
hint.atrtc.0.irq="8"
hint.attimer.0.at="isa"
hint.attimer.0.port="0x40"
hint.attimer.0.irq="0"
hint.wbwd.0.at="isa"
hint.acpi_throttle.0.disabled="1"
hint.p4tcc.0.disabled="1"
hint.hdaa.1.gpio_config="0x11"
hint.hdaa.1.nid26.config="as=15 seq=0 device=Mic conn=Jack color=Pink loc=Rear misc=0"
hint.hdaa.1.nid27.config="as=15 seq=0 device=Line-in conn=Jack color=Blue loc=Rear misc=0"
hint.hdaa.1.nid28.config="as=1 seq=1 device=Line-out conn=Jack color=Green loc=Rear misc=0"
hint.hdaa.1.nid29.config="as=1 seq=15 device=Headphones conn=Jack color=Green loc=Front misc=13"
hint.hdaa.1.nid30.config="as=2 seq=14 device=Mic conn=Jack color=Pink loc=Front misc=0"
hint.hdaa.1.nid32.config="as=15 seq=0 conn=None"

$ uname -a

Code:
FreeBSD logos 10.3-RELEASE-p7 FreeBSD 10.3-RELEASE-p7 #0: Thu Aug 11 18:38:15 UTC 2016  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

$ pciconf -lv:

http://pastebin.com/DN9VdgXh

$ dmesg -a | grep -i hda:

Code:
hdac0: <ATI RV810 HDA Controller> mem 0xfeabc000-0xfeabffff irq 19 at device 0.1 on pci1
hdac0: PCI card vendor: 0x174b, device: 0xaa68
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 259 for MSI
hdac0: Caps: OSS 1, ISS 0, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
hdac1: <ATI SB600 HDA Controller> mem 0xfe9f4000-0xfe9f7fff irq 16 at device 20.2 on pci0
hdac1: PCI card vendor: 0x1043, device: 0x840c
hdac1: HDA Driver Revision: 20120126_0002
hdac1: Config options: on=0x00000000 off=0x00000000
hdac1: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
hdacc0: <ATI R6xx HDA CODEC> at cad 0 on hdac0
hdaa0: <ATI R6xx Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x00aa0100
hdaa0: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa0: Original pins configuration:
hdaa0: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa0:  3 18560010 1  0  Digital-out  Jack  Digital 0x18  Unknown 0
hdaa0: Patched pins configuration:
hdaa0: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa0:  3 18560010 1  0  Digital-out  Jack  Digital 0x18  Unknown 0
hdaa0: 1 associations found:
hdaa0: Association 0 (1) out:
hdaa0:  Pin nid=3 seq=0
hdaa0: Tracing association 0 (1)
hdaa0:  Pin 3 traced to DAC 2
hdaa0: Association 0 (1) trace succeeded
hdaa0: Looking for additional DAC for association 0 (1)
hdaa0: Tracing input monitor
hdaa0: Tracing other input monitors
hdaa0: Tracing beeper
hdaa0: Pin sense: nid=3 sense=0x7fffffff (disconnected, ELD valid)
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <ATI R6xx (HDMI)> at nid 3 on hdaa0
hdacc1: <VIA VT1708S_0 HDA CODEC> at cad 0 on hdac1
hdaa1: <VIA VT1708S_0 Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x1043840c
hdaa1: NumGPIO=1 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa1:  GPIO0: disabled
hdaa1: Original pins configuration:
hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 25 410110f0 15 0  Line-out  None  1/8  Rear  Black  0
hdaa1: 26 01a19036 3  6  Mic  Jack  1/8  Rear  Pink  0
hdaa1: 27 0181303e 3  14 Line-in  Jack  1/8  Rear  Blue  0
hdaa1: 28 01014010 1  0  Line-out  Jack  1/8  Rear  Green  0
hdaa1: 29 0221401f 1  15 Headphones  Jack  1/8  Front  Green  0
hdaa1: 30 02a19037 3  7  Mic  Jack  1/8  Front  Pink  0
hdaa1: 31 503701f0 15 0  CD  None  Analog  Internal  Unknown 1
hdaa1: 32 185600f0 15 0  Digital-out  Jack  Digital 0x18  Unknown 0
hdaa1: 33 474411f0 15 0  SPDIF-out  None  RCA  Rear-panel Black  1
hdaa1: 34 410160f0 15 0  Line-out  None  1/8  Rear  Orange  0
hdaa1: 35 410120f0 15 0  Line-out  None  1/8  Rear  Grey  0
hdaa1: Patching pin config nid=26 0x01a19036 -> 0x01a190f0
hdaa1: Patching pin config nid=27 0x0181303e -> 0x018130f0
hdaa1: Patching pin config nid=28 0x01014010 -> 0x01014011
hdaa1: Patching pin config nid=29 0x0221401f -> 0x02214d1f
hdaa1: Patching pin config nid=30 0x02a19037 -> 0x02a1902e
hdaa1: Patching pin config nid=32 0x185600f0 -> 0x585600f0
hdaa1: Patched pins configuration:
hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 25 410110f0 15 0  Line-out  None  1/8  Rear  Black  0 DISA
hdaa1: 26 01a190f0 15 0  Mic  Jack  1/8  Rear  Pink  0
hdaa1: 27 018130f0 15 0  Line-in  Jack  1/8  Rear  Blue  0
hdaa1: 28 01014011 1  1  Line-out  Jack  1/8  Rear  Green  0
hdaa1: 29 02214d1f 1  15 Headphones  Jack  1/8  Front  Green  13
hdaa1: 30 02a1902e 2  14 Mic  Jack  1/8  Front  Pink  0
hdaa1: 31 503701f0 15 0  CD  None  Analog  Internal  Unknown 1 DISA
hdaa1: 32 585600f0 15 0  Digital-out  None  Digital 0x18  Unknown 0 DISA
hdaa1: 33 474411f0 15 0  SPDIF-out  None  RCA  Rear-panel Black  1 DISA
hdaa1: 34 410160f0 15 0  Line-out  None  1/8  Rear  Orange  0 DISA
hdaa1: 35 410120f0 15 0  Line-out  None  1/8  Rear  Grey  0 DISA
hdaa1: 4 associations found:
hdaa1: Association 0 (1) out:
hdaa1:  Pin nid=28 seq=1
hdaa1:  Pin nid=29 seq=15
hdaa1: Association 1 (2) in:
hdaa1:  Pin nid=30 seq=14
hdaa1: Association 2 (15) in:
hdaa1:  Pin nid=26 seq=0
hdaa1: Association 3 (15) in:
hdaa1:  Pin nid=27 seq=0
hdaa1: Tracing association 0 (1)
hdaa1:  Pin 28 traced to DAC 16
hdaa1:  Pin 29 traced to DAC 16 and hpredir 1
hdaa1: Association 0 (1) trace succeeded
hdaa1: Tracing association 1 (2)
hdaa1:  Pin 30 traced to ADC 19
hdaa1: Association 1 (2) trace succeeded
hdaa1: Tracing association 2 (15)
hdaa1:  Unable to trace pin 26 to ADC 20, undo traces
hdaa1: Association 2 (15) trace failed
hdaa1: Tracing association 3 (15)
hdaa1:  Unable to trace pin 27 to ADC 20, undo traces
hdaa1: Association 3 (15) trace failed
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1:  DAC 37 considered equal to DAC 16
hdaa1: Looking for additional ADC for association 1 (2)
hdaa1:  ADC 20 considered equal to ADC 19
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1:  Tracing nid 30 to out
hdaa1:  nid 30 is input monitor
hdaa1: Tracing beeper
hdaa1: GPIO commit
hdaa1:  GPIO0: output state=1
hdaa1: No presence detection support at nid 29
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm1: <VIA VT1708S_0 (Analog 2.0+HP/2.0)> at nid 28,29 and 30 on hdaa1

$ dmesg -a | grep -i snd:

Code:
snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]
feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25

$ sysctl -a | grep -i hda:

Code:
device   snd_hda
dev.pcm.1.%parent: hdaa1
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: 0=set
dev.hdaa.1.gpio_state: 0=output(1)
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid39: audio selector [DISABLED]
dev.hdaa.1.nid38: audio selector [DISABLED]
dev.hdaa.1.nid37: audio output
dev.hdaa.1.nid36: audio output [DISABLED]
dev.hdaa.1.nid35_original: 0x410120f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Grey misc=0
dev.hdaa.1.nid35_config: 0x410120f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Grey misc=0
dev.hdaa.1.nid35: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid34_original: 0x410160f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Orange misc=0
dev.hdaa.1.nid34_config: 0x410160f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Orange misc=0
dev.hdaa.1.nid34: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid33_original: 0x474411f0 as=15 seq=0 device=SPDIF-out conn=None ctype=RCA loc=Rear-panel color=Black misc=1
dev.hdaa.1.nid33_config: 0x474411f0 as=15 seq=0 device=SPDIF-out conn=None ctype=RCA loc=Rear-panel color=Black misc=1
dev.hdaa.1.nid33: pin: SPDIF-out (None) [DISABLED]
dev.hdaa.1.nid32_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid32_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid32: pin: Digital-out (None) [DISABLED]
dev.hdaa.1.nid31_original: 0x503701f0 as=15 seq=0 device=CD conn=None ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid31_config: 0x503701f0 as=15 seq=0 device=CD conn=None ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid31: pin: CD (None) [DISABLED]
dev.hdaa.1.nid30_original: 0x02a19037 as=3 seq=7 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid30_config: 0x02a1902e as=2 seq=14 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid30: pin: Mic (Pink Jack)
dev.hdaa.1.nid29_original: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid29_config: 0x02214d1f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=13
dev.hdaa.1.nid29: pin: Headphones (Green Jack)
dev.hdaa.1.nid28_original: 0x01014010 as=1 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid28_config: 0x01014011 as=1 seq=1 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid28: pin: Line-out (Green Jack)
dev.hdaa.1.nid27_original: 0x0181303e as=3 seq=14 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=0
dev.hdaa.1.nid27_config: 0x018130f0 as=15 seq=0 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=0
dev.hdaa.1.nid27: pin: Line-in (Blue Jack) [DISABLED]
dev.hdaa.1.nid26_original: 0x01a19036 as=3 seq=6 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=0
dev.hdaa.1.nid26_config: 0x01a190f0 as=15 seq=0 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=0
dev.hdaa.1.nid26: pin: Mic (Pink Jack) [DISABLED]
dev.hdaa.1.nid25_original: 0x410110f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid25_config: 0x410110f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid25: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid24: audio selector [DISABLED]
dev.hdaa.1.nid23: audio selector
dev.hdaa.1.nid22: audio mixer
dev.hdaa.1.nid21: audio output [DISABLED]
dev.hdaa.1.nid20: audio input
dev.hdaa.1.nid19: audio input
dev.hdaa.1.nid18: audio output [DISABLED]
dev.hdaa.1.nid17: audio output [DISABLED]
dev.hdaa.1.nid16: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x1043840c
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: VIA VT1708S_0 Audio Function Group
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config:
dev.hdaa.0.gpio_state:
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid3_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3: pin: Digital-out (Jack)
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x00aa0100
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: ATI R6xx Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac1
dev.hdacc.1.%pnpinfo: vendor=0x1106 device=0x0397 revision=0x00 stepping=0x00
dev.hdacc.1.%location: cad=0
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: VIA VT1708S_0 HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x1002 device=0xaa01 revision=0x02 stepping=0x00
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: ATI R6xx HDA CODEC
dev.hdacc.%parent:
dev.hdac.1.polling: 0
dev.hdac.1.pindump: 0
dev.hdac.1.wake: 0
dev.hdac.1.%parent: pci0
dev.hdac.1.%pnpinfo: vendor=0x1002 device=0x4383 subvendor=0x1043 subdevice=0x840c class=0x040300
dev.hdac.1.%location: pci0:0:20:2 handle=\_SB_.PCI0.SBAZ
dev.hdac.1.%driver: hdac
dev.hdac.1.%desc: ATI SB600 HDA Controller
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci1
dev.hdac.0.%pnpinfo: vendor=0x1002 device=0xaa68 subvendor=0x174b subdevice=0xaa68 class=0x040300
dev.hdac.0.%location: pci0:1:0:1
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: ATI RV810 HDA Controller
dev.hdac.%parent:

$ sysctl -a | grep -i snd:

Code:
device   snd_cmi
device   snd_csa
device   snd_emu10kx
device   snd_es137x
device   snd_hda
device   snd_ich
device   snd_via8233
hw.snd.maxautovchans: 16
hw.snd.default_unit: 1
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 1
hw.snd.verbose: 0
hw.snd.vpc_mixer_bypass: 1
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.basename_clone: 1
hw.snd.compat_linux_mmap: 0
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1

Thanks in advance.
 
Have you tried to configure the 2 mics and the 1 line-in into separate associations? It might not mute the noise, but might move it aside.

Juha
 
Have you tried to configure the 2 mics and the 1 line-in into separate associations? It might not mute the noise, but might move it aside.

Juha
Hi, Juha.

Before, I've tried exploring seq values of 14 and 15, which snd_hda(4) states as defining whether input pins on the association should be either multiplexed or muxed. Didn't solve the issue.

Now, I tried your suggestion by setting three different associations 2, 3, and 4, one for each input pin:

Here are the relevant parts of /boot/device.hints:
Code:
hint.hdaa.1.gpio_config="0x11"
hint.hdaa.1.nid26.config="as=4 seq=1 device=Mic conn=Jack color=Pink loc=Rear misc=0"
hint.hdaa.1.nid27.config="as=3 seq=1 device=Line-in conn=Jack color=Blue loc=Rear misc=0"
hint.hdaa.1.nid28.config="as=1 seq=1 device=Line-out conn=Jack color=Green loc=Rear misc=0"
hint.hdaa.1.nid29.config="as=1 seq=15 device=Headphones conn=Jack color=Green loc=Front misc=13"
hint.hdaa.1.nid30.config="as=2 seq=1 device=Mic conn=Jack color=Pink loc=Front misc=0"
hint.hdaa.1.nid32.config="as=15 seq=0 conn=None"

# sysctl -a | grep -i hda
Code:
device  snd_hda
dev.pcm.1.%parent: hdaa1
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: 0=set
dev.hdaa.1.gpio_state: 0=output(1)
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid39: audio selector [DISABLED]
dev.hdaa.1.nid38: audio selector [DISABLED]
dev.hdaa.1.nid37: audio output
dev.hdaa.1.nid36: audio output [DISABLED]
dev.hdaa.1.nid35_original: 0x410120f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Grey misc=0
dev.hdaa.1.nid35_config: 0x410120f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Grey misc=0
dev.hdaa.1.nid35: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid34_original: 0x410160f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Orange misc=0
dev.hdaa.1.nid34_config: 0x410160f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Orange misc=0
dev.hdaa.1.nid34: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid33_original: 0x474411f0 as=15 seq=0 device=SPDIF-out conn=None ctype=RCA loc=Rear-panel color=Black misc=1
dev.hdaa.1.nid33_config: 0x474411f0 as=15 seq=0 device=SPDIF-out conn=None ctype=RCA loc=Rear-panel color=Black misc=1
dev.hdaa.1.nid33: pin: SPDIF-out (None) [DISABLED]
dev.hdaa.1.nid32_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid32_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid32: pin: Digital-out (None) [DISABLED]
dev.hdaa.1.nid31_original: 0x503701f0 as=15 seq=0 device=CD conn=None ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid31_config: 0x503701f0 as=15 seq=0 device=CD conn=None ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid31: pin: CD (None) [DISABLED]
dev.hdaa.1.nid30_original: 0x02a19137 as=3 seq=7 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=1
dev.hdaa.1.nid30_config: 0x02a19021 as=2 seq=1 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid30: pin: Mic (Pink Jack)
dev.hdaa.1.nid29_original: 0x0221411f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=1
dev.hdaa.1.nid29_config: 0x02214d1f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=13
dev.hdaa.1.nid29: pin: Headphones (Green Jack)
dev.hdaa.1.nid28_original: 0x01014010 as=1 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid28_config: 0x01014011 as=1 seq=1 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid28: pin: Line-out (Green Jack)
dev.hdaa.1.nid27_original: 0x0181303e as=3 seq=14 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=0
dev.hdaa.1.nid27_config: 0x01813031 as=3 seq=1 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=0
dev.hdaa.1.nid27: pin: Line-in (Blue Jack) [DISABLED]
dev.hdaa.1.nid26_original: 0x01a19036 as=3 seq=6 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=0
dev.hdaa.1.nid26_config: 0x01a19041 as=4 seq=1 device=Mic conn=Jack ctype=1/8 loc=Rear color=Pink misc=0
dev.hdaa.1.nid26: pin: Mic (Pink Jack) [DISABLED]
dev.hdaa.1.nid25_original: 0x410110f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid25_config: 0x410110f0 as=15 seq=0 device=Line-out conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid25: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid24: audio selector [DISABLED]
dev.hdaa.1.nid23: audio selector
dev.hdaa.1.nid22: audio mixer
dev.hdaa.1.nid21: audio output [DISABLED]
dev.hdaa.1.nid20: audio input
dev.hdaa.1.nid19: audio input
dev.hdaa.1.nid18: audio output [DISABLED]
dev.hdaa.1.nid17: audio output [DISABLED]
dev.hdaa.1.nid16: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x1043840c
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: VIA VT1708S_0 Audio Function Group
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config:
dev.hdaa.0.gpio_state:
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid3_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3: pin: Digital-out (Jack)
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x00aa0100
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: ATI R6xx Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac1
dev.hdacc.1.%pnpinfo: vendor=0x1106 device=0x0397 revision=0x00 stepping=0x00
dev.hdacc.1.%location: cad=0
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: VIA VT1708S_0 HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x1002 device=0xaa01 revision=0x02 stepping=0x00
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: ATI R6xx HDA CODEC
dev.hdacc.%parent:
dev.hdac.1.polling: 0
dev.hdac.1.pindump: 0
dev.hdac.1.wake: 0
dev.hdac.1.%parent: pci0
dev.hdac.1.%pnpinfo: vendor=0x1002 device=0x4383 subvendor=0x1043 subdevice=0x840c class=0x040300
dev.hdac.1.%location: pci0:0:20:2 handle=\_SB_.PCI0.SBAZ
dev.hdac.1.%driver: hdac
dev.hdac.1.%desc: ATI SB600 HDA Controller
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci1
dev.hdac.0.%pnpinfo: vendor=0x1002 device=0xaa68 subvendor=0x174b subdevice=0xaa68 class=0x040300
dev.hdac.0.%location: pci0:1:0:1
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: ATI RV810 HDA Controller
dev.hdac.%parent:

As you can see on lines 39 to 44 above, line-in and rear mic (nid 27 and 26, respectively) remained disabled despite my reassigning from as=15 (which means disabled by default).

As for the results, still doesn't work like it should. After rebooting so these changes could apply, tried recording and the noise was still there. Then, I muted all controls on mixer except mic and rec. Thus, I could record a sample screencast without hearing the noise - though it was there. Pavucontrol was "showing" it in the first place, and checking on mpv was just the same: do have sound (records my voice properly), do have noise.

I decided to upload the sample for clarification, as people can see - and hear - for themselves:
https://www.youtube.com/watch?v=La9_m5XJZng

Also, I noticed the following:
  • On FreeBSD I use sound "normally" as long as output-only. Audio input does "work" If I really need it, but not without the noise.
  • Pavucontrol input sliders affect igain, not mic or rec. Also, the noise is "showed", since there's constant sound "activity" and the bar "pulses" even when there's no sound in my room or on the system. "No sound" other than the noise itself, of course, which silenced to me (by muting) but not internally.
  • The only control that puts sound activity to rest is igain itself. It's useless, though, since I can't record anything this way.
  • To get rid of noise, I mute igain. If I reboot FreeBSD, however, the noise comes back as if igain were restored to some default value. It starts at BIOS memcheck, persists through GRUB and BSD bootloader, then to cease at some point while booting. This (noise being silenced during boot) holds true for both FreeBSD and Archlinux. From this point onwards, It won't return unless igain is unmuted, whether by mixer or through the slider on pavucontrol's input tab.
  • Audio works properly on Archlinux (I can record without noise) with ALSA and Pulseaudio.
  • Rebooting from Arch doesn't make noise to return during BIOS and GRUB/loader. I think controls are reset by the reboot process and the hardware stores different base values depending on how configured for the last time.
  • Settings on Arch are of little use since it's ALSA there and OSS here. I noticed, however, that running pacmd list-sources on Arch shows an entry with Base Volume: 10% and Volume: 46%. Checked on FreeBSD and all sources (and sinks) have their volumes set the same as in mixer, whereas "Base Volume" is 100% for all of them. Searching "Pulseaudio Base Volume" on Google, I found a "how-to" on making PA sound controls or something along these lines. It wasn't useful except for better conceptual understanding (like "Volume" and "Base Volume"). The texteven recommended against providing user-end control over base volume. Whereas there were good reasons for saying so, it clearly doesn't help too much with my issue. Other results (from Google) were just Pulseaudio troubleshootings. Half of them oblivious to my problem, the other half insisting noise is caused by the "wrong" sample rate. I tried $ arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav in Arch, so I could figure out my hardware sample rate (as long as those pages and Archwiki are concerned). It turned out to be 48000Hz, which Pulseaudio assumes as alternate-sample-rate in /usr/local/etc/pulse/daemon.conf. default-sample-rate was a bit lower though: 44100Hz. I swapped them so "default" would match the 48000Hz, as provided by said "troubleshootings" as the solution. It didn't solve my problem, though. The sample rate is "corrected" but the noise remains.

I'll just have to keep looking. Any suggestions are welcome. Thanks again.
 
It looks like the main noise component is around 120 Hz. Crude spectrum attached.

If I turn everything 100%, I get very similar noise from builtin mikes. Fan, 5V noise, room echo, etc.

Juha
 

Attachments

  • noise.png
    noise.png
    10.3 KB · Views: 603
Have very similar problem. Asus AMD 780/600-chipset motherboard with the same VIA's audio codec
VIA VT1708S_0 HDA CODEC.
Still unable to record sound from it. Terrible hiss (but with peak around 8kHz). Muted all that could be muted, used pins to find actual associations... No luck. And rather clear recording in Windows on the same machine...
Even left PR. PR 209312
 
It looks like the main noise component is around 120 Hz. Crude spectrum attached.

If I turn everything 100%, I get very similar noise from builtin mikes. Fan, 5V noise, room echo, etc.

Juha
That suggests my settings are behaving like "all on". After some research past couple of days, I have some more questions:

- Like Juha said, I believe that, partially, the noise is generated by cooler and etc. That would make more sense if I had an internal mic - which is not the case. I'm used seeing these in notebooks mobo, and I'm using a desktop. Besides, there was no such a thing in my mobo's manual. I'm no audio expert either. Could this be some kind of "dummy device" on which my external mic would connect to once plugged?
- More than once, I've read Intel HDA allows re-setting jacks and pins from in to out and vice-versa. Is it possible to make them work as both at the same time (as a bug, of course, since that would be at expense of present issues)?
- Normally, physical interference (as with BUSes leaking data from one to another and vice-versa) would be a possibility. But if that was the case, as physical in nature, it should be the same on Arch;
- What exactly means "everything" here:
If I turn everything 100%, I get very similar noise from builtin mikes.
and how could I (un)set their volume provided they're not on mixer?
- Line-in should gather high stereo input, whereas mic just mono. Is Line-in actually disabled? Noise is there even if I remove all jacks then reboot. Apparently, having a mic plugged or not doesn't make any difference regarding existence of said noise.
- From the looks of HDA specs, data is shared on a single bar until reach its proper destination. Normally, hardware logic should prevent data to be split in the "wrong" ways. Then again, why wouldn't OSS employ (or adapt if not possible) Arch/ALSA workaround for this?
- I know, for a fact, that FreeBSD probes my hardware "upside-down" or something like that (e.g. HDMI audio precedes Azalia here on FreeBSD, whereas on Arch it's done the opposite). Could this be a part of the problem?

Looking at these questions and Juha's previous comment, I suppose this is caused by inadvertently muxing "wrong" channels, maybe under the assumption of them being muted or disabled. Any unset sound device would be reported as disabled, but do this prevent "virtual" channels to be placed? Let's say there is no device plugged in rear blue jack and Line-in seems to be "disabled" according to dmesg output. Normally, there should be a way for streaming line-in. device.hints disable (by reconfig) the line-in jack. I've read PulseAudio, for example, can reassign streams should their sinks had just been crashed. Following that logic, I can't be sure there's no such a thing like a "line-in empty channel", somehow amplified then muxed into record and/or playback channels. That would easily make trouble like Larsen effect, thus generating the noise I'm trying to get rid of.

This, however, is purely hypothesizing on speculations from what I've read and, like I said, I'm no audio expert at all. Furthermore, even if I'm on the right track by chance, question of how to fix it still remains.

I'll keep trying. Any further help would be appreciated.
 
Well, I've already tried to leave only one input, every other numbered pin disabled, but nothing helps to lessen the noise during recording. Should be some tricky GPIOs that is settled by default in the wrong state (at least in FreeBSD).
I even tried to use ports' OSS instead of system one, but don't remember it helped.
 
I even tried to use ports' OSS instead of system one, but don't remember it helped.
I was trying the same when I read your answer. No luck so far:
  • output only;
  • noise is gone;
  • but no input as well (mic ignored, no voice record, no noise, nothing).

$ ossmix
Code:
Selected mixer 0/High Definition Audio 0x11060397
Known controls are:
jack.jack1c.mute ON|OFF (currently OFF)
jack.jack1c.pcm11 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
jack.jack1c.pcm12 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.pcm3 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.pcm2 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.jack6 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.jack5 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.pcm4 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1d.mute ON|OFF (currently OFF)
jack.jack1e.mute ON|OFF (currently OFF)
record.select1.select1 <pcm3|pcm2|jack6|jack5|mix> (currently pcm3)
record.select1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
record.jack6 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.pcm2 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.mute1 ON|OFF (currently OFF)
misc.pcm3 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.pcm4 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.mute2 ON|OFF (currently OFF)
misc.mute3 ON|OFF (currently OFF)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 24.7 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB) ("pulseaudio")
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)

ossmix(1) suggests ossmix vol 50 as a fairly basic example. However:
$ ossmix vol 50 returns
Code:
Bad mixer control name(751) 'vol'

OSS seems to have a problem with FreeBSD default drivers or something. It suggests unloading sound modules, but these are no longer "(un)loadable". Removing them from GENERIC and recompiling as custom kernel worked for me - but only partially, as described above. Also, running compiled OSS from ports returned to Azalia being device #0, preceding HDMI.
 
This VIA's codec was an unpredicted trouble for me, after working from a scratch RealTek ones on my previous Asus motherboards (no pins tuning, no noise during recording...). Almost the same trouble as with M-Audio 2496 PCI card, unluckily also not recording from FreeBSD.

So, I'm thinking of USB-audio card, for bare recording use in FreeBSD. Not sure whether there are good support for them.
 
I'm not sure whether to mark this thread as "SOLVED" or not, but I've upgraded to FreeBSD 11.0 at the time it was released and the problem was fixed.

However, those sticking with 10.3 could still be facing that same issues. Should I mark this thread "solved" in spite of that?
 
Back
Top