Skip to contentSkip to conversation

Cleanups for snd-usb-audio

PATCH In review Daniel Mack 4 participants 14 messages Sep 12, 2011 – Sep 14, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Cleanups for snd-usb-audio

Hi,

I prepared a subset of my work on the generic USB audio driver that doesn't actually change any logic but just moves around major chunks of code. Can we get this merged as preparation for the more intrusive parts that follow?

Thanks,
Daniel

Daniel Mack (4):
USB: Add endpoint usage definitions to ch9.h
ALSA: snd-usb: re-order the Makefile
ALSA: snd-usb: re-order code
ALSA: snd-usb: move code from urb.c to endpoint.c

 include/linux/usb/ch9.h |   17 +-
 sound/usb/Makefile      |   12 +-
 sound/usb/card.c        |    4 +-
 sound/usb/endpoint.c    | 1185 +++++++++++++++++++++++++++++++++--------------
 sound/usb/endpoint.h    |   20 +-
 sound/usb/pcm.c         |    2 +-
 sound/usb/quirks.c      |    7 +-
 sound/usb/stream.c      |  452 ++++++++++++++++++
 sound/usb/stream.h      |   12 +
 sound/usb/urb.c         |  941 -------------------------------------
 sound/usb/urb.h         |   21 -
 11 files changed, 1341 insertions(+), 1332 deletions(-)
 create mode 100644 sound/usb/stream.c
 create mode 100644 sound/usb/stream.h
 delete mode 100644 sound/usb/urb.c
 delete mode 100644 sound/usb/urb.h
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/4 USB: Add endpoint usage definitions to ch9.h

The endpoint usage field is described in the USB 2.0 specification, chapter 9.6.6.

Also, move the sync type fields block down by some lines to reflect the fact that these are also stuffed in bmAttributes.

Cc Greg Kroah-Hartman <[email protected]>
Cc Takashi Iwai <[email protected]>
---
 include/linux/usb/ch9.h |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
