# No sound with Headphones



## archfan (Jul 16, 2016)

Hi

I'm new here. I've made the switch from Linux and finally installed FreeBSD a couple of days ago. It's my first time on FreeBSD.

I must say it's a great system with excellent documentation. I've even had my own ports running in no time a synth is a godsend.

However I'm struggling with configuring my sound card. It just won't output any sound to my headphones. Only the cinch rear output seems to work for some odd reason.

I'm using FreeBSD 11-beta1 (I've also tested this on FreeBSD 10). My soundcard is the Creative X-FI Titanium HD.

Below is some output that might be useful for troubleshooting.

`uname -a`

```
FreeBSD pliskin 11.0-BETA1 FreeBSD 11.0-BETA1 #0: Sat Jul 16 04:35:58 CEST 2016  root@pliskin:/usr/obj/usr/src/sys/GENERIC-NODEBUG-KQUEUEPATCH  amd64
```
`cat /dev/sndstat`

```
Installed devices:
pcm0: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm4: <Creative SB0880 X-Fi (Analog 7.1+HP/2.0)> (play/rec) default
pcm5: <Creative SB0880 X-Fi (Rear Digital)> (play/rec)
pcm6: <Creative SB0880 X-Fi (Front Analog Mic)> (rec)
No devices installed from userspace.
```
`sysctl -a | grep snd`

```
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: 4
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
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.syncdelay: -1
hw.snd.usefrags: 0
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.timeout: 5
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
```

`sysctl -a | grep hda`

