Solved Combine front with rear audio output

Hi all.
Does anyone know how to combine rear audio output with front one?

All I can is to switch between them with setting sysctl on hw.snd.default_unit=5.
All manipulation with snd_hda I have done was unsuccessful: could switch also but not to combine.

sysctl dev.hdac.1.pindump=1 && dmesg
Code:
hdaa1: Dumping AFG pins:
hdaa1: nid   0x          as   seq  device       conn  jack    loc        color   misc
hdaa1:     Caps: IN             
hdaa1: 20 01014010 1     0     Line-out      Jack  1/8     Rear       Green   0
hdaa1:     Caps: IN OUT HP EAPD      Sense: 0x80000000 (connected)
hdaa1: 21 01011012  1    2     Line-out      Jack  1/8     Rear       Black   0
hdaa1:     Caps: IN OUT              Sense: 0x00000000 (disconnected)
hdaa1: 22 01016011  1     1    Line-out      Jack  1/8     Rear       Orange  0
hdaa1:     Caps: IN OUT              Sense: 0x00000000 (disconnected)
hdaa1: 23 01012014  1     4    Line-out      Jack  1/8     Rear       Grey    0
hdaa1:     Caps: IN OUT              Sense: 0x00000000 (disconnected)
hdaa1: 24 01a19030  3     0    Mic           Jack  1/8     Rear       Pink    0
hdaa1:     Caps: IN OUT         VREF Sense: 0x00000000 (disconnected)
hdaa1: 25 02a19040  4     0    Mic           Jack  1/8     Front      Pink    0
hdaa1:     Caps: IN OUT HP      VREF Sense: 0x00000000 (disconnected)
hdaa1: 26 0181303f   3     15   Line-in       Jack  1/8     Rear       Blue    0
hdaa1:     Caps: IN OUT        VREF Sense: 0x00000000 (disconnected)
hdaa1: 27 0221402f    2     0    Headphones    Jack  1/8     Front      Green   0
hdaa1:     Caps: IN OUT HP EAPD VREF Sense: 0x00000000 (disconnected)

cat /dev/sndstat
Code:
pcm4: <Realtek ALC892 (Rear Analog 7.1/2.0)> (play/rec)
pcm5: <Realtek ALC892 (Front Analog)> (play/rec) default

So I need to make nid20 and nid27 the same output.

Thank you in advance.
 
snd_hda(4) has a wide range of configuration options. Most users want the front headphone to jack sense and mute the rear speakers. For that to happen, nid27 has to be in the same association as nid20. In the default configuration, nid20 is in association 1 while nid27 is in association 2.
Using pcm4 as your default, I would try to assign nid27 to association 1 with a sequence =15
/boot/device.hints
Code:
hint.hdac.1.nid27.config="as=1 seq=15 device=Headphones"
 
Hi shepper !
Thank you for advice.
Before FreeBSD I used MS Windows, and it's native audio driver with GUI was not able to autodetect connections to front panel. So I managed to set driver to not recognize front panel connections and combine all audio inputs and outputs.
It was not bad, so I decided to set FreeBSD the same manner, because with new OS the autodetection problem remains.
But any manipulations with /boot/device.hints as it is written in man snd_hda was unsuccessful - i could not get sound through my front panel's audio jack.

I remember that there are two plugs goes from my front panel audio bus: AC'97 and HDAudio.
All the time AC'97 plug has being connected. I have connected HDAudio plug and the hinting works now.
Such I solved problem of autodetection front panel jacks.

The hint above will not work as it is expected, it's syntax is not fully correct.
It should be
Code:
hint.hdac.%d.cad%d.nid%d.config
hint.hdac.1.cad0.nid27.config="as=1 seq=15"
or
Code:
hint.hdaa.%d.nid%d.config
hint.hdaa.1.nid27.config="as=1 seq=15"
'device=Headphones' is redundant, it is recognized automatically and does not disappeared after such manipulations.

It would be interesting if someone said me how to combine outputs of rear and front panels.
But autoswitching onto front output when headphones are connected is very convenient and absolutely correct behavior.
So I consider that my problem is solved.

Thank you shepper again. Thanks to your answer I became sure that such configuration should work, I was not.
 
I was not sure if the cad (%d) assignment should be cad0 vs cad1. In order to avoid having to sort through the cad assignment, I chose the equivalent from
snd_hda(4)
hint.hdac.%d.cad%d.nid%d.config Same as hint.hdaa.%d.nid%d.config
I learn more each time I review this topic. Next time I'll paste the syntax directly from the man page.
 
Back
Top