include/linux/usb/ch9.h +11 -6
index 0fd3fbd..f302535 100644
@@ -377,12 +377,6 @@ struct usb_endpoint_descriptor {
 #define USB_ENDPOINT_NUMBER_MASK	0x0f	/* in bEndpointAddress */
 #define USB_ENDPOINT_DIR_MASK		0x80
 
-#define USB_ENDPOINT_SYNCTYPE		0x0c
-#define USB_ENDPOINT_SYNC_NONE		(0 << 2)
-#define USB_ENDPOINT_SYNC_ASYNC		(1 << 2)
-#define USB_ENDPOINT_SYNC_ADAPTIVE	(2 << 2)
-#define USB_ENDPOINT_SYNC_SYNC		(3 << 2)
-
 #define USB_ENDPOINT_XFERTYPE_MASK	0x03	/* in bmAttributes */
 #define USB_ENDPOINT_XFER_CONTROL	0
 #define USB_ENDPOINT_XFER_ISOC		1
@@ -390,6 +384,17 @@ struct usb_endpoint_descriptor {
 #define USB_ENDPOINT_XFER_INT		3
 #define USB_ENDPOINT_MAX_ADJUSTABLE	0x80
 
+#define USB_ENDPOINT_SYNCTYPE		0x0c
+#define USB_ENDPOINT_SYNC_NONE		(0 << 2)
+#define USB_ENDPOINT_SYNC_ASYNC		(1 << 2)
+#define USB_ENDPOINT_SYNC_ADAPTIVE	(2 << 2)
+#define USB_ENDPOINT_SYNC_SYNC		(3 << 2)
+
+#define USB_ENDPOINT_USAGE_MASK		0x30
+#define USB_ENDPOINT_USAGE_DATA		0x00
+#define USB_ENDPOINT_USAGE_FEEDBACK	0x10
+#define USB_ENDPOINT_USAGE_IMPLICIT_FB	0x20	/* Implicit feedback Data endpoint */
+
 /*-------------------------------------------------------------------------*/
 
 /**
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [PATCH 1/4] USB: Add endpoint usage definitions to ch9.h

Quoted 5 lines · Daniel Mack

The endpoint usage field is described in the USB 2.0 specification, chapter 9.6.6.

Also, move the sync type fields block down by some lines to reflect the fact that these are also stuffed in bmAttributes.

Greg - can we merge this through the ALSA tree?

Daniel

Quoted 46 lines
Cc Greg Kroah-Hartman <[email protected]>
Cc Takashi Iwai <[email protected]>

---
 include/linux/usb/ch9.h |   17 +++++++++++------

 1 files changed, 11 insertions(+), 6 deletions(-)
include/linux/usb/ch9.h +11 -7
index 0fd3fbd..f302535 100644
@@ -377,12 +377,6 @@ struct usb_endpoint_descriptor {
  #define USB_ENDPOINT_NUMBER_MASK       0x0f    /* in bEndpointAddress */
  #define USB_ENDPOINT_DIR_MASK          0x80
 
-#define USB_ENDPOINT_SYNCTYPE          0x0c
-#define USB_ENDPOINT_SYNC_NONE         (0 << 2)
-#define USB_ENDPOINT_SYNC_ASYNC                (1 << 2)
-#define USB_ENDPOINT_SYNC_ADAPTIVE     (2 << 2)
-#define USB_ENDPOINT_SYNC_SYNC         (3 << 2)
-
  #define USB_ENDPOINT_XFERTYPE_MASK     0x03    /* in bmAttributes */
  #define USB_ENDPOINT_XFER_CONTROL      0
  #define USB_ENDPOINT_XFER_ISOC         1
@@ -390,6 +384,17 @@ struct usb_endpoint_descriptor {
  #define USB_ENDPOINT_XFER_INT          3
  #define USB_ENDPOINT_MAX_ADJUSTABLE    0x80
 
+#define USB_ENDPOINT_SYNCTYPE          0x0c
+#define USB_ENDPOINT_SYNC_NONE         (0 << 2)
+#define USB_ENDPOINT_SYNC_ASYNC                (1 << 2)
+#define USB_ENDPOINT_SYNC_ADAPTIVE     (2 << 2)
+#define USB_ENDPOINT_SYNC_SYNC         (3 << 2)
+
+#define USB_ENDPOINT_USAGE_MASK                0x30
+#define USB_ENDPOINT_USAGE_DATA                0x00
+#define USB_ENDPOINT_USAGE_FEEDBACK    0x10
+#define USB_ENDPOINT_USAGE_IMPLICIT_FB 0x20    /* Implicit feedback Data endpoint */
+
  /*-------------------------------------------------------------------------*/
 
  /**
--

1.7.5.4

Acked-by
#3 lore raw

Re: [PATCH 1/4] USB: Add endpoint usage definitions to ch9.h

Quoted 8 lines · Daniel Mack
Quoted 5 lines · Daniel Mack

The endpoint usage field is described in the USB 2.0 specification, chapter 9.6.6.

Also, move the sync type fields block down by some lines to reflect the fact that these are also stuffed in bmAttributes.

Greg - can we merge this through the ALSA tree?

Yes, please do:

#4 lore raw

PATCH 2/4 ALSA: snd-usb: re-order the Makefile

In reply to Daniel Mack

Sort its entries in alphabetical order.

Cc Takashi Iwai <[email protected]>
Cc Clemens Ladisch <[email protected]>
---
 sound/usb/Makefile |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
sound/usb/Makefile +6 -6
index cf9ed66..083501e 100644
@@ -3,16 +3,16 @@
 #
 
 snd-usb-audio-objs := 	card.o \
+			clock.o \
+			endpoint.o \
+			format.o \
+			helper.o \
 			mixer.o \
 			mixer_quirks.o \
+			pcm.o \
 			proc.o \
 			quirks.o \
-			format.o \
-			endpoint.o \
-			urb.o \
-			pcm.o \
-			helper.o \
-			clock.o
+			urb.o
 
 snd-usbmidi-lib-objs := midi.o
 
Signature · 1 line
1.7.5.4
#5 lore raw

PATCH 3/4 ALSA: snd-usb: re-order code

In reply to Daniel Mack

Move code from endpoint.c into a new file called stream.c and rename functions so that their names actually reflect what they're doing.

This way, endpoint.c will be available to functions that hold all the endpoint logic.

---
 sound/usb/Makefile   |    1 +
 sound/usb/card.c     |    3 +-
 sound/usb/endpoint.c |  433 -----------------------------------------------
 sound/usb/endpoint.h |    7 -
 sound/usb/quirks.c   |    7 +-
 sound/usb/stream.c   |  453 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sound/usb/stream.h   |   12 ++
 7 files changed, 472 insertions(+), 444 deletions(-)
 create mode 100644 sound/usb/stream.c
 create mode 100644 sound/usb/stream.h
sound/usb/Makefile +1 -0
index 083501e..5390db0 100644
@@ -12,6 +12,7 @@ snd-usb-audio-objs := 	card.o \
 			pcm.o \
 			proc.o \
 			quirks.o \
+			stream.o \
 			urb.o
 
 snd-usbmidi-lib-objs := midi.o
sound/usb/card.c +2 -1
index 781d9e6..a3136af 100644
@@ -68,6 +68,7 @@
 #include "urb.h"
 #include "format.h"
 #include "power.h"
+#include "stream.h"
 
 MODULE_AUTHOR("Takashi Iwai <[email protected]>");
 MODULE_DESCRIPTION("USB Audio");
@@ -185,7 +186,7 @@ static int snd_usb_create_stream(struct snd_usb_audio *chip, int ctrlif, int int
 		return -EINVAL;
 	}
 
-	if (! snd_usb_parse_audio_endpoints(chip, interface)) {
+	if (! snd_usb_parse_audio_interface(chip, interface)) {
 		usb_set_interface(dev, interface, 0); /* reset the current interface */
 		usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1L);
 		return -EINVAL;
sound/usb/endpoint.c +0 -433

436 lines not on this page · raw message

sound/usb/endpoint.h +0 -7
index 64dd0db..e5d8a6a 100644
@@ -1,11 +1,4 @@
 #ifndef __USBAUDIO_ENDPOINT_H
 #define __USBAUDIO_ENDPOINT_H
 
-int snd_usb_parse_audio_endpoints(struct snd_usb_audio *chip,
-				  int iface_no);
-
-int snd_usb_add_audio_endpoint(struct snd_usb_audio *chip,
-			       int stream,
-			       struct audioformat *fp);
-
 #endif /* __USBAUDIO_ENDPOINT_H */
sound/usb/quirks.c +4 -3
index 81e07d8..1fc5668 100644
@@ -34,6 +34,7 @@
 #include "endpoint.h"
 #include "pcm.h"
 #include "clock.h"
+#include "stream.h"
 
 /*
  * handle the quirks for the contained interfaces
@@ -106,7 +107,7 @@ static int create_standard_audio_quirk(struct snd_usb_audio *chip,
 
 	alts = &iface->altsetting[0];
 	altsd = get_iface_desc(alts);
-	err = snd_usb_parse_audio_endpoints(chip, altsd->bInterfaceNumber);
+	err = snd_usb_parse_audio_interface(chip, altsd->bInterfaceNumber);
 	if (err < 0) {
 		snd_printk(KERN_ERR "cannot setup if %d: error %d\n",
 			   altsd->bInterfaceNumber, err);
@@ -147,7 +148,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
 
 	stream = (fp->endpoint & USB_DIR_IN)
 		? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
-	err = snd_usb_add_audio_endpoint(chip, stream, fp);
+	err = snd_usb_add_audio_stream(chip, stream, fp);
 	if (err < 0) {
 		kfree(fp);
 		kfree(rate_table);
@@ -254,7 +255,7 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
 
 	stream = (fp->endpoint & USB_DIR_IN)
 		? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
-	err = snd_usb_add_audio_endpoint(chip, stream, fp);
+	err = snd_usb_add_audio_stream(chip, stream, fp);
 	if (err < 0) {
 		kfree(fp);
 		return err;
sound/usb/stream.c new file +453 -0

453 lines not on this page · raw message

sound/usb/stream.h new file +12 -0
new file mode 100644
index 0000000..c97f679
@@ -0,0 +1,12 @@
+#ifndef __USBAUDIO_STREAM_H
+#define __USBAUDIO_STREAM_H
+
+int snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
+				  int iface_no);
+
+int snd_usb_add_audio_stream(struct snd_usb_audio *chip,
+			     int stream,
+			     struct audioformat *fp);
+
+#endif /* __USBAUDIO_STREAM_H */
+
Signature · 1 line
1.7.5.4
#6 lore raw

PATCH 4/4 ALSA: snd-usb: move code from urb.c to endpoint.c

In reply to Daniel Mack

No code altered at this point, simply preparing for upcoming refactorizations.

---
 sound/usb/Makefile   |    3 +-
 sound/usb/card.c     |    1 -
 sound/usb/endpoint.c |  924 +++++++++++++++++++++++++++++++++++++++++++++++++
 sound/usb/endpoint.h |   17 +
 sound/usb/pcm.c      |    2 +-
 sound/usb/stream.c   |    1 -
 sound/usb/urb.c      |  941 --------------------------------------------------
 sound/usb/urb.h      |   21 --
 8 files changed, 943 insertions(+), 967 deletions(-)
 delete mode 100644 sound/usb/urb.c
 delete mode 100644 sound/usb/urb.h
sound/usb/Makefile +1 -2
index 5390db0..ac256dc 100644
@@ -12,8 +12,7 @@ snd-usb-audio-objs := 	card.o \
 			pcm.o \
 			proc.o \
 			quirks.o \
-			stream.o \
-			urb.o
+			stream.o
 
 snd-usbmidi-lib-objs := midi.o
 
sound/usb/card.c +0 -1
index a3136af..d2a79d1 100644
@@ -65,7 +65,6 @@
 #include "helper.h"
 #include "debug.h"
 #include "pcm.h"
-#include "urb.h"
 #include "format.h"
 #include "power.h"
 #include "stream.h"
sound/usb/endpoint.c +924 -0

927 lines not on this page · raw message

sound/usb/endpoint.h +17 -0
index e5d8a6a..88eb63a 100644
@@ -1,4 +1,21 @@
 #ifndef __USBAUDIO_ENDPOINT_H
 #define __USBAUDIO_ENDPOINT_H
 
+void snd_usb_init_substream(struct snd_usb_stream *as,
+			    int stream,
+			    struct audioformat *fp);
+
+int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
+				unsigned int period_bytes,
+				unsigned int rate,
+				unsigned int frame_bits);
+
+void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force);
+
+int snd_usb_substream_prepare(struct snd_usb_substream *subs,
+			      struct snd_pcm_runtime *runtime);
+
+int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substream, int cmd);
+int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd);
+
 #endif /* __USBAUDIO_ENDPOINT_H */
