Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need one instance of Chromium on Linux to target a different sound card than the default, including Flash. Is there anyway to do this easily?

share|improve this question

1 Answer 1

First, use aplay -l to get the identifier of the alternative sound card you want to use. In the following example, it's AUDIO.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AUDIO [USB  AUDIO], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Next, create an alternative ALSA configuration file (I used .asoundrc.usb) and fill it with the following content (based on a solution for a similar problem). Don't forget to replace AUDIO with the identifier you obtained in the previous step.

pcm.usb { type hw; card AUDIO; }
ctl.usb { type hw; card AUDIO; }

pcm.!default pcm.usb
ctl.!default ctl.usb

The only thing left is to modify the startup (desktop or menu shortcut, script, alias, etc.) of your browser to set the ALSA_CONFIG_PATH environment variable (documented on the ALSA project page) to the file you created.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.