```
device   snd_hda
dev.pcm.6.%parent: hdaa1
dev.pcm.5.%parent: hdaa1
dev.pcm.4.%parent: hdaa1
dev.pcm.3.%parent: hdaa0
dev.pcm.2.%parent: hdaa0
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.nid24: vendor widget [DISABLED]
dev.hdaa.1.nid23_original: 0x01c51180 as=8 seq=0 device=SPDIF-in conn=Jack ctype=Optical loc=Rear color=Black misc=1
dev.hdaa.1.nid23_config: 0x01c51180 as=8 seq=0 device=SPDIF-in conn=Jack ctype=Optical loc=Rear color=Black misc=1
dev.hdaa.1.nid23: pin: SPDIF-in (Black Jack)
dev.hdaa.1.nid22_original: 0x41911070 as=7 seq=0 device=AUX conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid22_config: 0x41911070 as=7 seq=0 device=AUX conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid22: pin: AUX (None) [DISABLED]
dev.hdaa.1.nid21_original: 0x41811060 as=6 seq=0 device=Line-in conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid21_config: 0x41811060 as=6 seq=0 device=Line-in conn=None ctype=1/8 loc=Rear color=Black misc=0
dev.hdaa.1.nid21: pin: Line-in (None) [DISABLED]
dev.hdaa.1.nid20_original: 0x02a19050 as=5 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid20_config: 0x02a19050 as=5 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Pink misc=0
dev.hdaa.1.nid20: pin: Mic (Pink Jack)
dev.hdaa.1.nid19_original: 0x01813140 as=4 seq=0 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=1
dev.hdaa.1.nid19_config: 0x01813140 as=4 seq=0 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=1
dev.hdaa.1.nid19: pin: Line-in (Blue Jack)
dev.hdaa.1.nid18_original: 0x01452130 as=3 seq=0 device=SPDIF-out conn=Jack ctype=Optical loc=Rear color=Grey misc=1
dev.hdaa.1.nid18_config: 0x01452130 as=3 seq=0 device=SPDIF-out conn=Jack ctype=Optical loc=Rear color=Grey misc=1
dev.hdaa.1.nid18: pin: SPDIF-out (Grey Jack)
dev.hdaa.1.nid17_original: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid17_config: 0x0221401f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=0
dev.hdaa.1.nid17: pin: Headphones (Green Jack)
dev.hdaa.1.nid16_original: 0x01045114 as=1 seq=4 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid16_config: 0x01045114 as=1 seq=4 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid16: pin: Line-out (Red Jack)
dev.hdaa.1.nid15_original: 0x01045112 as=1 seq=2 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid15_config: 0x01045112 as=1 seq=2 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid15: pin: Line-out (Red Jack)
dev.hdaa.1.nid14_original: 0x01045111 as=1 seq=1 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid14_config: 0x01045111 as=1 seq=1 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid14: pin: Line-out (Red Jack)
dev.hdaa.1.nid13_original: 0x01045110 as=1 seq=0 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid13_config: 0x01045110 as=1 seq=0 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
dev.hdaa.1.nid13: pin: Line-out (Red Jack)
dev.hdaa.1.nid12: audio input
dev.hdaa.1.nid11: audio input [DISABLED]
dev.hdaa.1.nid10: audio input [DISABLED]
dev.hdaa.1.nid9: audio input
dev.hdaa.1.nid8: audio input
dev.hdaa.1.nid7: audio output
dev.hdaa.1.nid6: vendor widget [DISABLED]
dev.hdaa.1.nid5: audio output
dev.hdaa.1.nid4: audio output
dev.hdaa.1.nid3: audio output
dev.hdaa.1.nid2: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x11020043
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Creative SB0880 X-Fi 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.nid13: audio output
dev.hdaa.0.nid12: audio output
dev.hdaa.0.nid11: audio output
dev.hdaa.0.nid10: audio output
dev.hdaa.0.nid9_original: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid9_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid9: pin: Digital-out (None) [DISABLED]
dev.hdaa.0.nid8_original: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid8_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid8: pin: Digital-out (None) [DISABLED]
dev.hdaa.0.nid7_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7: pin: Digital-out (Jack)
dev.hdaa.0.nid6_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6: pin: Digital-out (Jack)
dev.hdaa.0.nid5_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid5_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid5: pin: Digital-out (Jack)
dev.hdaa.0.nid4_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4: pin: Digital-out (Jack)
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x10de119d
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: NVIDIA (0x0083) Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac1
dev.hdacc.1.%pnpinfo: vendor=0x1102 device=0x000d revision=0x00 stepping=0x00
dev.hdacc.1.%location: cad=1
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Creative SB0880 X-Fi HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10de device=0x0083 revision=0x01 stepping=0x00
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: NVIDIA (0x0083) HDA CODEC
dev.hdacc.%parent:
dev.hdac.1.polling: 0
dev.hdac.1.pindump: 0
dev.hdac.1.wake: 0
dev.hdac.1.%parent: pci5
dev.hdac.1.%pnpinfo: vendor=0x1102 device=0x000b subvendor=0x1102 subdevice=0x0062 class=0x040300
dev.hdac.1.%location: slot=0 function=0 dbsf=pci0:5:0:0 handle=\_SB_.PCI0.RP05.PXSX
dev.hdac.1.%driver: hdac
dev.hdac.1.%desc: Generic (0x000b1102) HDA Controller
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci1
dev.hdac.0.%pnpinfo: vendor=0x10de device=0x10f0 subvendor=0x10de subdevice=0x119d class=0x040300
dev.hdac.0.%location: slot=0 function=1 dbsf=pci0:1:0:1
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: NVIDIA (0x10f0) HDA Controller
dev.hdac.%parent:
```
`dmesg | grep hdaa1`