sound/usb/pcm.c +1 -1
index b8dcbf4..1540e49 100644
@@ -28,7 +28,7 @@
 #include "card.h"
 #include "quirks.h"
 #include "debug.h"
-#include "urb.h"
+#include "endpoint.h"
 #include "helper.h"
 #include "pcm.h"
 #include "clock.h"
sound/usb/stream.c +0 -1
index 4688d4c..5ff8010 100644
@@ -29,7 +29,6 @@
 #include "proc.h"
 #include "quirks.h"
 #include "endpoint.h"
-#include "urb.h"
 #include "pcm.h"
 #include "helper.h"
 #include "format.h"
sound/usb/urb.c deleted +0 -941

941 lines not on this page · raw message

sound/usb/urb.h deleted +0 -21
deleted file mode 100644
index 888da38..0000000
@@ -1,21 +0,0 @@
-#ifndef __USBAUDIO_URB_H
-#define __USBAUDIO_URB_H
-
-void snd_usb_init_substream(struct snd_usb_stream *as,
-			    int stream,
-			    struct audioformat *fp);
-
-int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
-				unsigned int period_bytes,
-				unsigned int rate,
-				unsigned int frame_bits);
-
-void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force);
-
-int snd_usb_substream_prepare(struct snd_usb_substream *subs,
-			      struct snd_pcm_runtime *runtime);
-
-int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substream, int cmd);
-int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd);
-
-#endif /* __USBAUDIO_URB_H */
Signature · 1 line
1.7.5.4
#7 lore raw

