From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758345AbZBKAdA (ORCPT ); Tue, 10 Feb 2009 19:33:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757521AbZBKA2R (ORCPT ); Tue, 10 Feb 2009 19:28:17 -0500 Received: from kroah.org ([198.145.64.141]:51074 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757349AbZBKA2P (ORCPT ); Tue, 10 Feb 2009 19:28:15 -0500 Date: Tue, 10 Feb 2009 16:24:43 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Clemens Ladisch , Takashi Iwai Subject: [patch 14/56] sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devices Message-ID: <20090211002443.GO14660@kroah.com> References: <20090211001439.873435357@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="sound-usb-audio-handle-wmaxpacketsize-for-fixed_endpoint-devices.patch" In-Reply-To: <20090211002328.GA14660@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Clemens Ladisch commit 894dcd78782842924527598b0b764c9b4e679e21 upstream. For audio devices that do not have proper audio descriptors (e.g., Edirol UA-20), we use hardcoded parameters from our quirks list. However, we must still read the maximum packet size from the standard endpoint descriptor; otherwise, we might use packets that are too big and therefore rejected by the USB core. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/usbaudio.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2958,6 +2958,7 @@ static int create_fixed_stream_quirk(str return -EINVAL; } alts = &iface->altsetting[fp->altset_idx]; + fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize); usb_set_interface(chip->dev, fp->iface, 0); init_usb_pitch(chip->dev, fp->iface, alts, fp); init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max);