diff mbox

sound/usb: Relax urb data alignment restriciton for HVR-950Q only

Message ID 44c6f3de0912041415r54d8ab6fq486f2a82edb91a68@mail.gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

John S Gruber Dec. 4, 2009, 10:15 p.m. UTC
None
diff mbox

Patch

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;