Re: [PATCH 4/4] ALSA: snd-usb: move code from urb.c to endpoint.c

At Mon, 12 Sep 2011 18:54:13 +0200,

Quoted 5 lines · Daniel Mack

No code altered at this point, simply preparing for upcoming refactorizations.

Quoted 12 lines
---
 sound/usb/Makefile   |    3 +-
 sound/usb/card.c     |    1 -
 sound/usb/endpoint.c |  924 +++++++++++++++++++++++++++++++++++++++++++++++++
 sound/usb/endpoint.h |   17 +
 sound/usb/pcm.c      |    2 +-
 sound/usb/stream.c   |    1 -
 sound/usb/urb.c      |  941 --------------------------------------------------
 sound/usb/urb.h      |   21 --
 8 files changed, 943 insertions(+), 967 deletions(-)
 delete mode 100644 sound/usb/urb.c
 delete mode 100644 sound/usb/urb.h

This patch wasn't applied cleanly to my tree. urb.c was rejected. Could you refresh the patches based on the latest sound git tree?
git://github.com/tiwai/sound.git

The branch topic/misc should contain the latest status for USB.

thanks,

Takashi

#8 lore raw

Re: [PATCH 4/4] ALSA: snd-usb: move code from urb.c to endpoint.c

Quoted 20 lines · Takashi Iwai

