No sound under Linux Intel HDA drivers.

If you spent days on trying to fix not working sound under your Linux distro using alsa – You in the right place.

Many different tutorials about fixing sound under Linux are mostly related to not working kernel module, volume/muted output, improper device selected or dump debug log to waste someones else time. Nor any of those issues where my case.

I will get this as short as possible. If your kernel module is loaded properly and your mixer/device settings are correct – your driver is probably mapping your pin outs wrong. I have experienced this with built-in speakers in Sony Vaio VPCL12M1E. Under Ubuntu 16.04 (and down the line till 12.04) speakers where not working but everything was perfectly fine with headphones.

The solution:

  • Download HDA Analyzer from Alsa team. Its great gui for many different HDA driver settings.
  • You might have to install some python deps to make it work under Ubuntu 16.04 (python-gobject-2, python-gtk2, … ?)
  • Make sure you sudo the script
  • Play with HDA Analyzer and generate a startup script to fix / workaround bad pin out problem
  • Run script on startup as root.
  • Run script on unsuspend.

Play with HDA Analyzer Explained
In my case I have found that turning off mute for one of mixers (0x0d) and switching to that mixer on PIN 0x14 did the magic. It might be something else in your case (different mixer or pin) but usually procedure is same.

1st. Identify mixer, don’t get confused by names. In my case not working default was Speaker Playback Volume (0x0f) mixer. Change it into something else available. I had Surround Playback Volume mixer at 0x0d address. Disabled both Mute at Val[0] and Val[1] under Input Amplifier 🙂
aud_mix-0d

Next I’ve found that Speaker Playback Switch (0x14) pin was associated to my old not working mixer (0x0f) so I’ve just changed Source Node under Connection List to the one I’ve just unmuted (0x0d). Bum! Built-in speakers are playing nice! 🙂
pin-14

Run script on startup as root.

  • Click on ‘Exp’ button in HDA Analyzer, name and save the script somewhere eg. /home/user/script/fix-my-hda.py
  • Copy script to /usr/local/sbin/fix-my-hda.py
  • Add line to /etc/rc.local before ‘exit 0’ as follows: python /usr/local/sbin/fix-my-hda.py
  • Another reboot should sound nice 😉

Run script on unsuspend
//todo