Saturday, November 14, 2009

Fixing broken sound in flash plugin in Slackware 13.0

I upgraded my laptop to Slackware 13.0. In general, hardware support has improved. All hardware was detected automatically by HAL and UDEV. That includes formerly problematic Synaptic touchpad, both monitors attached via DVI and VGA, and Logitech Quickcam. I only needed minor adjustments to get dual screen out of the mirroring mode.

One of the minor problems was that flash plugin in Mozilla wouldn't play sound. That was despite that my username being a member of the group "audio". It turned out that if you had more than one sound device, Flash would only output sound to the first configured device (alsa card #0). When I booted the laptop with webcam attached through USB, the snd-usb-audio module loaded before snd-hda-intel, resulting in the first configured audio device (webcam) not supporting any audio output.

The workaround would be to always boot with the webcam unplugged. However, a better solution is to hint the device loading system (udev) that the built-in intel sound device needs to be loaded first. Google found me a solution in a Slackware forum at linuxquestions.org. Add a file in /etc/modprobe.d containing the following instruction: "options snd slots=snd-hda-intel,snd-usb-audio". You can check the mapping of sound card slots to modules using "cat /proc/asound/modules"

References: Slackware, Where Alsa looks for default sound card, Synaptics Touchpad with HAL, Dual-screen with xrandr.

No comments: