[pulseaudio-discuss] Hotplug problem

Lennart Poettering lennart at poettering.net
Thu Apr 2 19:00:49 PDT 2009


On Thu, 02.04.09 23:27, Colin Guthrie (gmane at colin.guthr.ie) wrote:

> With the latest code I seem to run into a bit of a race with the  
> hotplugging of USB cards.
>
> When I plug in a USB card I get the following problem.

The problem might be that we try to open the audio device before all
device nodes have been created. This is due to that fact that in ALSA
each card creates a farm of device nodes, i.e. pcm devices,
sequencers, control devices and that all in two flavours: ALSA and
OSS.

The current code waits for a PCM device and then tries to open it via
libasound. libasound will then try to open the control device that
belongs to the PCM device first. But that will fail if by that time
the control device node has not been created yet.

This is fixable, but we need to some support from ALSA for this:

http://mailman.alsa-project.org/pipermail/alsa-devel/2009-April/015942.html

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list