пятница, 30 марта 2012 г.

Sound Blaster Connect Hi-Fi USB + Linux

This will be interesting for those who want to buy an external sound card but not sure if it will work with Linux. Official ALSA site lacks this information, so I will try to fulfil it. Short answer - YES, Sound Blaster Connect Hi-Fi USB (SB1260) works with Linux, at least with Ubuntu 11 with PulseAudio server.

There are three main reasons for buying an external audio card:
  • Internal sound card of your laptop had fried
  • Your laptop lacks Line-In connector (this was the reason for me)
  • Sound quality or set or features of your internal sound card doesn't satisfy you
Here is minimal background required for further explanations: recent Linux kernels have built-in support for USB audio devices (snd-usb-audio kernel module), ALSA (Advanced Linux Sound Architecture) system is used to orchestrate all sound devices at low level. Morden Linux distributions come with audio server software, e.g. PulseAudio. PulseAudio acts as an audio dispatcher/router/manager between applications and ALSA system. It can do a lot of cool features, that would be difficult with bare ALSA.

As for playback, SB1260 started to work out-of-box: you just need to plug the card and change active output device in "Sound settings" menu (right click on the speaker icon in the tray in my distro). Line-In recording was a little more tricky. I've tried to select an active input device (in neighbour tab) and adjust record level but with no luck. The only thing I was able to record is a silence. After 3 evenings of experimenting with the %subj% I came up with a brilliant idea: use low-level alsamixer program to check & adjust recording level and ... it worked! Record level was at 0% and PulseAudio's mixer didn't change that.

I hope this will save 3 evening of your life!

UPDATE: Also I had to switch Capture Source from 'mic' to 'line-in' in alsamixer. Unfortunately doing the same thing using PulseAudio's front-end didn't help.