Missing Sound with Flash in Firefox (and my fix).

Most of the time during the day I’m sitting at my desk in the company with headphones on listening to music. The general noise level is simply unbearable to get anything done. That I can’t hear any sound from within Flash applications in Firefox is usually not a problem. Flash under Linux still uses the old OSS sound system and that won’t play if the sound card is in use by the MP3 player through the ALSA sound system. There is a workaround in that you could start Firefox under the control of aoss, however the result sounded absolutely horrible. Don’t know the reason. However sometimes I would still by nice to listen to some funny Flash movie, which my colleague found on YouTube.

Now I decided to do something against this situation and my fix is to throw some hardware at it. Although my current PC is equipped with the standard i810 AC97 Onboard sound system I’m still using the el cheapo PCI sound card from my previous PC. It simply sounds better. In particular I don’t hear, when I’m moving my mouse over the screen as was the case with the onboard sound and the front side headphone plug. Up to now, I didn’t bother to activate the onboard sound system as a second sound card with ALSA.

But now I thought about a short cable, which was part of my Hauppage analog TV-card and is normally used to connect the output of the TV-card to line-in of the sound card. I didn’t use this cable since I created an internal connection from TV to sound card.

Now I’m using this cable to connect line-out of the motherboard sound system to line-in of the el-cheapo PCI card. Additionally I added these lines to the file /etc/udev/rules.d/10-local.rules.

KERNEL=="adsp1", NAME="sound/%k", SYMLINK+="adsp", GROUP="audio" 
KERNEL=="audio1", NAME="sound/%k", SYMLINK+="audio", GROUP="audio"
KERNEL=="dsp1", NAME="sound/%k", SYMLINK+="dsp", GROUP="audio"
KERNEL=="mixer1", NAME="sound/%k", SYMLINK+="mixer", GROUP="audio"

This essentially means, that the symbolic links for the default OSS devices (/dev/dsp, /dev/audio, etc) which are created when the ALSA OSS-sound modules are loaded now point to the second sound card. Now, when Firefox is started and a Flash application is opened, the sound goes through the motherboard to the PCI sound card. Now I can switch between the sound producing applications without the need to restart or stop any application. Pausing it is enough.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax