I posted this on the alsa-user list, but did not get a reply.
Although it occasionally works, I am usually unable to get any sound out of the speakers on a dell latitude e7240 using alsa-1.0.28 and linux-3.16.6 - see details at the end of the post.
If so, Windows or BIOS is the problem. It doesn't set up the pin
configuration properly Linux driver relies on.
I just updated the bios to the latest version, but no change :(
If you get the status where the speaker works (e.g. after Windows clean
reboot), try to take alsa-info.sh snapshot. Run alsa-> info.sh with --no-upload option, and save the generated output. Then, take another alsa-info.sh snapshot while the speaker > doesn't work. Compare these two outputs. (At best, attach both (compressed) files.)
Alsa_info_works and alsa_info_no_works attached - diff didn't show an obvious difference between getting sound from the speakers and not getting sound from the speakers.