At Mon, 12 Sep 2011 18:54:13 +0200,

Quoted 14 lines · Daniel Mack

No code altered at this point, simply preparing for upcoming refactorizations.

---
 sound/usb/Makefile   |    3 +-
 sound/usb/card.c     |    1 -
 sound/usb/endpoint.c |  924 +++++++++++++++++++++++++++++++++++++++++++++++++ sound/usb/endpoint.h |   17 +
 sound/usb/pcm.c      |    2 +-
 sound/usb/stream.c   |    1 -
 sound/usb/urb.c      |  941 -------------------------------------------------- sound/usb/urb.h      |   21 --

Quoted 3 lines
 8 files changed, 943 insertions(+), 967 deletions(-)

 delete mode 100644 sound/usb/urb.c
 delete mode 100644 sound/usb/urb.h

Quoted 5 lines

This patch wasn't applied cleanly to my tree.  urb.c was rejected. Could you refresh the patches based on the latest sound git tree?
  git://github.com/tiwai/sound.git

The branch topic/misc should contain the latest status for USB.

Ah, the reason for the conflict is that Pierre-Louis Bossart's delay information patch was merged before mine. New version coming up.

If that's easier, you can also pull from

git://github.com/zonque/linux-2.6.git usb-audio

Daniel

#9 lore raw

PATCH 4/4 ALSA: snd-usb: move code from urb.c to endpoint.c

In reply to Takashi Iwai

No code altered at this point, simply preparing for upcoming refactorizations.

---
 sound/usb/Makefile   |    3 +-
 sound/usb/card.c     |    1 -
 sound/usb/endpoint.c |  948 +++++++++++++++++++++++++++++++++++++++++++++++++
 sound/usb/endpoint.h |   17 +
 sound/usb/pcm.c      |    2 +-
 sound/usb/stream.c   |    1 -
 sound/usb/urb.c      |  965 --------------------------------------------------
 sound/usb/urb.h      |   21 --
 8 files changed, 967 insertions(+), 991 deletions(-)
 delete mode 100644 sound/usb/urb.c
 delete mode 100644 sound/usb/urb.h
