I am moving various publications and how-to documents to this blog and found this one. In fact, many of these steps are still valid when troubleshooting issues, however the state of ALSA in kernel 4.4 is much better and in vast majority of cases, sound should work on new laptops right away.
To setup ALSA on a laptops, notebooks and many modern motehrboards which come with an integrated soundcard, you need to take the following steps.
1. Collect information about your hardware device using lspci -v (you can grep for audio).
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02) Subsystem: Micro-Star International Co., Ltd. Unknown device 040d
Whats important here is the Subsystem. Write it down.
2. Obtain the chipset info from your running configuration.
$ cat /proc/asound/pcm 00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 1 00-02: ALC883 Analog : ALC883 Analog : capture 2 00-01: ALC883 Digital : ALC883 Digital : playback 1 00-00: ALC883 Analog : ALC883 Analog : playback 1 : capture 2
So, in my case it is a ALC883 chipset and MSI subsystem. Of course, snd-hda-intel driver must be loaded first. But to get proper sound output, you have to add an appropriate model line to /etc/modules.d/alsa where the module gets configured at load (for example at boot time).
3. Checking for the right model to use with the module loading script
Time to read the documentation that comes with the Linux kernel. To do this, open /usr/src/linux/Documentation/sound/alsa/ALSA-Configuration.txt with your favourite text editor. Find the occurence of your chipset and browse the list of options and subsystems. In my case:
ALC883/888 3stack-dig 3-jack with SPDIF I/O 6stack-dig 6-jack digital with SPDIF I/O 3stack-6ch 3-jack 6-channel 3stack-6ch-dig 3-jack 6-channel with SPDIF I/O 6stack-dig-demo 6-jack digital for Intel demo board acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc) medion Medion Laptops targa-dig Targa/MSI targa-2ch-dig Targs/MSI with 2-channel laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE) auto auto-config reading BIOS (default)
I find my subsystem (MSI) on the list. It is next to the targa-dig option, so i have to use it in my configuration. This shows that for me the appropriate /etc/modules.d/alsa configuration line is:
options snd_hda_intel model=targa-dig
Put your line in the config file and then have the module re-load (if you did not compile in module re-loading in the kernel, you need to reboot).