Need help: snd_hda pin config Realtek 0x0236 (Lenovo 330S Ideapad)

This: I've searched all over the forum and read a lot of post, man pages and docs, yet still I can't make head or tails on how to configure the pins for the Realtek 0x0236 on my notebook.

- Sound (pcm0) works but is substandard (compared to the way it sounds on the preloaded Windows and a test Linux install I made).
- Headphones (pcm1) work, but are configured on a different pcm, so there is no auto mute .. I have to change the sysctl hw.snd.default_unit every time I need to use them.

Code:
[gnemmi@spook ~]% dmesg | fgrep hdac | sort
hdaa0: <Realtek (0x0236) Audio Function Group> at nid 1 on hdacc0
hdaa1: <Intel (0x280b) Audio Function Group> at nid 1 on hdacc1
hdac0: <Intel Kabylake-LP HDA Controller> mem 0xb1200000-0xb120ffff,0xb1228000-0xb122bfff at device 31.3 on pci0
hdacc0: <Realtek (0x0236) HDA CODEC> at cad 0 on hdac0
hdacc1: <Intel (0x280b) HDA CODEC> at cad 2 on hdac0

this is what I have:

Code:
[gnemmi@spook ~]% cat /dev/sndstat
Installed devices:
pcm0: <Realtek (0x0236) (Analog)> (play/rec) default
pcm1: <Realtek (0x0236) (Right Analog)> (play/rec)
pcm2: <Intel (0x280b) (HDMI/DP 8ch)> (play)

further:

Code:
[gnemmi@spook ~]% dmesg | grep hdaa > default_sound_gpio.txt
[gnemmi@spook ~]% more default_sound_gpio.txt
hdaa0: <Realtek (0x0236) Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek (0x0236) (Analog)> at nid 20 and 18 on hdaa0
pcm1: <Realtek (0x0236) (Right Analog)> at nid 33 and 25 on hdaa0
hdaa1: <Intel (0x280b) Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel (0x280b) (HDMI/DP 8ch)> at nid 3 on hdaa1

this is the default pin dump:

Code:
Jun 16 18:46:00 spook kernel: hdaa0: Dumping AFG pins:
Jun 16 18:46:00 spook kernel: hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
Jun 16 18:46:00 spook kernel: hdaa0: 18 b7a60130 3  0  Mic           Fixed Digital Lid-In     Unknown 1
Jun 16 18:46:00 spook kernel: hdaa0:     Caps: IN                 
Jun 16 18:46:00 spook kernel: hdaa0: 19 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
Jun 16 18:46:00 spook kernel: hdaa0:     Caps: IN                 
Jun 16 18:46:00 spook kernel: hdaa0: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
Jun 16 18:46:00 spook kernel: hdaa0:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
Jun 16 18:46:00 spook kernel: hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: 25 04a11040 4  0  Mic           Jack  1/8     Right      Black   0
Jun 16 18:46:00 spook kernel: hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
Jun 16 18:46:00 spook kernel: hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
Jun 16 18:46:00 spook kernel: hdaa0:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
Jun 16 18:46:00 spook kernel: hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: 33 04211020 2  0  Headphones    Jack  1/8     Right      Black   0
Jun 16 18:46:00 spook kernel: hdaa0:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
Jun 16 18:46:00 spook kernel: hdaa0:  GPIO0: disabled
Jun 16 18:46:00 spook kernel: hdaa0:  GPIO1: disabled
Jun 16 18:46:00 spook kernel: hdaa0:  GPIO2: disabled
Jun 16 18:46:00 spook kernel: hdaa1: Dumping AFG pins:
Jun 16 18:46:00 spook kernel: hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
Jun 16 18:46:00 spook kernel: hdaa1:  3 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
Jun 16 18:46:00 spook kernel: hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
Jun 16 18:46:00 spook kernel: hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0


I know I have to set the pins on my /boot/device.hints but it has been months, I just can't figure out the right way to go and simply: lost it ...

I would greatly appreciate any help on how to improve the quality sound and group the headphones together my default sound output and get automute working.

Thanks for your time and patience!
 
Back
Top