```
hdaa1: <Creative SB0880 X-Fi Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x11020043
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 13 01045110 1  0  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 14 01045111 1  1  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 15 01045112 1  2  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 16 01045114 1  4  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 17 0221401f 1  15 Headphones  Jack  1/8  Front  Green  0
hdaa1: 18 01452130 3  0  SPDIF-out  Jack  Optical Rear  Grey  1
hdaa1: 19 01813140 4  0  Line-in  Jack  1/8  Rear  Blue  1
hdaa1: 20 02a19050 5  0  Mic  Jack  1/8  Front  Pink  0
hdaa1: 21 41811060 6  0  Line-in  None  1/8  Rear  Black  0
hdaa1: 22 41911070 7  0  AUX  None  1/8  Rear  Black  0
hdaa1: 23 01c51180 8  0  SPDIF-in  Jack  Optical Rear  Black  1
hdaa1: Patched pins configuration:
hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 13 01045110 1  0  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 14 01045111 1  1  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 15 01045112 1  2  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 16 01045114 1  4  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 17 0221401f 1  15 Headphones  Jack  1/8  Front  Green  0
hdaa1: 18 01452130 3  0  SPDIF-out  Jack  Optical Rear  Grey  1
hdaa1: 19 01813140 4  0  Line-in  Jack  1/8  Rear  Blue  1
hdaa1: 20 02a19050 5  0  Mic  Jack  1/8  Front  Pink  0
hdaa1: 21 41811060 6  0  Line-in  None  1/8  Rear  Black  0 DISA
hdaa1: 22 41911070 7  0  AUX  None  1/8  Rear  Black  0 DISA
hdaa1: 23 01c51180 8  0  SPDIF-in  Jack  Optical Rear  Black  1
hdaa1: 5 associations found:
hdaa1: Association 0 (1) out:
hdaa1:  Pin nid=13 seq=0
hdaa1:  Pin nid=14 seq=1
hdaa1:  Pin nid=15 seq=2
hdaa1:  Pin nid=16 seq=4
hdaa1:  Pin nid=17 seq=15
hdaa1: Association 1 (3) out:
hdaa1:  Pin nid=18 seq=0
hdaa1: Association 2 (4) in:
hdaa1:  Pin nid=19 seq=0
hdaa1: Association 3 (5) in:
hdaa1:  Pin nid=20 seq=0
hdaa1: Association 4 (8) in:
hdaa1:  Pin nid=23 seq=0
hdaa1: Tracing association 0 (1)
hdaa1:  Pin 13 traced to DAC 2
hdaa1:  Pin 14 traced to DAC 3
hdaa1:  Pin 15 traced to DAC 4
hdaa1:  Pin 16 traced to DAC 5
hdaa1:  Pin 17 traced to DAC 2 and hpredir 0
hdaa1: Association 0 (1) trace succeeded
hdaa1: Tracing association 1 (3)
hdaa1:  Pin 18 traced to DAC 7
hdaa1: Association 1 (3) trace succeeded
hdaa1: Tracing association 2 (4)
hdaa1:  Pin 19 traced to ADC 8
hdaa1: Association 2 (4) trace succeeded
hdaa1: Tracing association 3 (5)
hdaa1:  Pin 20 traced to ADC 9
hdaa1: Association 3 (5) trace succeeded
hdaa1: Tracing association 4 (8)
hdaa1:  Unable to trace pin 23 to ADC 10, undo traces
hdaa1:  Unable to trace pin 23 to ADC 11, undo traces
hdaa1:  Pin 23 traced to ADC 12
hdaa1: Association 4 (8) trace succeeded
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1: Looking for additional DAC for association 1 (3)
hdaa1: Looking for additional ADC for association 2 (4)
hdaa1: Looking for additional ADC for association 3 (5)
hdaa1: Looking for additional ADC for association 4 (8)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1:  Tracing nid 19 to out
hdaa1:  Tracing nid 20 to out
hdaa1:  Tracing nid 23 to out
hdaa1: Tracing beeper
hdaa1: Headphones redirection for association 0 nid=17 using unsolicited responses.
hdaa1: Redirect output to: main
hdaa1: Pin sense: nid=20 sense=0xffffffff (connected)
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm4: <Creative SB0880 X-Fi (Analog 7.1+HP/2.0)> at nid 13,14,15,16,17 and 19 on hdaa1
pcm5: <Creative SB0880 X-Fi (Rear Digital)> at nid 18 and 23 on hdaa1
pcm6: <Creative SB0880 X-Fi (Front Analog Mic)> at nid 20 on hdaa1
random: harvesting attach, 8 bytes (4 bits) from hdaa1
```

I really appreciate any help you can provide.


----------



## jrm@ (Jul 16, 2016)

Have you tried different values of hw.snd.default_unit?
For example, `# sysctl hw.snd.default_unit=0`, `# sysctl hw.snd.default_unit=1`, etc.  After making the change you may have to restart the application you are playing sound with.

