Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102198433
D43767.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
905 B
Referenced Files
None
Subscribers
None
D43767.diff
View Options
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -1725,6 +1725,7 @@
uint8_t audio_if = 0;
uint8_t midi_if = 0;
uint8_t uma_if_class;
+ uint8_t i;
while ((desc = usb_desc_foreach(cd, desc))) {
if ((desc->bDescriptorType == UDESC_INTERFACE) &&
@@ -2017,6 +2018,20 @@
chan->set_alt = 0;
chan->cur_alt = CHAN_MAX_ALT;
+ for (i = 0; i != chan->num_alt; i++) {
+ chan_alt = &chan->usb_alt[i];
+
+ if (chan_alt->sample_rate == rate &&
+ chan_alt->channels == channels &&
+ chan_alt->p_fmt->bPrecision == bit_resolution) {
+ DPRINTF("Skipping duplicate configuration: "
+ "sample rate = %dHz, channels = %d, "
+ "bits = %d\n",
+ rate, channels, bit_resolution);
+ goto next_ep;
+ }
+ }
+
chan_alt = &chan->usb_alt[chan->num_alt++];
#ifdef USB_DEBUG
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 8:34 PM (18 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14565415
Default Alt Text
D43767.diff (905 B)
Attached To
Mode
D43767: snd_uaudio: skip duplicate configurations
Attached
Detach File
Event Timeline
Log In to Comment