Commit 1846315a authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/09/24 14:12:50
C:USB generic driver
A:Takashi Iwai <tiwai@suse.de>
F:usb/usbaudio.c:1.64->1.65 
F:usb/usbmixer.c:1.22->1.23 
L:- don't create controls from selector units with a single content.
L:- suppress the error if async-out or adaptive-in has only one EP.
L:  don't create a sync pipe in this case.
parent a3ddab15
...@@ -1095,12 +1095,16 @@ static int set_format(snd_usb_substream_t *subs, struct audioformat *fmt) ...@@ -1095,12 +1095,16 @@ static int set_format(snd_usb_substream_t *subs, struct audioformat *fmt)
subs->fill_max = 0; subs->fill_max = 0;
/* we need a sync pipe in async OUT or adaptive IN mode */ /* we need a sync pipe in async OUT or adaptive IN mode */
/* check the number of EP, since some devices have broken
* descriptors which fool us. if it has only one EP,
* assume it as adaptive-out or sync-in.
*/
attr = fmt->ep_attr & EP_ATTR_MASK; attr = fmt->ep_attr & EP_ATTR_MASK;
if ((is_playback && attr == EP_ATTR_ASYNC) || if (((is_playback && attr == EP_ATTR_ASYNC) ||
(! is_playback && attr == EP_ATTR_ADAPTIVE)) { (! is_playback && attr == EP_ATTR_ADAPTIVE)) &&
/* check endpoint */ altsd->bNumEndpoints >= 2) {
if (altsd->bNumEndpoints < 2 || /* check sync-pipe endpoint */
get_endpoint(alts, 1)->bmAttributes != 0x01 || if (get_endpoint(alts, 1)->bmAttributes != 0x01 ||
get_endpoint(alts, 1)->bSynchAddress != 0) { get_endpoint(alts, 1)->bSynchAddress != 0) {
snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n", snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n",
dev->devnum, fmt->iface, fmt->altsetting); dev->devnum, fmt->iface, fmt->altsetting);
......
...@@ -1358,6 +1358,9 @@ static int parse_audio_selector_unit(mixer_build_t *state, int unitid, unsigned ...@@ -1358,6 +1358,9 @@ static int parse_audio_selector_unit(mixer_build_t *state, int unitid, unsigned
return -EINVAL; return -EINVAL;
} }
if (num_ins == 1) /* only one ? nonsense! */
return 0;
if (check_ignored_ctl(state, unitid, 0)) if (check_ignored_ctl(state, unitid, 0))
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment