xine was unable to initialize audio drivers

xine was unable to initialize audio drivers error message is an issue which bothers me for long time alredy. I have a feeling that it is not related to only debian lenny but Ubuntu is also affected with this bug. To be honest I do not know the real cause of this problem. My suspicion is that xine dies when using combination of my skype and amarok although I can not prove it as well as I can not provide long term solution to this problem. The only quick fix I found is to unload all alsa driver modules recompile and load them back. Fortunately this can be easily done with # alsaconf .

When running # alsaconf command alsaconf will unload all alsa modules:

Unloading ALSA sound driver modules: snd-hda-intel snd-usb-audio snd-pcm-oss snd-mixer-oss snd-pcm snd-seq-dummy snd-usb-lib snd-hwdep snd-seq-oss snd-seq-midi snd-rawmidi snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-alloc.

then it will search for sound cards hardware and let you choose your card. Then it will compile new modules and load them to the system. The final message is always promising:

Loading driver…
Setting default volumes…


Now ALSA is ready to use.
For adjustment of volumes, use your favorite mixer.

Have a lot of fun!

Let me know if there is better solution to this problem.