[Solved] Dual alc1220 - Front Headphone audio plays through rear

I've had this issue for almost a year and done many hours of searching without success. the AX370 Gaming-5 has dual alc1220 audio.

Both of these detect correctly in hdajackretask, but when I plug my headphones in the front audio port, audio just continues playing out the speakers. I can see in pavucontrol it detects and switches to 'headphone' when I plug in headphones, but I'm not having any luck getting audio actually playing through the headphones.

Re: [Solved] Dual alc1220 - Front Headphone audio plays through rear

well are you sure that that sink input is actually the correct index? You have to use the sink index as printed by

pacmd list-sink-inputs

for any given audio stream (and as it's incremented for each new stream it will only be "0" for the very first attempt at playing something, therefore quite unlikely). Also before you continue pursuing this manual alsa sink loading raindance, which kernel are you using? If you are on LTS it has some known problems with this codec that shouldn't be present anymore with the 4.18 kernel. FWIW you might also want to use pavucontrol as it gives you a GUI to help you grok the workings of pulse if you aren't yet familiar with it.

Also, you might have some global trigger to switch behaviour, what's the output of

With the headphones plugged in, switching port under "output devices" in pavucontrol only does what it did before: alternate playing through the speakers at different levels of volume. I can see that it is definitely switching something, changing the volume when headphones are plugged in affects the headphone volume. But no audio is going through headphones unless I manually move the sink input over.

any ideas how I can get this working when I plug in the headphones? route all audio to a particular sink?

edit: It appears if I go to the playback tab on pavucontrol and show all streams I can move a particular sink between the two, so that works. It would be nice to move everything over automatically when it's plugged in though

Re: [Solved] Dual alc1220 - Front Headphone audio plays through rear

Thanks for a simple solution; Chiming in with one of my own for the AX370 Gaming K7, not much difference between them really.Enabled my Front panel Headphone audio just now, editing

/usr/share/alsa/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/HiFi.conf

owned by the alsa-lib package interpreted by pulseaudio.from:

cdev "hw:PCH"

be aware of variants like cdev "hw:PCH,4" existinto:

cdev "hw:Generic"

cdev "hw:Generic,4"

What led me there is aplay -l shows PCH on Intel motherboard with the same ALC1220 dual-codecs, on ours it should be Generic from "2: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]"

You can probably tweak even further since I suspect you may have to create something for the Digital devices too.

Re: [Solved] Dual alc1220 - Front Headphone audio plays through rear

You can also stick the load-module command (without the pacmd) into your /etc/pulse/default.pa that way it will be invoked on each pulse start, without having to worry about which environment is starting pulse