[PATCH 2/2] ALSA: usb-audio: Avoid shoving a new stream into already registered device
Takashi Iwai
tiwai at suse.de
Mon Mar 23 21:25:27 CET 2020
On Mon, 23 Mar 2020 18:06:43 +0100,
Takashi Iwai wrote:
>
> USB-audio driver registers the card and its devices at each probe of
> USB interface, while trying to append a USB substream into the empty
> PCM stream slot. This works for most cases where the all PCM streams
> are declared in the single interface description. However, when the
> device provides multiple individual interfaces, this may up with
> pushing a new stream into the existing snd_pcm object that has been
> already registered. From the driver perspective, it's OK, but it
> doesn't work for PulseAudio and others because they manage in the card
> registration level, hence they'll miss this new device creation.
>
> This patch tries to warn such a too-late-appended stream, and also
> tries to put rather into a new snd_pcm object.
>
> If we get a report from a user about this, we may add it to an entry
> for snd_usb_registration_quirk().
>
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
Let's scratch this. It's better to be put together with a generic
module option that allows specifying the delayed registration for the
given device, and show the warning at the time of snd_card_register()
call instead.
Will respin the improved version later.
Takashi
More information about the Alsa-devel
mailing list