In this post viewtopic.php?f=48&t=95337&p=545844&hilit=wrong+sound+device+order#p545595
the problem was solved by using 'cat /proc/asound/modules ' and putting an index in /etc/modprobe.d/alsa-base.conf, eg.
options snd_intel8x0 index=0
options snd_hda_intel index=1
Now, what if they are the same module, eg.
cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
My nvidia card and my onboard sound both use hda_intel but different codecs - hdmi and realtek