Have you tried `# sysctl hw.snd.default_auto=1`?


----------



## jrm@ (Jul 16, 2016)

I was looking to see if there were any device hints others had tried for this card and I came across this bug report.

At one point I had to use a hint (hint.hdac.0.cad0.nid21.config="as=1 seq=15") in /boot/loader.conf before I could get sound out of the headphone jack.  The card was different, but maybe a similar hint will work for you.


----------



## archfan (Jul 16, 2016)

Thanks for your help.

I've  executed `sysctl hw.snd.default_auto=1` and restarted all applications but unfortunately this doesn't change anything.

As suggested I've also tested different values for `sysctl hw.snd.default_unit=` but again no dice.



> I was looking to see if there were any device hints others had tried for this card and I came across this bug report.



Yup. This soundcard has strange some issues. Had trouble on Linux as well but at least the headphone jacks were working. I've tested the only working output prior to testing the headphone jack.

---

At least the kernel seems to recognize it when I plug some headphones in:

```
pcm1: Playback channel set is: Front Left, Front Right,
pcm1: Playback channel matrix is: 2.0 (connected)
###################################
pcm4: Redirect output to: headphones
pcm4: Playback channel set is: Front Left, Front Right, Front Center, Low Frequency Effects, Back Left, Back Right, Side Left, Side Right,
pcm4: Playback channel matrix is: 7.1 (connected)
```


----------



## shepper (Jul 17, 2016)

In FreeBSD you can change the grouping of various jacks.  The default groupings tend to be based on the physical location of the jacks: video card (In your case nVidia ), front and back.  It is possible to regroup the jacks such that it fits your preferred usage.

An example would be to group the rear output (speakers) with the front headphone jack.  This would allow the front headphone jack to mute the rear speakers when the headphone is plugged in.  Groupings are either input or output - not both.

The snd_hda(4) page took several readings for me to understand but it does contain the information you need to reassign groupings.

If you search these forums you can also find some threads where this was done.


----------



## archfan (Jul 17, 2016)

Thanks. This seems like useful stuff.

I think I'm getting closer here.

/boot/device.hints

```
hint.hdac.1.cad1.nid13.config="as=2 seq=0 device=Speaker"
hint.hdac.1.cad1.nid17.config="as=2 seq=15 device=Headphones"
```

I changed the association on both ports from 1 to 2. Interestingly the rear output still works and the kernel seems to have accepted the change as seen below:

```
hdaa1: Patching pin config nid=13 0x01045110 -> 0x01145120
hdaa1: Patching pin config nid=17 0x0221401f -> 0x0221402f

hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 13 01145120 2  0  Speaker  Jack  RCA  Rear  Red  1
hdaa1: 14 01045111 1  1  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 15 01045112 1  2  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 16 01045114 1  4  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 17 0221402f 2  15 Headphones  Jack  1/8  Front  Green  0
hdaa1: 18 01452130 3  0  SPDIF-out  Jack  Optical Rear  Grey  1
hdaa1: 19 01813140 4  0  Line-in  Jack  1/8  Rear  Blue  1
hdaa1: 20 02a19050 5  0  Mic  Jack  1/8  Front  Pink  0
hdaa1: 21 41811060 6  0  Line-in  None  1/8  Rear  Black  0 DISA
hdaa1: 22 41911070 7  0  AUX  None  1/8  Rear  Black  0 DISA
hdaa1: 23 01c51180 8  0  SPDIF-in  Jack  Optical Rear  Black  1
```

What's also interesting is that it now displays the correct channel matrix (stereo). It was incorrectly seen as 7.1 before.

```
pcm4: Redirect output to: headphones
pcm4: Playback channel set is: Front Left, Front Right,
pcm4: Playback channel matrix is: 2.0 (connected)
```

Unfortunately the front outputs are still dead as a doornail.


----------



## shepper (Jul 17, 2016)

The initial grouping for nid13 was as=1 and I would be inclined to leave it there and just move nid17 to as=1.


archfan said:


