ALSA: usb-audio: Create endpoint objects at parsing phase
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 08:53:20 +0000 (09:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 14:13:26 +0000 (15:13 +0100)
commit54cb31901b831befb4f9347dd002dcc8ff2cc263
tree47226cc9a6f8feca94de68211affe8246d10ed8b
parent5fd255f4fe9707b5274e60d94d4aa64536f67ec3
ALSA: usb-audio: Create endpoint objects at parsing phase

Currently snd_usb_endpoint objects are created at first when the
substream is opened and tries to assign the endpoints corresponding to
the matching audioformat.  But since basically the all endpoints have
been already parsed and the information have been obtained, we may
create the endpoint objects statically at the init phase.  It's easier
to manage for the implicit fb case, for example.

This patch changes the endpoint object management and lets the parser
to create the all endpoint objects.

This change shouldn't bring any functional changes.

Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
sound/usb/endpoint.h
sound/usb/pcm.c
sound/usb/stream.c