diff options
author | Eldad Zack <eldad@fogrefinery.com> | 2013-07-09 14:36:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-10 11:52:14 -0400 |
commit | 42d4ab832d843b5a512b373c86e70caa43a041c8 (patch) | |
tree | 725c623907fdce98550b7d79e05212e501f30c84 /sound/usb | |
parent | cd63a5ffd24214246b1092365c7d6c2cd5aca29b (diff) |
ALSA: usb-audio: fix regression for fixed stream quirk
Commit 8f898e92aea2c24c7f379ee265d178f69ebb9c07 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 #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>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/quirks.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 5b01330b8452..1bc45e71f1fe 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -129,6 +129,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, | |||
129 | { | 129 | { |
130 | struct audioformat *fp; | 130 | struct audioformat *fp; |
131 | struct usb_host_interface *alts; | 131 | struct usb_host_interface *alts; |
132 | struct usb_interface_descriptor *altsd; | ||
132 | int stream, err; | 133 | int stream, err; |
133 | unsigned *rate_table = NULL; | 134 | unsigned *rate_table = NULL; |
134 | 135 | ||
@@ -166,6 +167,9 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, | |||
166 | return -EINVAL; | 167 | return -EINVAL; |
167 | } | 168 | } |
168 | alts = &iface->altsetting[fp->altset_idx]; | 169 | alts = &iface->altsetting[fp->altset_idx]; |
170 | altsd = get_iface_desc(alts); | ||
171 | fp->protocol = altsd->bInterfaceProtocol; | ||
172 | |||
169 | if (fp->datainterval == 0) | 173 | if (fp->datainterval == 0) |
170 | fp->datainterval = snd_usb_parse_datainterval(chip, alts); | 174 | fp->datainterval = snd_usb_parse_datainterval(chip, alts); |
171 | if (fp->maxpacksize == 0) | 175 | if (fp->maxpacksize == 0) |