> dev.hdaa.1.nid13_original: 0x01045110 as=1 seq=0 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1
> dev.hdaa.1.nid13_config: 0x01045110 as=1 seq=0 device=Line-out conn=Jack ctype=RCA loc=Rear color=Red misc=1


/dev/device/hints

```
hint.hdac.1.cad1.nid17.config="as=1 seq=15 device=Headphones"
```


----------



## archfan (Jul 17, 2016)

But they were both initially on as=1 and that combination didn't work either.

I've moved nid 14-17 to as=2. Nid 13 and 17 are the only outputs that share as=1. Doesn't change anything but the rear output still works. Ha, this is like playing sudoku.

/boot/devices.hints

```
hint.hdac.1.cad1.nid14.config="as=2 seq=1"
hint.hdac.1.cad1.nid15.config="as=2 seq=2"
hint.hdac.1.cad1.nid16.config="as=2 seq=4"
hint.hdac.1.cad1.nid17.config="as=1 seq=15 device=Headphones"
```

`dmesg` output

```
hdaa1: Patched pins configuration:
hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 13 01045110 1  0  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 14 01045121 2  1  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 15 01045122 2  2  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 16 01045124 2  4  Line-out  Jack  RCA  Rear  Red  1
hdaa1: 17 0221401f 1  15 Headphones  Jack  1/8  Front  Green  0
hdaa1: 18 01452130 3  0  SPDIF-out  Jack  Optical Rear  Grey  1
hdaa1: 19 01813140 4  0  Line-in  Jack  1/8  Rear  Blue  1
hdaa1: 20 02a19050 5  0  Mic  Jack  1/8  Front  Pink  0
hdaa1: 21 41811060 6  0  Line-in  None  1/8  Rear  Black  0 DISA
hdaa1: 22 41911070 7  0  AUX  None  1/8  Rear  Black  0 DISA
hdaa1: 23 01c51180 8  0  SPDIF-in  Jack  Optical Rear  Black  1
```


----------



## shepper (Jul 17, 2016)

archfan said:


> Ha, this is like playing sudoku.



That is a good analogy.

There are two aspect that are not clear.

Have you set pcm4 to be your default sound device as described in the FreeBSD Handbook 7.2.3?

Secondly, your dmesg is showing nids 13 -> 16 as being RCA jacks.  Classically, the jacks are 1/8.

I would set the default sound unit to 4, just like in the handbook, remove the snd device hints and see if verbose dmesg is any clearer.


----------



## archfan (Jul 17, 2016)

> Have you set pcm4 to be your default sound device as described in the FreeBSD Handbook 7.2.3?



Yes, that's the first thing I've tried which didn't change a thing unfortunately.



> Secondly, your dmesg is showing nids 13 -> 16 as being RCA jacks. Classically, the jacks are 1/8.



Yes, that should be correct. I have 4 RCA jacks and two 1/8 jacks on my soundcard. Although only two of them are line-out. The remaining ones are spdif-in/out.

These are the rear outputs:
Red - RCA - optical out
white - RCA - optical in
Red - RCA - stereo out
White - RCA - stereo out
Gold - 1/8 - headphone out
Gold - 1/8 - microphone jack


----------



## Lars Skogstad (Jul 18, 2016)

Had the same problem didnt manage to fix it.

Just wondered something,

hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 13 01045110 1  0  Line-out  Jack  RCA  Rear  Red  1

What is the "misc" for ? Noticing that all your active channels has 1 but the one you want to activate has 0 ?

- Lars


----------



## archfan (Jul 18, 2016)

Good question. snd_hda(4) says this:



			
				snd_hda(4) said:
			
		

> misc    Misc bits.   Can be specified as a number from 0 to 15.
> Bit   0 has a   special   meaning.  When set it means that jack
> detection is not implemented in hardware.



I've set it to 1 for further testing. No change.


----------



## Lars Skogstad (Jul 19, 2016)

Would be nice if you find a solution


----------



## archfan (Jul 19, 2016)

Do you have the same soundcard?
I will keep this thread updated but don't expect a working solution soon as it will probably involve another 40 reboots til we get there.


----------



