Echo Mia

From ArchWiki
Revision as of 22:42, 16 November 2008 by Themaister (Talk | contribs)

Jump to: navigation, search

This article will discuss how to setting up the Echo Mia (Midi) soundcard to work under Arch, and how to resolve the hardware mixing issue in ALSA. It also implies that ALSA is set up properly. Proper software mixing is as far as experimenting goes impossible without PulseAudio.

The Arch kernel includes the Mia modules necessary, however the firmware needs to be installed. The alsa-firmware package can be obtained from the AUR. After the firmware is installed, all other modules for other soundcards need to be blacklisted. This should be done in /etc/rc.conf.

If the soundcard is not recognized at boot time, the modules can be built from sources.

wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.18.tar.bz2 cd alsa-driver-1.0.18 ./configure --with-cards=mia make sudo make install

Reboot again, confirm that the module is loaded, and is able to play sound.

The Echomixer should be installed from the alsa-tools package, found on the AUR. Echomixer makes it easier to set up and manage the virtual channels (subdevices) of your soundcard.

When the card is set up, and plays sound correctly, the last part is tricking to make the hardware mixing work as it should. If hardware mixing is already working properly, the last part of this page should be of no interest. However, if the sound card is unable to have more than one stream at the same time, this fix should work around it.

As suspected in this forum thread, http://bbs.archlinux.org/viewtopic.php?id=36508, Mia is unable to let ALSA pick a free subdevice for the sound card. A stereo stream is considered as two streams for Mia, but ALSA thinks this as one stream, leading to the crash that it will pick a busy subdevice each time it tries to play another stream. To work around this, we have to force ALSA to pick other subdevices. We can do this by splitting the card into four different devices. Example of /etc/asound.conf

pcm.!default{ type hw card 0 subdevice 0 } ctl.!default{ type hw card 0 } pcm.mia1{ type hw card 0 subdevice 2 } pcm.mia2{ type hw card 0 subdevice 4 } pcm.mia3{ type hw card 0 subdevice 6 }

As long as we have programs that are able to pick different devices for ALSA, we can route certain programs to certain devices. For programs that only use the default device, it will be defaulted to use subdevice 0 (and 1). Many popular programs are able to pick devices for themselves. A normal setup of flashplayer in web browser, movie player and a music player can be designated their own devices, which also allows separate volume control of these. Refer to each programs manuals on how to configure these properly.