Skip to content

Commit 42d4ab8

Browse files
eldadtiwai
authored andcommitted
ALSA: usb-audio: fix regression for fixed stream quirk
Commit 8f898e9 removed the redundant reads of bInterfaceProtocol from the descriptors, but introduced a regression to devices with quirks of type QUIRK_AUDIO_FIXED_ENDPOINT, since fp->protocol is not set in setup process. As a consequence, audio streams would not get initialized, as the following logs show: [ 48.923043] setting usb interface 3:1 [ 48.923056] Creating new capture data endpoint torvalds#81 [ 48.923484] 4:3:1: cannot set freq 48000 to ep 0x81 This patch sets fp->protocol in create_fixed_stream_quirk() and resolves the regression. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent cd63a5f commit 42d4ab8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/usb/quirks.c

+4
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
129129
{
130130
struct audioformat *fp;
131131
struct usb_host_interface *alts;
132+
struct usb_interface_descriptor *altsd;
132133
int stream, err;
133134
unsigned *rate_table = NULL;
134135

@@ -166,6 +167,9 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
166167
return -EINVAL;
167168
}
168169
alts = &iface->altsetting[fp->altset_idx];
170+
altsd = get_iface_desc(alts);
171+
fp->protocol = altsd->bInterfaceProtocol;
172+
169173
if (fp->datainterval == 0)
170174
fp->datainterval = snd_usb_parse_datainterval(chip, alts);
171175
if (fp->maxpacksize == 0)

0 commit comments

Comments
 (0)