## archfan (Jul 19, 2016)

Interesting. Even when I disable all outputs except the front headphone jack leaving FreeBSD no choice as to output it to the front jack I still get no sound.


```
hint.hdac.1.cad1.nid13.config="conn=None"
hint.hdac.1.cad1.nid14.config="conn=None"
hint.hdac.1.cad1.nid15.config="conn=None"
hint.hdac.1.cad1.nid16.config="conn=None"
#hint.hdac.1.cad1.nid17.config="conn=None"
hint.hdac.1.cad1.nid18.config="conn=None"
hint.hdac.1.cad1.nid19.config="conn=None"
hint.hdac.1.cad1.nid20.config="conn=None"
hint.hdac.1.cad1.nid21.config="conn=None"
hint.hdac.1.cad1.nid22.config="conn=None"
hint.hdac.1.cad1.nid23.config="conn=None"
# valid options: as, seq, device, conn, misc
#########################
hdaa1: nid  0x  as seq device  conn  jack  loc  color  misc
hdaa1: 13 41045110 1  0  Line-out  None  RCA  Rear  Red  1 DISA
hdaa1: 14 41045111 1  1  Line-out  None  RCA  Rear  Red  1 DISA
hdaa1: 15 41045112 1  2  Line-out  None  RCA  Rear  Red  1 DISA
hdaa1: 16 41045114 1  4  Line-out  None  RCA  Rear  Red  1 DISA
hdaa1: 17 0221401f 1  15 Headphones  Jack  1/8  Front  Green  0
hdaa1: 18 41452130 3  0  SPDIF-out  None  Optical Rear  Grey  1 DISA
hdaa1: 19 41813140 4  0  Line-in  None  1/8  Rear  Blue  1 DISA
hdaa1: 20 42a19050 5  0  Mic  None  1/8  Front  Pink  0 DISA
hdaa1: 21 41811060 6  0  Line-in  None  1/8  Rear  Black  0 DISA
hdaa1: 22 7fffffff 15 15 Other  None  Other  0x3f  Other  15 DISA
hdaa1: 23 41c51180 8  0  SPDIF-in  None  Optical Rear  Black  1 DISA
```

Well at least I can confirm now that nid13 is indeed the only working rear analog output.


----------



## Lars Skogstad (Jul 19, 2016)

Maybe its physically broken


----------



## archfan (Jul 19, 2016)

Nope. The card itself is fine. I've gone through the hoops to test the front jack on Windows and Arch Linux - it works there.


----------



## shepper (Jul 19, 2016)

archfan said:


> nteresting. Even when I disable all outputs except the front headphone jack leaving FreeBSD no choice as to output it to the front jack I still get no sound.



A final thought: Is it possible that the front headphone jack is connected to the nVidia card?  You could try pcm0, pcm1 and pcm2 as the default sound device to check or open the case and trace the front jack wiring back to the sound card, motherboard or video card.


----------



## archfan (Jul 19, 2016)

The front headphone jack is connected to the Creative X-FI card. The nVidia card has no such header.


----------



## archfan (Jul 22, 2016)

Meh. I give up after far too many reboots and dozens of hours of testing.

Why is there no way to change "hint.hdaX.y.cadZ.nidN.config" without rebooting?


----------



## kpa (Jul 22, 2016)

archfan said:


> Meh. I give up after far too many reboots and dozens of hours of testing.
> 
> Why is there no way to change "hint.hdaX.y.cadZ.nidN.config" without rebooting?



The device hints are only read once at kernel startup (actually the loader(8) reads them and loads them to kenv(1) for the kernel), changing them does nothing unless you reboot. There might be a way to reprogram the HDA soundchips without rebooting but I'm not aware of how.


----------



## Snurg (Aug 21, 2016)

I first planned to buy a X-Fi card, but I decided against and purchased another card after reading around a bit.

It is strongly advisable to read the sound card driver man pages *before* choosing a sound card:


```
The snd_emu10kx driver does not support the following sound cards
     (although they are named similar to some supported ones):

     +o     All Creative X-Fi series sound cards.
```


----------