sound/usb/Makefile +1 -2
index 5390db0..ac256dc 100644
@@ -12,8 +12,7 @@ snd-usb-audio-objs := 	card.o \
 			pcm.o \
 			proc.o \
 			quirks.o \
-			stream.o \
-			urb.o
+			stream.o
 
 snd-usbmidi-lib-objs := midi.o
 
sound/usb/card.c +0 -1
index a3136af..d2a79d1 100644
@@ -65,7 +65,6 @@
 #include "helper.h"
 #include "debug.h"
 #include "pcm.h"
-#include "urb.h"
 #include "format.h"
 #include "power.h"
 #include "stream.h"
sound/usb/endpoint.c +948 -0

951 lines not on this page · raw message

sound/usb/endpoint.h +17 -0
index e5d8a6a..88eb63a 100644
@@ -1,4 +1,21 @@
 #ifndef __USBAUDIO_ENDPOINT_H
 #define __USBAUDIO_ENDPOINT_H
 
+void snd_usb_init_substream(struct snd_usb_stream *as,
+			    int stream,
+			    struct audioformat *fp);
+
+int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
+				unsigned int period_bytes,
+				unsigned int rate,
+				unsigned int frame_bits);
+
+void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force);
+
+int snd_usb_substream_prepare(struct snd_usb_substream *subs,
+			      struct snd_pcm_runtime *runtime);
+
+int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substream, int cmd);
+int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd);
+
 #endif /* __USBAUDIO_ENDPOINT_H */
sound/usb/pcm.c +1 -1
index 0b699ca..b5bc870 100644
@@ -28,7 +28,7 @@
 #include "card.h"
 #include "quirks.h"
 #include "debug.h"
-#include "urb.h"
+#include "endpoint.h"
 #include "helper.h"
 #include "pcm.h"
 #include "clock.h"
sound/usb/stream.c +0 -1
index 4688d4c..5ff8010 100644
@@ -29,7 +29,6 @@
 #include "proc.h"
 #include "quirks.h"
 #include "endpoint.h"
-#include "urb.h"
 #include "pcm.h"
 #include "helper.h"
 #include "format.h"
sound/usb/urb.c deleted +0 -965

965 lines not on this page · raw message

sound/usb/urb.h deleted +0 -21
deleted file mode 100644
index 888da38..0000000
@@ -1,21 +0,0 @@
-#ifndef __USBAUDIO_URB_H
-#define __USBAUDIO_URB_H
-
-void snd_usb_init_substream(struct snd_usb_stream *as,
-			    int stream,
-			    struct audioformat *fp);
-
-int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
-				unsigned int period_bytes,
-				unsigned int rate,
-				unsigned int frame_bits);
-
-void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force);
-
-int snd_usb_substream_prepare(struct snd_usb_substream *subs,
-			      struct snd_pcm_runtime *runtime);
-
-int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substream, int cmd);
-int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd);
-
-#endif /* __USBAUDIO_URB_H */
Signature · 1 line
1.7.5.4
#12 lore raw
Quoted 8 lines · Clemens Ladisch
Quoted 3 lines · Daniel Mack

I prepared a subset of my work on the generic USB audio driver that doesn't actually change any logic but just moves around major chunks of code.

all four:

Takashi, are you ok with these changes?

Daniel

#13 lore raw

At Wed, 14 Sep 2011 10:27:09 +0200,

Quoted 7 lines · Daniel Mack
Quoted 5 lines · Clemens Ladisch
Quoted 3 lines · Daniel Mack

I prepared a subset of my work on the generic USB audio driver that doesn't actually change any logic but just moves around major chunks of code.

Quoted 5 lines
Quoted 3 lines

all four:

Takashi, are you ok with these changes?

Yes, I'm fine with them. I'll ask Greg (he's around here for a conference) whether he doesn't mind changing usb/ch9.h, then apply to sound git tree.

thanks,

Takashi