From: Karsten Wiese Subject: Re: [PATCH]snd-usb-usx2y 0.6.4 Date: Mon, 21 Jun 2004 10:30:30 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <200406211030.30993.annabellesgarden@yahoo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Clemens Ladisch Cc: Takashi Iwai , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org Am Montag 21 Juni 2004 10:02 schrieb Clemens Ladisch: > Karsten Wiese wrote: > > snd-usb-usx2x calls usb-set-interface() to set the sample format. > > ... and the USx2y devices use the same interface for MIDI, it seems. Yes. It is impossible to use different interfaces on one usb_device at the same time. Or not? > > > This lets midi in work after usb-set-interface() on kernel 2.6.7 and > > doesn't disturb otherwise. > > > > + if (urb && urb == ep->urb_retry > > It's not obvious why urb_retry is needed. Isn't it always the same > as ep->urb? ep->urb_retry is normally NULL and only set to ep->urb, if ep->urb comes back with -ESHUTDOWN. Thus ep->urb_retry serves as a flag to show that resubmission is needed. > > > + && usb_pipe_needs_resubmit(urb->pipe)) > > Won't this prevent it from working with interrupt pipes on 2.4? > > > + snd_usbmidi_submit_urb(urb, GFP_ATOMIC); > > I think we can use GFP_KERNEL here. > > > I don't like this solution too much, it's just a device-specific > kludge. A more general solution would be to have two functions > snd_usbmidi_stop/start_input() and calling them before/after changing > the sample format. (The start function could be used at the end of > snd_usb_create_midi_interface(), too.) Agreed. > > And what should happen to data that is being output when the sample > format is changed? There was no out midi urb missed so far. It looks as if there is no special handling needed. Regards, Karsten ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND