From patchwork Fri Dec 4 22:15:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John S Gruber X-Patchwork-Id: 64986 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB4MGasc026514 for ; Fri, 4 Dec 2009 22:16:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755047AbZLDWQG (ORCPT ); Fri, 4 Dec 2009 17:16:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755081AbZLDWQE (ORCPT ); Fri, 4 Dec 2009 17:16:04 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:43557 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754446AbZLDWP7 (ORCPT ); Fri, 4 Dec 2009 17:15:59 -0500 Received: by bwz27 with SMTP id 27so2315992bwz.21 for ; Fri, 04 Dec 2009 14:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:cc:content-type; bh=QXNKHvospL5uWlTHJMer4f78SQD4lIgVoMVEIoweLgE=; b=AZxLhSNdpD/HoUkPO5Eiur3EjXPvr5iRjgkz+cigoRefBG9kPhQy3fbFz5NY7rOUFV m3fkywAuO2f0Cz2YglhXTefVds8mYizlW23mlGZDGt5yUjeaTr1h3bTM8AisQoLgbJW4 IM0dz5w7M2lgWy+UfvJyoPxPA+HiQMr8JkPns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=p0KPy6vcEkdbFhSC4aBM3e7rzutLatSegfL+GyI4NBSuqaNaarE2xkN3uahXDVhf/D enLSIowyYOBZsDKEWGvDRdOTATZcHBLzErTGJEaBBelb6Iux3YQqUoTbQDOy1FzW/9Mg GWP+hJ21539VttnaiHJTwBiK6QVlOvgjQbsVw= MIME-Version: 1.0 Received: by 10.204.15.150 with SMTP id k22mr2529849bka.166.1259964964156; Fri, 04 Dec 2009 14:16:04 -0800 (PST) From: John S Gruber Date: Fri, 4 Dec 2009 17:15:44 -0500 Message-ID: <44c6f3de0912041415r54d8ab6fq486f2a82edb91a68@mail.gmail.com> Subject: [PATCH] sound/usb: Relax urb data alignment restriciton for HVR-950Q only To: linux-media@vger.kernel.org Cc: Devin Heitmueller Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 44b9cdc..64d9d3a 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -107,8 +107,9 @@ MODULE_PARM_DESC(ignore_ctl_error, #define MAX_PACKS_HS (MAX_PACKS * 8) /* in high speed mode */ #define MAX_URBS 8 #define SYNC_URBS 4 /* always four urbs for sync */ #define MAX_QUEUE 24 /* try not to exceed this queue length, in ms */ +#define ALLOW_SUBSLOT_BOUNDARIES 0x01 /* quirk */ struct audioformat { struct list_head list; snd_pcm_format_t format; /* format type */ @@ -126,8 +127,9 @@ struct audioformat { unsigned int rates; /* rate bitmasks */ unsigned int rate_min, rate_max; /* min/max rates */ unsigned int nr_rates; /* number of rate table entries */ unsigned int *rate_table; /* rate table */ + unsigned int txfr_quirks; /* transfer quirks */ }; struct snd_usb_substream; @@ -174,8 +176,11 @@ struct snd_usb_substream { unsigned int running: 1; /* running status */ unsigned int hwptr_done; /* processed frame position in the buffer */ + unsigned int byteptr; /* position, in bytes, of next move */ + unsigned int remainder; /* extra bytes moved to buffer */ + unsigned int txfr_quirks; /* substream transfer quirks */ unsigned int transfer_done; /* processed frames since last period update */ unsigned long active_mask; /* bitmask of active urbs */ unsigned long unlink_mask; /* bitmask of unlinked urbs */ @@ -342,9 +347,9 @@ static int retire_capture_urb(struct snd_usb_substream *subs, { unsigned long flags; unsigned char *cp; int i; - unsigned int stride, len, oldptr; + unsigned int stride, len, bytelen, oldbyteptr; int period_elapsed = 0; stride = runtime->frame_bits >> 3;