In 2009-2010 my PC had a built-in VIA8237 sound chip and a fancy Audigy ZS card. KDE System Settings > Multimedia and ALSA were always confused about them.
System Settings > Multimedia > Phonon showed two sound devices, but identified both as "Internal Audio Analog Stereo" No way to get more info about them to figure out which is which, could only click the [(>) Test] button. I filed bugs on this (forgotten where?, KDE bugbase and ALSA maybe?); ace developer Colin Guthrie seems to think things are misidentified at the PCI level.
By default KDE chose the Audigy ZS for output. But if I do anything else while Flash is playing sound, it screeches. 64-bit Flash, 64-bit browser. I tried asoundconf set-pulseaudio but that stopped sound from working, got
% aplay -v -v /usr/share/sounds/k3b_success1.wav ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Hmm? I think I removed PulseAudio altogether to solve this problem.
After upgrading to Kubuntu Lucid Lynx 10.04 in April 2010, the screeching in Amarok got even worse. It went away when I switched to the built-in VIA chip.
To do this in KDE's Phonon I:
vlc and Flash didn't use the right sound card because they don't use Phonon. aplay -vv confirmed. cat /proc/asound/cards shows which card is which, and the VIA chip is card 2.
So back to how to change Alsa device order. Sigh, so many conflicting instructions for this: modprobes, udevs, blah blah. The command-line program asoundconf is no longer in Ubuntu, and ~/.asoundrc.asoundconf tells me not to edit it.
I can't even get aplay -D 'V8237' or any variants to work.
Answer: You could say !default is card1 in ~/.asoundrc, see .asoundrc "A brief example" for the syntax. But better to dissuade the Audigy ZS from being the first card, by adding options snd slots=,snd-emu10k1 (note the comma!) to /etc/modprobe.d/alsa-base.conf. See MultipleCards "Reordering the driver for a particular card".