aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:08:02 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:19:55 -0500
commit86e07d34658bb85b3424f4db64fa28f884edbe8d (patch)
treeeb6a97b850d12d2f64fa13cd1c436f0735627171 /sound/usb
parentdb13154843cb2c99a93e9feed575e906f6e0e455 (diff)
[ALSA] Remove xxx_t typedefs: USB-Audio
Modules: USB generic driver Remove xxx_t typedefs from the USB-Audio driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c374
-rw-r--r--sound/usb/usbaudio.h16
-rw-r--r--sound/usb/usbmidi.c211
-rw-r--r--sound/usb/usbmixer.c183
-rw-r--r--sound/usb/usbquirks.h270
5 files changed, 521 insertions, 533 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 99dae024b640..e1326704c0c5 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -102,10 +102,6 @@ MODULE_PARM_DESC(async_unlink, "Use async unlink mode.");
102#define SYNC_URBS 4 /* always four urbs for sync */ 102#define SYNC_URBS 4 /* always four urbs for sync */
103#define MIN_PACKS_URB 1 /* minimum 1 packet per urb */ 103#define MIN_PACKS_URB 1 /* minimum 1 packet per urb */
104 104
105typedef struct snd_usb_substream snd_usb_substream_t;
106typedef struct snd_usb_stream snd_usb_stream_t;
107typedef struct snd_urb_ctx snd_urb_ctx_t;
108
109struct audioformat { 105struct audioformat {
110 struct list_head list; 106 struct list_head list;
111 snd_pcm_format_t format; /* format type */ 107 snd_pcm_format_t format; /* format type */
@@ -125,25 +121,27 @@ struct audioformat {
125 unsigned int *rate_table; /* rate table */ 121 unsigned int *rate_table; /* rate table */
126}; 122};
127 123
124struct snd_usb_substream;
125
128struct snd_urb_ctx { 126struct snd_urb_ctx {
129 struct urb *urb; 127 struct urb *urb;
130 unsigned int buffer_size; /* size of data buffer, if data URB */ 128 unsigned int buffer_size; /* size of data buffer, if data URB */
131 snd_usb_substream_t *subs; 129 struct snd_usb_substream *subs;
132 int index; /* index for urb array */ 130 int index; /* index for urb array */
133 int packets; /* number of packets per urb */ 131 int packets; /* number of packets per urb */
134}; 132};
135 133
136struct snd_urb_ops { 134struct snd_urb_ops {
137 int (*prepare)(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime, struct urb *u); 135 int (*prepare)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
138 int (*retire)(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime, struct urb *u); 136 int (*retire)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
139 int (*prepare_sync)(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime, struct urb *u); 137 int (*prepare_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
140 int (*retire_sync)(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime, struct urb *u); 138 int (*retire_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
141}; 139};
142 140
143struct snd_usb_substream { 141struct snd_usb_substream {
144 snd_usb_stream_t *stream; 142 struct snd_usb_stream *stream;
145 struct usb_device *dev; 143 struct usb_device *dev;
146 snd_pcm_substream_t *pcm_substream; 144 struct snd_pcm_substream *pcm_substream;
147 int direction; /* playback or capture */ 145 int direction; /* playback or capture */
148 int interface; /* current interface */ 146 int interface; /* current interface */
149 int endpoint; /* assigned endpoint */ 147 int endpoint; /* assigned endpoint */
@@ -175,8 +173,8 @@ struct snd_usb_substream {
175 unsigned long unlink_mask; /* bitmask of unlinked urbs */ 173 unsigned long unlink_mask; /* bitmask of unlinked urbs */
176 174
177 unsigned int nurbs; /* # urbs */ 175 unsigned int nurbs; /* # urbs */
178 snd_urb_ctx_t dataurb[MAX_URBS]; /* data urb table */ 176 struct snd_urb_ctx dataurb[MAX_URBS]; /* data urb table */
179 snd_urb_ctx_t syncurb[SYNC_URBS]; /* sync urb table */ 177 struct snd_urb_ctx syncurb[SYNC_URBS]; /* sync urb table */
180 char *syncbuf; /* sync buffer for all sync URBs */ 178 char *syncbuf; /* sync buffer for all sync URBs */
181 dma_addr_t sync_dma; /* DMA address of syncbuf */ 179 dma_addr_t sync_dma; /* DMA address of syncbuf */
182 180
@@ -190,11 +188,11 @@ struct snd_usb_substream {
190 188
191 189
192struct snd_usb_stream { 190struct snd_usb_stream {
193 snd_usb_audio_t *chip; 191 struct snd_usb_audio *chip;
194 snd_pcm_t *pcm; 192 struct snd_pcm *pcm;
195 int pcm_index; 193 int pcm_index;
196 unsigned int fmt_type; /* USB audio format type (1-3) */ 194 unsigned int fmt_type; /* USB audio format type (1-3) */
197 snd_usb_substream_t substream[2]; 195 struct snd_usb_substream substream[2];
198 struct list_head list; 196 struct list_head list;
199}; 197};
200 198
@@ -205,7 +203,7 @@ struct snd_usb_stream {
205 */ 203 */
206 204
207static DECLARE_MUTEX(register_mutex); 205static DECLARE_MUTEX(register_mutex);
208static snd_usb_audio_t *usb_chip[SNDRV_CARDS]; 206static struct snd_usb_audio *usb_chip[SNDRV_CARDS];
209 207
210 208
211/* 209/*
@@ -245,12 +243,12 @@ static inline unsigned get_high_speed_hz(unsigned int usb_rate)
245 * fill the length and offset of each urb descriptor. 243 * fill the length and offset of each urb descriptor.
246 * the fixed 10.14 frequency is passed through the pipe. 244 * the fixed 10.14 frequency is passed through the pipe.
247 */ 245 */
248static int prepare_capture_sync_urb(snd_usb_substream_t *subs, 246static int prepare_capture_sync_urb(struct snd_usb_substream *subs,
249 snd_pcm_runtime_t *runtime, 247 struct snd_pcm_runtime *runtime,
250 struct urb *urb) 248 struct urb *urb)
251{ 249{
252 unsigned char *cp = urb->transfer_buffer; 250 unsigned char *cp = urb->transfer_buffer;
253 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 251 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
254 252
255 urb->dev = ctx->subs->dev; /* we need to set this at each time */ 253 urb->dev = ctx->subs->dev; /* we need to set this at each time */
256 urb->iso_frame_desc[0].length = 3; 254 urb->iso_frame_desc[0].length = 3;
@@ -267,12 +265,12 @@ static int prepare_capture_sync_urb(snd_usb_substream_t *subs,
267 * fill the length and offset of each urb descriptor. 265 * fill the length and offset of each urb descriptor.
268 * the fixed 12.13 frequency is passed as 16.16 through the pipe. 266 * the fixed 12.13 frequency is passed as 16.16 through the pipe.
269 */ 267 */
270static int prepare_capture_sync_urb_hs(snd_usb_substream_t *subs, 268static int prepare_capture_sync_urb_hs(struct snd_usb_substream *subs,
271 snd_pcm_runtime_t *runtime, 269 struct snd_pcm_runtime *runtime,
272 struct urb *urb) 270 struct urb *urb)
273{ 271{
274 unsigned char *cp = urb->transfer_buffer; 272 unsigned char *cp = urb->transfer_buffer;
275 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 273 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
276 274
277 urb->dev = ctx->subs->dev; /* we need to set this at each time */ 275 urb->dev = ctx->subs->dev; /* we need to set this at each time */
278 urb->iso_frame_desc[0].length = 4; 276 urb->iso_frame_desc[0].length = 4;
@@ -288,8 +286,8 @@ static int prepare_capture_sync_urb_hs(snd_usb_substream_t *subs,
288 * process after capture sync complete 286 * process after capture sync complete
289 * - nothing to do 287 * - nothing to do
290 */ 288 */
291static int retire_capture_sync_urb(snd_usb_substream_t *subs, 289static int retire_capture_sync_urb(struct snd_usb_substream *subs,
292 snd_pcm_runtime_t *runtime, 290 struct snd_pcm_runtime *runtime,
293 struct urb *urb) 291 struct urb *urb)
294{ 292{
295 return 0; 293 return 0;
@@ -305,12 +303,12 @@ static int retire_capture_sync_urb(snd_usb_substream_t *subs,
305 * write onto the pcm buffer directly... the data is thus copied 303 * write onto the pcm buffer directly... the data is thus copied
306 * later at complete callback to the global buffer. 304 * later at complete callback to the global buffer.
307 */ 305 */
308static int prepare_capture_urb(snd_usb_substream_t *subs, 306static int prepare_capture_urb(struct snd_usb_substream *subs,
309 snd_pcm_runtime_t *runtime, 307 struct snd_pcm_runtime *runtime,
310 struct urb *urb) 308 struct urb *urb)
311{ 309{
312 int i, offs; 310 int i, offs;
313 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 311 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
314 312
315 offs = 0; 313 offs = 0;
316 urb->dev = ctx->subs->dev; /* we need to set this at each time */ 314 urb->dev = ctx->subs->dev; /* we need to set this at each time */
@@ -340,8 +338,8 @@ static int prepare_capture_urb(snd_usb_substream_t *subs,
340 * copy the data from each desctiptor to the pcm buffer, and 338 * copy the data from each desctiptor to the pcm buffer, and
341 * update the current position. 339 * update the current position.
342 */ 340 */
343static int retire_capture_urb(snd_usb_substream_t *subs, 341static int retire_capture_urb(struct snd_usb_substream *subs,
344 snd_pcm_runtime_t *runtime, 342 struct snd_pcm_runtime *runtime,
345 struct urb *urb) 343 struct urb *urb)
346{ 344{
347 unsigned long flags; 345 unsigned long flags;
@@ -395,11 +393,11 @@ static int retire_capture_urb(snd_usb_substream_t *subs,
395 * set up the offset and length to receive the current frequency. 393 * set up the offset and length to receive the current frequency.
396 */ 394 */
397 395
398static int prepare_playback_sync_urb(snd_usb_substream_t *subs, 396static int prepare_playback_sync_urb(struct snd_usb_substream *subs,
399 snd_pcm_runtime_t *runtime, 397 struct snd_pcm_runtime *runtime,
400 struct urb *urb) 398 struct urb *urb)
401{ 399{
402 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 400 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
403 401
404 urb->dev = ctx->subs->dev; /* we need to set this at each time */ 402 urb->dev = ctx->subs->dev; /* we need to set this at each time */
405 urb->iso_frame_desc[0].length = 3; 403 urb->iso_frame_desc[0].length = 3;
@@ -413,11 +411,11 @@ static int prepare_playback_sync_urb(snd_usb_substream_t *subs,
413 * set up the offset and length to receive the current frequency. 411 * set up the offset and length to receive the current frequency.
414 */ 412 */
415 413
416static int prepare_playback_sync_urb_hs(snd_usb_substream_t *subs, 414static int prepare_playback_sync_urb_hs(struct snd_usb_substream *subs,
417 snd_pcm_runtime_t *runtime, 415 struct snd_pcm_runtime *runtime,
418 struct urb *urb) 416 struct urb *urb)
419{ 417{
420 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 418 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
421 419
422 urb->dev = ctx->subs->dev; /* we need to set this at each time */ 420 urb->dev = ctx->subs->dev; /* we need to set this at each time */
423 urb->iso_frame_desc[0].length = 4; 421 urb->iso_frame_desc[0].length = 4;
@@ -431,8 +429,8 @@ static int prepare_playback_sync_urb_hs(snd_usb_substream_t *subs,
431 * retrieve the current 10.14 frequency from pipe, and set it. 429 * retrieve the current 10.14 frequency from pipe, and set it.
432 * the value is referred in prepare_playback_urb(). 430 * the value is referred in prepare_playback_urb().
433 */ 431 */
434static int retire_playback_sync_urb(snd_usb_substream_t *subs, 432static int retire_playback_sync_urb(struct snd_usb_substream *subs,
435 snd_pcm_runtime_t *runtime, 433 struct snd_pcm_runtime *runtime,
436 struct urb *urb) 434 struct urb *urb)
437{ 435{
438 unsigned int f; 436 unsigned int f;
@@ -457,8 +455,8 @@ static int retire_playback_sync_urb(snd_usb_substream_t *subs,
457 * retrieve the current 12.13 frequency from pipe, and set it. 455 * retrieve the current 12.13 frequency from pipe, and set it.
458 * the value is referred in prepare_playback_urb(). 456 * the value is referred in prepare_playback_urb().
459 */ 457 */
460static int retire_playback_sync_urb_hs(snd_usb_substream_t *subs, 458static int retire_playback_sync_urb_hs(struct snd_usb_substream *subs,
461 snd_pcm_runtime_t *runtime, 459 struct snd_pcm_runtime *runtime,
462 struct urb *urb) 460 struct urb *urb)
463{ 461{
464 unsigned int f; 462 unsigned int f;
@@ -482,12 +480,12 @@ static int retire_playback_sync_urb_hs(snd_usb_substream_t *subs,
482 * 480 *
483 * We don't care about (or have) any data, so we just send a transfer delimiter. 481 * We don't care about (or have) any data, so we just send a transfer delimiter.
484 */ 482 */
485static int prepare_startup_playback_urb(snd_usb_substream_t *subs, 483static int prepare_startup_playback_urb(struct snd_usb_substream *subs,
486 snd_pcm_runtime_t *runtime, 484 struct snd_pcm_runtime *runtime,
487 struct urb *urb) 485 struct urb *urb)
488{ 486{
489 unsigned int i; 487 unsigned int i;
490 snd_urb_ctx_t *ctx = urb->context; 488 struct snd_urb_ctx *ctx = urb->context;
491 489
492 urb->dev = ctx->subs->dev; 490 urb->dev = ctx->subs->dev;
493 urb->number_of_packets = subs->packs_per_ms; 491 urb->number_of_packets = subs->packs_per_ms;
@@ -507,15 +505,15 @@ static int prepare_startup_playback_urb(snd_usb_substream_t *subs,
507 * To avoid inconsistencies when updating hwptr_done, we use double buffering 505 * To avoid inconsistencies when updating hwptr_done, we use double buffering
508 * for all URBs. 506 * for all URBs.
509 */ 507 */
510static int prepare_playback_urb(snd_usb_substream_t *subs, 508static int prepare_playback_urb(struct snd_usb_substream *subs,
511 snd_pcm_runtime_t *runtime, 509 struct snd_pcm_runtime *runtime,
512 struct urb *urb) 510 struct urb *urb)
513{ 511{
514 int i, stride, offs; 512 int i, stride, offs;
515 unsigned int counts; 513 unsigned int counts;
516 unsigned long flags; 514 unsigned long flags;
517 int period_elapsed = 0; 515 int period_elapsed = 0;
518 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 516 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
519 517
520 stride = runtime->frame_bits >> 3; 518 stride = runtime->frame_bits >> 3;
521 519
@@ -597,8 +595,8 @@ static int prepare_playback_urb(snd_usb_substream_t *subs,
597 * process after playback data complete 595 * process after playback data complete
598 * - nothing to do 596 * - nothing to do
599 */ 597 */
600static int retire_playback_urb(snd_usb_substream_t *subs, 598static int retire_playback_urb(struct snd_usb_substream *subs,
601 snd_pcm_runtime_t *runtime, 599 struct snd_pcm_runtime *runtime,
602 struct urb *urb) 600 struct urb *urb)
603{ 601{
604 return 0; 602 return 0;
@@ -642,9 +640,9 @@ static struct snd_urb_ops audio_urb_ops_high_speed[2] = {
642 */ 640 */
643static void snd_complete_urb(struct urb *urb, struct pt_regs *regs) 641static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
644{ 642{
645 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 643 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
646 snd_usb_substream_t *subs = ctx->subs; 644 struct snd_usb_substream *subs = ctx->subs;
647 snd_pcm_substream_t *substream = ctx->subs->pcm_substream; 645 struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
648 int err = 0; 646 int err = 0;
649 647
650 if ((subs->running && subs->ops.retire(subs, substream->runtime, urb)) || 648 if ((subs->running && subs->ops.retire(subs, substream->runtime, urb)) ||
@@ -665,9 +663,9 @@ static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
665 */ 663 */
666static void snd_complete_sync_urb(struct urb *urb, struct pt_regs *regs) 664static void snd_complete_sync_urb(struct urb *urb, struct pt_regs *regs)
667{ 665{
668 snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context; 666 struct snd_urb_ctx *ctx = (struct snd_urb_ctx *)urb->context;
669 snd_usb_substream_t *subs = ctx->subs; 667 struct snd_usb_substream *subs = ctx->subs;
670 snd_pcm_substream_t *substream = ctx->subs->pcm_substream; 668 struct snd_pcm_substream *substream = ctx->subs->pcm_substream;
671 int err = 0; 669 int err = 0;
672 670
673 if ((subs->running && subs->ops.retire_sync(subs, substream->runtime, urb)) || 671 if ((subs->running && subs->ops.retire_sync(subs, substream->runtime, urb)) ||
@@ -684,7 +682,7 @@ static void snd_complete_sync_urb(struct urb *urb, struct pt_regs *regs)
684 682
685 683
686/* get the physical page pointer at the given offset */ 684/* get the physical page pointer at the given offset */
687static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, 685static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
688 unsigned long offset) 686 unsigned long offset)
689{ 687{
690 void *pageptr = subs->runtime->dma_area + offset; 688 void *pageptr = subs->runtime->dma_area + offset;
@@ -692,9 +690,9 @@ static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs,
692} 690}
693 691
694/* allocate virtual buffer; may be called more than once */ 692/* allocate virtual buffer; may be called more than once */
695static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) 693static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size)
696{ 694{
697 snd_pcm_runtime_t *runtime = subs->runtime; 695 struct snd_pcm_runtime *runtime = subs->runtime;
698 if (runtime->dma_area) { 696 if (runtime->dma_area) {
699 if (runtime->dma_bytes >= size) 697 if (runtime->dma_bytes >= size)
700 return 0; /* already large enough */ 698 return 0; /* already large enough */
@@ -708,9 +706,9 @@ static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size)
708} 706}
709 707
710/* free virtual buffer; may be called more than once */ 708/* free virtual buffer; may be called more than once */
711static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) 709static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
712{ 710{
713 snd_pcm_runtime_t *runtime = subs->runtime; 711 struct snd_pcm_runtime *runtime = subs->runtime;
714 if (runtime->dma_area) { 712 if (runtime->dma_area) {
715 vfree(runtime->dma_area); 713 vfree(runtime->dma_area);
716 runtime->dma_area = NULL; 714 runtime->dma_area = NULL;
@@ -722,7 +720,7 @@ static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs)
722/* 720/*
723 * unlink active urbs. 721 * unlink active urbs.
724 */ 722 */
725static int deactivate_urbs(snd_usb_substream_t *subs, int force, int can_sleep) 723static int deactivate_urbs(struct snd_usb_substream *subs, int force, int can_sleep)
726{ 724{
727 unsigned int i; 725 unsigned int i;
728 int async; 726 int async;
@@ -768,7 +766,7 @@ static int deactivate_urbs(snd_usb_substream_t *subs, int force, int can_sleep)
768/* 766/*
769 * set up and start data/sync urbs 767 * set up and start data/sync urbs
770 */ 768 */
771static int start_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime) 769static int start_urbs(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime)
772{ 770{
773 unsigned int i; 771 unsigned int i;
774 int err; 772 int err;
@@ -824,7 +822,7 @@ static int start_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime)
824/* 822/*
825 * wait until all urbs are processed. 823 * wait until all urbs are processed.
826 */ 824 */
827static int wait_clear_urbs(snd_usb_substream_t *subs) 825static int wait_clear_urbs(struct snd_usb_substream *subs)
828{ 826{
829 unsigned long end_time = jiffies + msecs_to_jiffies(1000); 827 unsigned long end_time = jiffies + msecs_to_jiffies(1000);
830 unsigned int i; 828 unsigned int i;
@@ -855,12 +853,12 @@ static int wait_clear_urbs(snd_usb_substream_t *subs)
855/* 853/*
856 * return the current pcm pointer. just return the hwptr_done value. 854 * return the current pcm pointer. just return the hwptr_done value.
857 */ 855 */
858static snd_pcm_uframes_t snd_usb_pcm_pointer(snd_pcm_substream_t *substream) 856static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream *substream)
859{ 857{
860 snd_usb_substream_t *subs; 858 struct snd_usb_substream *subs;
861 snd_pcm_uframes_t hwptr_done; 859 snd_pcm_uframes_t hwptr_done;
862 860
863 subs = (snd_usb_substream_t *)substream->runtime->private_data; 861 subs = (struct snd_usb_substream *)substream->runtime->private_data;
864 spin_lock(&subs->lock); 862 spin_lock(&subs->lock);
865 hwptr_done = subs->hwptr_done; 863 hwptr_done = subs->hwptr_done;
866 spin_unlock(&subs->lock); 864 spin_unlock(&subs->lock);
@@ -871,10 +869,10 @@ static snd_pcm_uframes_t snd_usb_pcm_pointer(snd_pcm_substream_t *substream)
871/* 869/*
872 * start/stop playback substream 870 * start/stop playback substream
873 */ 871 */
874static int snd_usb_pcm_playback_trigger(snd_pcm_substream_t *substream, 872static int snd_usb_pcm_playback_trigger(struct snd_pcm_substream *substream,
875 int cmd) 873 int cmd)
876{ 874{
877 snd_usb_substream_t *subs = substream->runtime->private_data; 875 struct snd_usb_substream *subs = substream->runtime->private_data;
878 876
879 switch (cmd) { 877 switch (cmd) {
880 case SNDRV_PCM_TRIGGER_START: 878 case SNDRV_PCM_TRIGGER_START:
@@ -890,10 +888,10 @@ static int snd_usb_pcm_playback_trigger(snd_pcm_substream_t *substream,
890/* 888/*
891 * start/stop capture substream 889 * start/stop capture substream
892 */ 890 */
893static int snd_usb_pcm_capture_trigger(snd_pcm_substream_t *substream, 891static int snd_usb_pcm_capture_trigger(struct snd_pcm_substream *substream,
894 int cmd) 892 int cmd)
895{ 893{
896 snd_usb_substream_t *subs = substream->runtime->private_data; 894 struct snd_usb_substream *subs = substream->runtime->private_data;
897 895
898 switch (cmd) { 896 switch (cmd) {
899 case SNDRV_PCM_TRIGGER_START: 897 case SNDRV_PCM_TRIGGER_START:
@@ -909,7 +907,7 @@ static int snd_usb_pcm_capture_trigger(snd_pcm_substream_t *substream,
909/* 907/*
910 * release a urb data 908 * release a urb data
911 */ 909 */
912static void release_urb_ctx(snd_urb_ctx_t *u) 910static void release_urb_ctx(struct snd_urb_ctx *u)
913{ 911{
914 if (u->urb) { 912 if (u->urb) {
915 if (u->buffer_size) 913 if (u->buffer_size)
@@ -924,7 +922,7 @@ static void release_urb_ctx(snd_urb_ctx_t *u)
924/* 922/*
925 * release a substream 923 * release a substream
926 */ 924 */
927static void release_substream_urbs(snd_usb_substream_t *subs, int force) 925static void release_substream_urbs(struct snd_usb_substream *subs, int force)
928{ 926{
929 int i; 927 int i;
930 928
@@ -945,7 +943,7 @@ static void release_substream_urbs(snd_usb_substream_t *subs, int force)
945/* 943/*
946 * initialize a substream for plaback/capture 944 * initialize a substream for plaback/capture
947 */ 945 */
948static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_bytes, 946static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int period_bytes,
949 unsigned int rate, unsigned int frame_bits) 947 unsigned int rate, unsigned int frame_bits)
950{ 948{
951 unsigned int maxsize, n, i; 949 unsigned int maxsize, n, i;
@@ -1045,7 +1043,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by
1045 1043
1046 /* allocate and initialize data urbs */ 1044 /* allocate and initialize data urbs */
1047 for (i = 0; i < subs->nurbs; i++) { 1045 for (i = 0; i < subs->nurbs; i++) {
1048 snd_urb_ctx_t *u = &subs->dataurb[i]; 1046 struct snd_urb_ctx *u = &subs->dataurb[i];
1049 u->index = i; 1047 u->index = i;
1050 u->subs = subs; 1048 u->subs = subs;
1051 u->packets = npacks[i]; 1049 u->packets = npacks[i];
@@ -1074,7 +1072,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by
1074 if (! subs->syncbuf) 1072 if (! subs->syncbuf)
1075 goto out_of_memory; 1073 goto out_of_memory;
1076 for (i = 0; i < SYNC_URBS; i++) { 1074 for (i = 0; i < SYNC_URBS; i++) {
1077 snd_urb_ctx_t *u = &subs->syncurb[i]; 1075 struct snd_urb_ctx *u = &subs->syncurb[i];
1078 u->index = i; 1076 u->index = i;
1079 u->subs = subs; 1077 u->subs = subs;
1080 u->packets = 1; 1078 u->packets = 1;
@@ -1104,7 +1102,7 @@ out_of_memory:
1104/* 1102/*
1105 * find a matching audio format 1103 * find a matching audio format
1106 */ 1104 */
1107static struct audioformat *find_format(snd_usb_substream_t *subs, unsigned int format, 1105static struct audioformat *find_format(struct snd_usb_substream *subs, unsigned int format,
1108 unsigned int rate, unsigned int channels) 1106 unsigned int rate, unsigned int channels)
1109{ 1107{
1110 struct list_head *p; 1108 struct list_head *p;
@@ -1229,7 +1227,7 @@ static int init_usb_sample_rate(struct usb_device *dev, int iface,
1229/* 1227/*
1230 * find a matching format and set up the interface 1228 * find a matching format and set up the interface
1231 */ 1229 */
1232static int set_format(snd_usb_substream_t *subs, struct audioformat *fmt) 1230static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
1233{ 1231{
1234 struct usb_device *dev = subs->dev; 1232 struct usb_device *dev = subs->dev;
1235 struct usb_host_interface *alts; 1233 struct usb_host_interface *alts;
@@ -1358,10 +1356,10 @@ static int set_format(snd_usb_substream_t *subs, struct audioformat *fmt)
1358 * if sg buffer is supported on the later version of alsa, we'll follow 1356 * if sg buffer is supported on the later version of alsa, we'll follow
1359 * that. 1357 * that.
1360 */ 1358 */
1361static int snd_usb_hw_params(snd_pcm_substream_t *substream, 1359static int snd_usb_hw_params(struct snd_pcm_substream *substream,
1362 snd_pcm_hw_params_t *hw_params) 1360 struct snd_pcm_hw_params *hw_params)
1363{ 1361{
1364 snd_usb_substream_t *subs = (snd_usb_substream_t *)substream->runtime->private_data; 1362 struct snd_usb_substream *subs = (struct snd_usb_substream *)substream->runtime->private_data;
1365 struct audioformat *fmt; 1363 struct audioformat *fmt;
1366 unsigned int channels, rate, format; 1364 unsigned int channels, rate, format;
1367 int ret, changed; 1365 int ret, changed;
@@ -1415,9 +1413,9 @@ static int snd_usb_hw_params(snd_pcm_substream_t *substream,
1415 * 1413 *
1416 * reset the audio format and release the buffer 1414 * reset the audio format and release the buffer
1417 */ 1415 */
1418static int snd_usb_hw_free(snd_pcm_substream_t *substream) 1416static int snd_usb_hw_free(struct snd_pcm_substream *substream)
1419{ 1417{
1420 snd_usb_substream_t *subs = (snd_usb_substream_t *)substream->runtime->private_data; 1418 struct snd_usb_substream *subs = (struct snd_usb_substream *)substream->runtime->private_data;
1421 1419
1422 subs->cur_audiofmt = NULL; 1420 subs->cur_audiofmt = NULL;
1423 subs->cur_rate = 0; 1421 subs->cur_rate = 0;
@@ -1431,10 +1429,10 @@ static int snd_usb_hw_free(snd_pcm_substream_t *substream)
1431 * 1429 *
1432 * only a few subtle things... 1430 * only a few subtle things...
1433 */ 1431 */
1434static int snd_usb_pcm_prepare(snd_pcm_substream_t *substream) 1432static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
1435{ 1433{
1436 snd_pcm_runtime_t *runtime = substream->runtime; 1434 struct snd_pcm_runtime *runtime = substream->runtime;
1437 snd_usb_substream_t *subs = runtime->private_data; 1435 struct snd_usb_substream *subs = runtime->private_data;
1438 1436
1439 if (! subs->cur_audiofmt) { 1437 if (! subs->cur_audiofmt) {
1440 snd_printk(KERN_ERR "usbaudio: no format is specified!\n"); 1438 snd_printk(KERN_ERR "usbaudio: no format is specified!\n");
@@ -1463,7 +1461,7 @@ static int snd_usb_pcm_prepare(snd_pcm_substream_t *substream)
1463 return 0; 1461 return 0;
1464} 1462}
1465 1463
1466static snd_pcm_hardware_t snd_usb_playback = 1464static struct snd_pcm_hardware snd_usb_playback =
1467{ 1465{
1468 .info = SNDRV_PCM_INFO_MMAP | 1466 .info = SNDRV_PCM_INFO_MMAP |
1469 SNDRV_PCM_INFO_MMAP_VALID | 1467 SNDRV_PCM_INFO_MMAP_VALID |
@@ -1477,7 +1475,7 @@ static snd_pcm_hardware_t snd_usb_playback =
1477 .periods_max = 1024, 1475 .periods_max = 1024,
1478}; 1476};
1479 1477
1480static snd_pcm_hardware_t snd_usb_capture = 1478static struct snd_pcm_hardware snd_usb_capture =
1481{ 1479{
1482 .info = SNDRV_PCM_INFO_MMAP | 1480 .info = SNDRV_PCM_INFO_MMAP |
1483 SNDRV_PCM_INFO_MMAP_VALID | 1481 SNDRV_PCM_INFO_MMAP_VALID |
@@ -1501,11 +1499,11 @@ static snd_pcm_hardware_t snd_usb_capture =
1501#define hwc_debug(fmt, args...) /**/ 1499#define hwc_debug(fmt, args...) /**/
1502#endif 1500#endif
1503 1501
1504static int hw_check_valid_format(snd_pcm_hw_params_t *params, struct audioformat *fp) 1502static int hw_check_valid_format(struct snd_pcm_hw_params *params, struct audioformat *fp)
1505{ 1503{
1506 snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 1504 struct snd_interval *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
1507 snd_interval_t *ct = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 1505 struct snd_interval *ct = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
1508 snd_mask_t *fmts = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 1506 struct snd_mask *fmts = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
1509 1507
1510 /* check the format */ 1508 /* check the format */
1511 if (! snd_mask_test(fmts, fp->format)) { 1509 if (! snd_mask_test(fmts, fp->format)) {
@@ -1529,12 +1527,12 @@ static int hw_check_valid_format(snd_pcm_hw_params_t *params, struct audioformat
1529 return 1; 1527 return 1;
1530} 1528}
1531 1529
1532static int hw_rule_rate(snd_pcm_hw_params_t *params, 1530static int hw_rule_rate(struct snd_pcm_hw_params *params,
1533 snd_pcm_hw_rule_t *rule) 1531 struct snd_pcm_hw_rule *rule)
1534{ 1532{
1535 snd_usb_substream_t *subs = rule->private; 1533 struct snd_usb_substream *subs = rule->private;
1536 struct list_head *p; 1534 struct list_head *p;
1537 snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 1535 struct snd_interval *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
1538 unsigned int rmin, rmax; 1536 unsigned int rmin, rmax;
1539 int changed; 1537 int changed;
1540 1538
@@ -1583,12 +1581,12 @@ static int hw_rule_rate(snd_pcm_hw_params_t *params,
1583} 1581}
1584 1582
1585 1583
1586static int hw_rule_channels(snd_pcm_hw_params_t *params, 1584static int hw_rule_channels(struct snd_pcm_hw_params *params,
1587 snd_pcm_hw_rule_t *rule) 1585 struct snd_pcm_hw_rule *rule)
1588{ 1586{
1589 snd_usb_substream_t *subs = rule->private; 1587 struct snd_usb_substream *subs = rule->private;
1590 struct list_head *p; 1588 struct list_head *p;
1591 snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 1589 struct snd_interval *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
1592 unsigned int rmin, rmax; 1590 unsigned int rmin, rmax;
1593 int changed; 1591 int changed;
1594 1592
@@ -1636,12 +1634,12 @@ static int hw_rule_channels(snd_pcm_hw_params_t *params,
1636 return changed; 1634 return changed;
1637} 1635}
1638 1636
1639static int hw_rule_format(snd_pcm_hw_params_t *params, 1637static int hw_rule_format(struct snd_pcm_hw_params *params,
1640 snd_pcm_hw_rule_t *rule) 1638 struct snd_pcm_hw_rule *rule)
1641{ 1639{
1642 snd_usb_substream_t *subs = rule->private; 1640 struct snd_usb_substream *subs = rule->private;
1643 struct list_head *p; 1641 struct list_head *p;
1644 snd_mask_t *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 1642 struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
1645 u64 fbits; 1643 u64 fbits;
1646 u32 oldbits[2]; 1644 u32 oldbits[2];
1647 int changed; 1645 int changed;
@@ -1674,7 +1672,7 @@ static int hw_rule_format(snd_pcm_hw_params_t *params,
1674/* 1672/*
1675 * check whether the registered audio formats need special hw-constraints 1673 * check whether the registered audio formats need special hw-constraints
1676 */ 1674 */
1677static int check_hw_params_convention(snd_usb_substream_t *subs) 1675static int check_hw_params_convention(struct snd_usb_substream *subs)
1678{ 1676{
1679 int i; 1677 int i;
1680 u32 *channels; 1678 u32 *channels;
@@ -1758,7 +1756,7 @@ static int check_hw_params_convention(snd_usb_substream_t *subs)
1758 * set up the runtime hardware information. 1756 * set up the runtime hardware information.
1759 */ 1757 */
1760 1758
1761static int setup_hw_info(snd_pcm_runtime_t *runtime, snd_usb_substream_t *subs) 1759static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs)
1762{ 1760{
1763 struct list_head *p; 1761 struct list_head *p;
1764 int err; 1762 int err;
@@ -1819,12 +1817,12 @@ static int setup_hw_info(snd_pcm_runtime_t *runtime, snd_usb_substream_t *subs)
1819 return 0; 1817 return 0;
1820} 1818}
1821 1819
1822static int snd_usb_pcm_open(snd_pcm_substream_t *substream, int direction, 1820static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction,
1823 snd_pcm_hardware_t *hw) 1821 struct snd_pcm_hardware *hw)
1824{ 1822{
1825 snd_usb_stream_t *as = snd_pcm_substream_chip(substream); 1823 struct snd_usb_stream *as = snd_pcm_substream_chip(substream);
1826 snd_pcm_runtime_t *runtime = substream->runtime; 1824 struct snd_pcm_runtime *runtime = substream->runtime;
1827 snd_usb_substream_t *subs = &as->substream[direction]; 1825 struct snd_usb_substream *subs = &as->substream[direction];
1828 1826
1829 subs->interface = -1; 1827 subs->interface = -1;
1830 subs->format = 0; 1828 subs->format = 0;
@@ -1834,10 +1832,10 @@ static int snd_usb_pcm_open(snd_pcm_substream_t *substream, int direction,
1834 return setup_hw_info(runtime, subs); 1832 return setup_hw_info(runtime, subs);
1835} 1833}
1836 1834
1837static int snd_usb_pcm_close(snd_pcm_substream_t *substream, int direction) 1835static int snd_usb_pcm_close(struct snd_pcm_substream *substream, int direction)
1838{ 1836{
1839 snd_usb_stream_t *as = snd_pcm_substream_chip(substream); 1837 struct snd_usb_stream *as = snd_pcm_substream_chip(substream);
1840 snd_usb_substream_t *subs = &as->substream[direction]; 1838 struct snd_usb_substream *subs = &as->substream[direction];
1841 1839
1842 if (subs->interface >= 0) { 1840 if (subs->interface >= 0) {
1843 usb_set_interface(subs->dev, subs->interface, 0); 1841 usb_set_interface(subs->dev, subs->interface, 0);
@@ -1847,27 +1845,27 @@ static int snd_usb_pcm_close(snd_pcm_substream_t *substream, int direction)
1847 return 0; 1845 return 0;
1848} 1846}
1849 1847
1850static int snd_usb_playback_open(snd_pcm_substream_t *substream) 1848static int snd_usb_playback_open(struct snd_pcm_substream *substream)
1851{ 1849{
1852 return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_PLAYBACK, &snd_usb_playback); 1850 return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_PLAYBACK, &snd_usb_playback);
1853} 1851}
1854 1852
1855static int snd_usb_playback_close(snd_pcm_substream_t *substream) 1853static int snd_usb_playback_close(struct snd_pcm_substream *substream)
1856{ 1854{
1857 return snd_usb_pcm_close(substream, SNDRV_PCM_STREAM_PLAYBACK); 1855 return snd_usb_pcm_close(substream, SNDRV_PCM_STREAM_PLAYBACK);
1858} 1856}
1859 1857
1860static int snd_usb_capture_open(snd_pcm_substream_t *substream) 1858static int snd_usb_capture_open(struct snd_pcm_substream *substream)
1861{ 1859{
1862 return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_CAPTURE, &snd_usb_capture); 1860 return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_CAPTURE, &snd_usb_capture);
1863} 1861}
1864 1862
1865static int snd_usb_capture_close(snd_pcm_substream_t *substream) 1863static int snd_usb_capture_close(struct snd_pcm_substream *substream)
1866{ 1864{
1867 return snd_usb_pcm_close(substream, SNDRV_PCM_STREAM_CAPTURE); 1865 return snd_usb_pcm_close(substream, SNDRV_PCM_STREAM_CAPTURE);
1868} 1866}
1869 1867
1870static snd_pcm_ops_t snd_usb_playback_ops = { 1868static struct snd_pcm_ops snd_usb_playback_ops = {
1871 .open = snd_usb_playback_open, 1869 .open = snd_usb_playback_open,
1872 .close = snd_usb_playback_close, 1870 .close = snd_usb_playback_close,
1873 .ioctl = snd_pcm_lib_ioctl, 1871 .ioctl = snd_pcm_lib_ioctl,
@@ -1879,7 +1877,7 @@ static snd_pcm_ops_t snd_usb_playback_ops = {
1879 .page = snd_pcm_get_vmalloc_page, 1877 .page = snd_pcm_get_vmalloc_page,
1880}; 1878};
1881 1879
1882static snd_pcm_ops_t snd_usb_capture_ops = { 1880static struct snd_pcm_ops snd_usb_capture_ops = {
1883 .open = snd_usb_capture_open, 1881 .open = snd_usb_capture_open,
1884 .close = snd_usb_capture_close, 1882 .close = snd_usb_capture_close,
1885 .ioctl = snd_pcm_lib_ioctl, 1883 .ioctl = snd_pcm_lib_ioctl,
@@ -2007,7 +2005,7 @@ static struct usb_driver usb_audio_driver = {
2007/* 2005/*
2008 * proc interface for list the supported pcm formats 2006 * proc interface for list the supported pcm formats
2009 */ 2007 */
2010static void proc_dump_substream_formats(snd_usb_substream_t *subs, snd_info_buffer_t *buffer) 2008static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
2011{ 2009{
2012 struct list_head *p; 2010 struct list_head *p;
2013 static char *sync_types[4] = { 2011 static char *sync_types[4] = {
@@ -2043,7 +2041,7 @@ static void proc_dump_substream_formats(snd_usb_substream_t *subs, snd_info_buff
2043 } 2041 }
2044} 2042}
2045 2043
2046static void proc_dump_substream_status(snd_usb_substream_t *subs, snd_info_buffer_t *buffer) 2044static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
2047{ 2045{
2048 if (subs->running) { 2046 if (subs->running) {
2049 unsigned int i; 2047 unsigned int i;
@@ -2065,9 +2063,9 @@ static void proc_dump_substream_status(snd_usb_substream_t *subs, snd_info_buffe
2065 } 2063 }
2066} 2064}
2067 2065
2068static void proc_pcm_format_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 2066static void proc_pcm_format_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
2069{ 2067{
2070 snd_usb_stream_t *stream = entry->private_data; 2068 struct snd_usb_stream *stream = entry->private_data;
2071 2069
2072 snd_iprintf(buffer, "%s : %s\n", stream->chip->card->longname, stream->pcm->name); 2070 snd_iprintf(buffer, "%s : %s\n", stream->chip->card->longname, stream->pcm->name);
2073 2071
@@ -2083,11 +2081,11 @@ static void proc_pcm_format_read(snd_info_entry_t *entry, snd_info_buffer_t *buf
2083 } 2081 }
2084} 2082}
2085 2083
2086static void proc_pcm_format_add(snd_usb_stream_t *stream) 2084static void proc_pcm_format_add(struct snd_usb_stream *stream)
2087{ 2085{
2088 snd_info_entry_t *entry; 2086 struct snd_info_entry *entry;
2089 char name[32]; 2087 char name[32];
2090 snd_card_t *card = stream->chip->card; 2088 struct snd_card *card = stream->chip->card;
2091 2089
2092 sprintf(name, "stream%d", stream->pcm_index); 2090 sprintf(name, "stream%d", stream->pcm_index);
2093 if (! snd_card_proc_new(card, name, &entry)) 2091 if (! snd_card_proc_new(card, name, &entry))
@@ -2099,9 +2097,9 @@ static void proc_pcm_format_add(snd_usb_stream_t *stream)
2099 * initialize the substream instance. 2097 * initialize the substream instance.
2100 */ 2098 */
2101 2099
2102static void init_substream(snd_usb_stream_t *as, int stream, struct audioformat *fp) 2100static void init_substream(struct snd_usb_stream *as, int stream, struct audioformat *fp)
2103{ 2101{
2104 snd_usb_substream_t *subs = &as->substream[stream]; 2102 struct snd_usb_substream *subs = &as->substream[stream];
2105 2103
2106 INIT_LIST_HEAD(&subs->fmt_list); 2104 INIT_LIST_HEAD(&subs->fmt_list);
2107 spin_lock_init(&subs->lock); 2105 spin_lock_init(&subs->lock);
@@ -2128,7 +2126,7 @@ static void init_substream(snd_usb_stream_t *as, int stream, struct audioformat
2128/* 2126/*
2129 * free a substream 2127 * free a substream
2130 */ 2128 */
2131static void free_substream(snd_usb_substream_t *subs) 2129static void free_substream(struct snd_usb_substream *subs)
2132{ 2130{
2133 struct list_head *p, *n; 2131 struct list_head *p, *n;
2134 2132
@@ -2145,7 +2143,7 @@ static void free_substream(snd_usb_substream_t *subs)
2145/* 2143/*
2146 * free a usb stream instance 2144 * free a usb stream instance
2147 */ 2145 */
2148static void snd_usb_audio_stream_free(snd_usb_stream_t *stream) 2146static void snd_usb_audio_stream_free(struct snd_usb_stream *stream)
2149{ 2147{
2150 free_substream(&stream->substream[0]); 2148 free_substream(&stream->substream[0]);
2151 free_substream(&stream->substream[1]); 2149 free_substream(&stream->substream[1]);
@@ -2153,9 +2151,9 @@ static void snd_usb_audio_stream_free(snd_usb_stream_t *stream)
2153 kfree(stream); 2151 kfree(stream);
2154} 2152}
2155 2153
2156static void snd_usb_audio_pcm_free(snd_pcm_t *pcm) 2154static void snd_usb_audio_pcm_free(struct snd_pcm *pcm)
2157{ 2155{
2158 snd_usb_stream_t *stream = pcm->private_data; 2156 struct snd_usb_stream *stream = pcm->private_data;
2159 if (stream) { 2157 if (stream) {
2160 stream->pcm = NULL; 2158 stream->pcm = NULL;
2161 snd_usb_audio_stream_free(stream); 2159 snd_usb_audio_stream_free(stream);
@@ -2168,16 +2166,16 @@ static void snd_usb_audio_pcm_free(snd_pcm_t *pcm)
2168 * if a stream with the same endpoint already exists, append to it. 2166 * if a stream with the same endpoint already exists, append to it.
2169 * if not, create a new pcm stream. 2167 * if not, create a new pcm stream.
2170 */ 2168 */
2171static int add_audio_endpoint(snd_usb_audio_t *chip, int stream, struct audioformat *fp) 2169static int add_audio_endpoint(struct snd_usb_audio *chip, int stream, struct audioformat *fp)
2172{ 2170{
2173 struct list_head *p; 2171 struct list_head *p;
2174 snd_usb_stream_t *as; 2172 struct snd_usb_stream *as;
2175 snd_usb_substream_t *subs; 2173 struct snd_usb_substream *subs;
2176 snd_pcm_t *pcm; 2174 struct snd_pcm *pcm;
2177 int err; 2175 int err;
2178 2176
2179 list_for_each(p, &chip->pcm_list) { 2177 list_for_each(p, &chip->pcm_list) {
2180 as = list_entry(p, snd_usb_stream_t, list); 2178 as = list_entry(p, struct snd_usb_stream, list);
2181 if (as->fmt_type != fp->fmt_type) 2179 if (as->fmt_type != fp->fmt_type)
2182 continue; 2180 continue;
2183 subs = &as->substream[stream]; 2181 subs = &as->substream[stream];
@@ -2192,7 +2190,7 @@ static int add_audio_endpoint(snd_usb_audio_t *chip, int stream, struct audiofor
2192 } 2190 }
2193 /* look for an empty stream */ 2191 /* look for an empty stream */
2194 list_for_each(p, &chip->pcm_list) { 2192 list_for_each(p, &chip->pcm_list) {
2195 as = list_entry(p, snd_usb_stream_t, list); 2193 as = list_entry(p, struct snd_usb_stream, list);
2196 if (as->fmt_type != fp->fmt_type) 2194 if (as->fmt_type != fp->fmt_type)
2197 continue; 2195 continue;
2198 subs = &as->substream[stream]; 2196 subs = &as->substream[stream];
@@ -2244,7 +2242,7 @@ static int add_audio_endpoint(snd_usb_audio_t *chip, int stream, struct audiofor
2244/* 2242/*
2245 * check if the device uses big-endian samples 2243 * check if the device uses big-endian samples
2246 */ 2244 */
2247static int is_big_endian_format(snd_usb_audio_t *chip, struct audioformat *fp) 2245static int is_big_endian_format(struct snd_usb_audio *chip, struct audioformat *fp)
2248{ 2246{
2249 switch (chip->usb_id) { 2247 switch (chip->usb_id) {
2250 case USB_ID(0x0763, 0x2001): /* M-Audio Quattro: captured data only */ 2248 case USB_ID(0x0763, 0x2001): /* M-Audio Quattro: captured data only */
@@ -2266,7 +2264,7 @@ static int is_big_endian_format(snd_usb_audio_t *chip, struct audioformat *fp)
2266 * @format: the format tag (wFormatTag) 2264 * @format: the format tag (wFormatTag)
2267 * @fmt: the format type descriptor 2265 * @fmt: the format type descriptor
2268 */ 2266 */
2269static int parse_audio_format_i_type(snd_usb_audio_t *chip, struct audioformat *fp, 2267static int parse_audio_format_i_type(struct snd_usb_audio *chip, struct audioformat *fp,
2270 int format, unsigned char *fmt) 2268 int format, unsigned char *fmt)
2271{ 2269{
2272 int pcm_format; 2270 int pcm_format;
@@ -2349,7 +2347,7 @@ static int parse_audio_format_i_type(snd_usb_audio_t *chip, struct audioformat *
2349 * @offset: the start offset of descriptor pointing the rate type 2347 * @offset: the start offset of descriptor pointing the rate type
2350 * (7 for type I and II, 8 for type II) 2348 * (7 for type I and II, 8 for type II)
2351 */ 2349 */
2352static int parse_audio_format_rates(snd_usb_audio_t *chip, struct audioformat *fp, 2350static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioformat *fp,
2353 unsigned char *fmt, int offset) 2351 unsigned char *fmt, int offset)
2354{ 2352{
2355 int nr_rates = fmt[offset]; 2353 int nr_rates = fmt[offset];
@@ -2402,7 +2400,7 @@ static int parse_audio_format_rates(snd_usb_audio_t *chip, struct audioformat *f
2402/* 2400/*
2403 * parse the format type I and III descriptors 2401 * parse the format type I and III descriptors
2404 */ 2402 */
2405static int parse_audio_format_i(snd_usb_audio_t *chip, struct audioformat *fp, 2403static int parse_audio_format_i(struct snd_usb_audio *chip, struct audioformat *fp,
2406 int format, unsigned char *fmt) 2404 int format, unsigned char *fmt)
2407{ 2405{
2408 int pcm_format; 2406 int pcm_format;
@@ -2431,7 +2429,7 @@ static int parse_audio_format_i(snd_usb_audio_t *chip, struct audioformat *fp,
2431/* 2429/*
2432 * prase the format type II descriptor 2430 * prase the format type II descriptor
2433 */ 2431 */
2434static int parse_audio_format_ii(snd_usb_audio_t *chip, struct audioformat *fp, 2432static int parse_audio_format_ii(struct snd_usb_audio *chip, struct audioformat *fp,
2435 int format, unsigned char *fmt) 2433 int format, unsigned char *fmt)
2436{ 2434{
2437 int brate, framesize; 2435 int brate, framesize;
@@ -2458,7 +2456,7 @@ static int parse_audio_format_ii(snd_usb_audio_t *chip, struct audioformat *fp,
2458 return parse_audio_format_rates(chip, fp, fmt, 8); /* fmt[8..] sample rates */ 2456 return parse_audio_format_rates(chip, fp, fmt, 8); /* fmt[8..] sample rates */
2459} 2457}
2460 2458
2461static int parse_audio_format(snd_usb_audio_t *chip, struct audioformat *fp, 2459static int parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp,
2462 int format, unsigned char *fmt, int stream) 2460 int format, unsigned char *fmt, int stream)
2463{ 2461{
2464 int err; 2462 int err;
@@ -2495,7 +2493,7 @@ static int parse_audio_format(snd_usb_audio_t *chip, struct audioformat *fp,
2495 return 0; 2493 return 0;
2496} 2494}
2497 2495
2498static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no) 2496static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
2499{ 2497{
2500 struct usb_device *dev; 2498 struct usb_device *dev;
2501 struct usb_interface *iface; 2499 struct usb_interface *iface;
@@ -2646,10 +2644,10 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
2646static void snd_usb_stream_disconnect(struct list_head *head) 2644static void snd_usb_stream_disconnect(struct list_head *head)
2647{ 2645{
2648 int idx; 2646 int idx;
2649 snd_usb_stream_t *as; 2647 struct snd_usb_stream *as;
2650 snd_usb_substream_t *subs; 2648 struct snd_usb_substream *subs;
2651 2649
2652 as = list_entry(head, snd_usb_stream_t, list); 2650 as = list_entry(head, struct snd_usb_stream, list);
2653 for (idx = 0; idx < 2; idx++) { 2651 for (idx = 0; idx < 2; idx++) {
2654 subs = &as->substream[idx]; 2652 subs = &as->substream[idx];
2655 if (!subs->num_formats) 2653 if (!subs->num_formats)
@@ -2662,7 +2660,7 @@ static void snd_usb_stream_disconnect(struct list_head *head)
2662/* 2660/*
2663 * parse audio control descriptor and create pcm/midi streams 2661 * parse audio control descriptor and create pcm/midi streams
2664 */ 2662 */
2665static int snd_usb_create_streams(snd_usb_audio_t *chip, int ctrlif) 2663static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
2666{ 2664{
2667 struct usb_device *dev = chip->dev; 2665 struct usb_device *dev = chip->dev;
2668 struct usb_host_interface *host_iface; 2666 struct usb_host_interface *host_iface;
@@ -2729,9 +2727,9 @@ static int snd_usb_create_streams(snd_usb_audio_t *chip, int ctrlif)
2729/* 2727/*
2730 * create a stream for an endpoint/altsetting without proper descriptors 2728 * create a stream for an endpoint/altsetting without proper descriptors
2731 */ 2729 */
2732static int create_fixed_stream_quirk(snd_usb_audio_t *chip, 2730static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
2733 struct usb_interface *iface, 2731 struct usb_interface *iface,
2734 const snd_usb_audio_quirk_t *quirk) 2732 const struct snd_usb_audio_quirk *quirk)
2735{ 2733{
2736 struct audioformat *fp; 2734 struct audioformat *fp;
2737 struct usb_host_interface *alts; 2735 struct usb_host_interface *alts;
@@ -2778,9 +2776,9 @@ static int create_fixed_stream_quirk(snd_usb_audio_t *chip,
2778/* 2776/*
2779 * create a stream for an interface with proper descriptors 2777 * create a stream for an interface with proper descriptors
2780 */ 2778 */
2781static int create_standard_audio_quirk(snd_usb_audio_t *chip, 2779static int create_standard_audio_quirk(struct snd_usb_audio *chip,
2782 struct usb_interface *iface, 2780 struct usb_interface *iface,
2783 const snd_usb_audio_quirk_t *quirk) 2781 const struct snd_usb_audio_quirk *quirk)
2784{ 2782{
2785 struct usb_host_interface *alts; 2783 struct usb_host_interface *alts;
2786 struct usb_interface_descriptor *altsd; 2784 struct usb_interface_descriptor *altsd;
@@ -2803,9 +2801,9 @@ static int create_standard_audio_quirk(snd_usb_audio_t *chip,
2803 * Create a stream for an Edirol UA-700/UA-25 interface. The only way 2801 * Create a stream for an Edirol UA-700/UA-25 interface. The only way
2804 * to detect the sample rate is by looking at wMaxPacketSize. 2802 * to detect the sample rate is by looking at wMaxPacketSize.
2805 */ 2803 */
2806static int create_ua700_ua25_quirk(snd_usb_audio_t *chip, 2804static int create_ua700_ua25_quirk(struct snd_usb_audio *chip,
2807 struct usb_interface *iface, 2805 struct usb_interface *iface,
2808 const snd_usb_audio_quirk_t *quirk) 2806 const struct snd_usb_audio_quirk *quirk)
2809{ 2807{
2810 static const struct audioformat ua_format = { 2808 static const struct audioformat ua_format = {
2811 .format = SNDRV_PCM_FORMAT_S24_3LE, 2809 .format = SNDRV_PCM_FORMAT_S24_3LE,
@@ -2827,19 +2825,19 @@ static int create_ua700_ua25_quirk(snd_usb_audio_t *chip,
2827 altsd = get_iface_desc(alts); 2825 altsd = get_iface_desc(alts);
2828 2826
2829 if (altsd->bNumEndpoints == 2) { 2827 if (altsd->bNumEndpoints == 2) {
2830 static const snd_usb_midi_endpoint_info_t ua700_ep = { 2828 static const struct snd_usb_midi_endpoint_info ua700_ep = {
2831 .out_cables = 0x0003, 2829 .out_cables = 0x0003,
2832 .in_cables = 0x0003 2830 .in_cables = 0x0003
2833 }; 2831 };
2834 static const snd_usb_audio_quirk_t ua700_quirk = { 2832 static const struct snd_usb_audio_quirk ua700_quirk = {
2835 .type = QUIRK_MIDI_FIXED_ENDPOINT, 2833 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2836 .data = &ua700_ep 2834 .data = &ua700_ep
2837 }; 2835 };
2838 static const snd_usb_midi_endpoint_info_t ua25_ep = { 2836 static const struct snd_usb_midi_endpoint_info ua25_ep = {
2839 .out_cables = 0x0001, 2837 .out_cables = 0x0001,
2840 .in_cables = 0x0001 2838 .in_cables = 0x0001
2841 }; 2839 };
2842 static const snd_usb_audio_quirk_t ua25_quirk = { 2840 static const struct snd_usb_audio_quirk ua25_quirk = {
2843 .type = QUIRK_MIDI_FIXED_ENDPOINT, 2841 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2844 .data = &ua25_ep 2842 .data = &ua25_ep
2845 }; 2843 };
@@ -2896,9 +2894,9 @@ static int create_ua700_ua25_quirk(snd_usb_audio_t *chip,
2896/* 2894/*
2897 * Create a stream for an Edirol UA-1000 interface. 2895 * Create a stream for an Edirol UA-1000 interface.
2898 */ 2896 */
2899static int create_ua1000_quirk(snd_usb_audio_t *chip, 2897static int create_ua1000_quirk(struct snd_usb_audio *chip,
2900 struct usb_interface *iface, 2898 struct usb_interface *iface,
2901 const snd_usb_audio_quirk_t *quirk) 2899 const struct snd_usb_audio_quirk *quirk)
2902{ 2900{
2903 static const struct audioformat ua1000_format = { 2901 static const struct audioformat ua1000_format = {
2904 .format = SNDRV_PCM_FORMAT_S32_LE, 2902 .format = SNDRV_PCM_FORMAT_S32_LE,
@@ -2945,16 +2943,16 @@ static int create_ua1000_quirk(snd_usb_audio_t *chip,
2945 return 0; 2943 return 0;
2946} 2944}
2947 2945
2948static int snd_usb_create_quirk(snd_usb_audio_t *chip, 2946static int snd_usb_create_quirk(struct snd_usb_audio *chip,
2949 struct usb_interface *iface, 2947 struct usb_interface *iface,
2950 const snd_usb_audio_quirk_t *quirk); 2948 const struct snd_usb_audio_quirk *quirk);
2951 2949
2952/* 2950/*
2953 * handle the quirks for the contained interfaces 2951 * handle the quirks for the contained interfaces
2954 */ 2952 */
2955static int create_composite_quirk(snd_usb_audio_t *chip, 2953static int create_composite_quirk(struct snd_usb_audio *chip,
2956 struct usb_interface *iface, 2954 struct usb_interface *iface,
2957 const snd_usb_audio_quirk_t *quirk) 2955 const struct snd_usb_audio_quirk *quirk)
2958{ 2956{
2959 int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber; 2957 int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber;
2960 int err; 2958 int err;
@@ -2975,9 +2973,9 @@ static int create_composite_quirk(snd_usb_audio_t *chip,
2975 return 0; 2973 return 0;
2976} 2974}
2977 2975
2978static int ignore_interface_quirk(snd_usb_audio_t *chip, 2976static int ignore_interface_quirk(struct snd_usb_audio *chip,
2979 struct usb_interface *iface, 2977 struct usb_interface *iface,
2980 const snd_usb_audio_quirk_t *quirk) 2978 const struct snd_usb_audio_quirk *quirk)
2981{ 2979{
2982 return 0; 2980 return 0;
2983} 2981}
@@ -3040,12 +3038,12 @@ static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev)
3040 * after this. 3038 * after this.
3041 * returns a negative value at error. 3039 * returns a negative value at error.
3042 */ 3040 */
3043static int snd_usb_create_quirk(snd_usb_audio_t *chip, 3041static int snd_usb_create_quirk(struct snd_usb_audio *chip,
3044 struct usb_interface *iface, 3042 struct usb_interface *iface,
3045 const snd_usb_audio_quirk_t *quirk) 3043 const struct snd_usb_audio_quirk *quirk)
3046{ 3044{
3047 typedef int (*quirk_func_t)(snd_usb_audio_t *, struct usb_interface *, 3045 typedef int (*quirk_func_t)(struct snd_usb_audio *, struct usb_interface *,
3048 const snd_usb_audio_quirk_t *); 3046 const struct snd_usb_audio_quirk *);
3049 static const quirk_func_t quirk_funcs[] = { 3047 static const quirk_func_t quirk_funcs[] = {
3050 [QUIRK_IGNORE_INTERFACE] = ignore_interface_quirk, 3048 [QUIRK_IGNORE_INTERFACE] = ignore_interface_quirk,
3051 [QUIRK_COMPOSITE] = create_composite_quirk, 3049 [QUIRK_COMPOSITE] = create_composite_quirk,
@@ -3075,25 +3073,25 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip,
3075/* 3073/*
3076 * common proc files to show the usb device info 3074 * common proc files to show the usb device info
3077 */ 3075 */
3078static void proc_audio_usbbus_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 3076static void proc_audio_usbbus_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
3079{ 3077{
3080 snd_usb_audio_t *chip = entry->private_data; 3078 struct snd_usb_audio *chip = entry->private_data;
3081 if (! chip->shutdown) 3079 if (! chip->shutdown)
3082 snd_iprintf(buffer, "%03d/%03d\n", chip->dev->bus->busnum, chip->dev->devnum); 3080 snd_iprintf(buffer, "%03d/%03d\n", chip->dev->bus->busnum, chip->dev->devnum);
3083} 3081}
3084 3082
3085static void proc_audio_usbid_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 3083static void proc_audio_usbid_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
3086{ 3084{
3087 snd_usb_audio_t *chip = entry->private_data; 3085 struct snd_usb_audio *chip = entry->private_data;
3088 if (! chip->shutdown) 3086 if (! chip->shutdown)
3089 snd_iprintf(buffer, "%04x:%04x\n", 3087 snd_iprintf(buffer, "%04x:%04x\n",
3090 USB_ID_VENDOR(chip->usb_id), 3088 USB_ID_VENDOR(chip->usb_id),
3091 USB_ID_PRODUCT(chip->usb_id)); 3089 USB_ID_PRODUCT(chip->usb_id));
3092} 3090}
3093 3091
3094static void snd_usb_audio_create_proc(snd_usb_audio_t *chip) 3092static void snd_usb_audio_create_proc(struct snd_usb_audio *chip)
3095{ 3093{
3096 snd_info_entry_t *entry; 3094 struct snd_info_entry *entry;
3097 if (! snd_card_proc_new(chip->card, "usbbus", &entry)) 3095 if (! snd_card_proc_new(chip->card, "usbbus", &entry))
3098 snd_info_set_text_ops(entry, chip, 1024, proc_audio_usbbus_read); 3096 snd_info_set_text_ops(entry, chip, 1024, proc_audio_usbbus_read);
3099 if (! snd_card_proc_new(chip->card, "usbid", &entry)) 3097 if (! snd_card_proc_new(chip->card, "usbid", &entry))
@@ -3107,15 +3105,15 @@ static void snd_usb_audio_create_proc(snd_usb_audio_t *chip)
3107 * 3105 *
3108 */ 3106 */
3109 3107
3110static int snd_usb_audio_free(snd_usb_audio_t *chip) 3108static int snd_usb_audio_free(struct snd_usb_audio *chip)
3111{ 3109{
3112 kfree(chip); 3110 kfree(chip);
3113 return 0; 3111 return 0;
3114} 3112}
3115 3113
3116static int snd_usb_audio_dev_free(snd_device_t *device) 3114static int snd_usb_audio_dev_free(struct snd_device *device)
3117{ 3115{
3118 snd_usb_audio_t *chip = device->device_data; 3116 struct snd_usb_audio *chip = device->device_data;
3119 return snd_usb_audio_free(chip); 3117 return snd_usb_audio_free(chip);
3120} 3118}
3121 3119
@@ -3124,14 +3122,14 @@ static int snd_usb_audio_dev_free(snd_device_t *device)
3124 * create a chip instance and set its names. 3122 * create a chip instance and set its names.
3125 */ 3123 */
3126static int snd_usb_audio_create(struct usb_device *dev, int idx, 3124static int snd_usb_audio_create(struct usb_device *dev, int idx,
3127 const snd_usb_audio_quirk_t *quirk, 3125 const struct snd_usb_audio_quirk *quirk,
3128 snd_usb_audio_t **rchip) 3126 struct snd_usb_audio **rchip)
3129{ 3127{
3130 snd_card_t *card; 3128 struct snd_card *card;
3131 snd_usb_audio_t *chip; 3129 struct snd_usb_audio *chip;
3132 int err, len; 3130 int err, len;
3133 char component[14]; 3131 char component[14];
3134 static snd_device_ops_t ops = { 3132 static struct snd_device_ops ops = {
3135 .dev_free = snd_usb_audio_dev_free, 3133 .dev_free = snd_usb_audio_dev_free,
3136 }; 3134 };
3137 3135
@@ -3235,9 +3233,9 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
3235 struct usb_interface *intf, 3233 struct usb_interface *intf,
3236 const struct usb_device_id *usb_id) 3234 const struct usb_device_id *usb_id)
3237{ 3235{
3238 const snd_usb_audio_quirk_t *quirk = (const snd_usb_audio_quirk_t *)usb_id->driver_info; 3236 const struct snd_usb_audio_quirk *quirk = (const struct snd_usb_audio_quirk *)usb_id->driver_info;
3239 int i, err; 3237 int i, err;
3240 snd_usb_audio_t *chip; 3238 struct snd_usb_audio *chip;
3241 struct usb_host_interface *alts; 3239 struct usb_host_interface *alts;
3242 int ifnum; 3240 int ifnum;
3243 u32 id; 3241 u32 id;
@@ -3338,8 +3336,8 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
3338 */ 3336 */
3339static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) 3337static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
3340{ 3338{
3341 snd_usb_audio_t *chip; 3339 struct snd_usb_audio *chip;
3342 snd_card_t *card; 3340 struct snd_card *card;
3343 struct list_head *p; 3341 struct list_head *p;
3344 3342
3345 if (ptr == (void *)-1L) 3343 if (ptr == (void *)-1L)
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index b5802022bb19..ecd724bfe5a5 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -126,12 +126,10 @@
126/* 126/*
127 */ 127 */
128 128
129typedef struct snd_usb_audio snd_usb_audio_t;
130
131struct snd_usb_audio { 129struct snd_usb_audio {
132 int index; 130 int index;
133 struct usb_device *dev; 131 struct usb_device *dev;
134 snd_card_t *card; 132 struct snd_card *card;
135 u32 usb_id; 133 u32 usb_id;
136 int shutdown; 134 int shutdown;
137 int num_interfaces; 135 int num_interfaces;
@@ -172,9 +170,6 @@ enum quirk_type {
172 QUIRK_TYPE_COUNT 170 QUIRK_TYPE_COUNT
173}; 171};
174 172
175typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
176typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
177
178struct snd_usb_audio_quirk { 173struct snd_usb_audio_quirk {
179 const char *vendor_name; 174 const char *vendor_name;
180 const char *product_name; 175 const char *product_name;
@@ -228,12 +223,15 @@ unsigned int snd_usb_combine_bytes(unsigned char *bytes, int size);
228void *snd_usb_find_desc(void *descstart, int desclen, void *after, u8 dtype); 223void *snd_usb_find_desc(void *descstart, int desclen, void *after, u8 dtype);
229void *snd_usb_find_csint_desc(void *descstart, int desclen, void *after, u8 dsubtype); 224void *snd_usb_find_csint_desc(void *descstart, int desclen, void *after, u8 dsubtype);
230 225
231int snd_usb_ctl_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout); 226int snd_usb_ctl_msg(struct usb_device *dev, unsigned int pipe,
227 __u8 request, __u8 requesttype, __u16 value, __u16 index,
228 void *data, __u16 size, int timeout);
232 229
233int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif); 230int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif);
234void snd_usb_mixer_disconnect(struct list_head *p); 231void snd_usb_mixer_disconnect(struct list_head *p);
235 232
236int snd_usb_create_midi_interface(snd_usb_audio_t *chip, struct usb_interface *iface, const snd_usb_audio_quirk_t *quirk); 233int snd_usb_create_midi_interface(struct snd_usb_audio *chip, struct usb_interface *iface,
234 const struct snd_usb_audio_quirk *quirk);
237void snd_usbmidi_input_stop(struct list_head* p); 235void snd_usbmidi_input_stop(struct list_head* p);
238void snd_usbmidi_input_start(struct list_head* p); 236void snd_usbmidi_input_start(struct list_head* p);
239void snd_usbmidi_disconnect(struct list_head *p); 237void snd_usbmidi_disconnect(struct list_head *p);
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index f8aa662562a0..f15b021c3ce8 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -84,39 +84,36 @@ struct usb_ms_endpoint_descriptor {
84 __u8 baAssocJackID[0]; 84 __u8 baAssocJackID[0];
85} __attribute__ ((packed)); 85} __attribute__ ((packed));
86 86
87typedef struct snd_usb_midi snd_usb_midi_t; 87struct snd_usb_midi_in_endpoint;
88typedef struct snd_usb_midi_endpoint snd_usb_midi_endpoint_t; 88struct snd_usb_midi_out_endpoint;
89typedef struct snd_usb_midi_out_endpoint snd_usb_midi_out_endpoint_t; 89struct snd_usb_midi_endpoint;
90typedef struct snd_usb_midi_in_endpoint snd_usb_midi_in_endpoint_t;
91typedef struct usbmidi_out_port usbmidi_out_port_t;
92typedef struct usbmidi_in_port usbmidi_in_port_t;
93 90
94struct usb_protocol_ops { 91struct usb_protocol_ops {
95 void (*input)(snd_usb_midi_in_endpoint_t*, uint8_t*, int); 92 void (*input)(struct snd_usb_midi_in_endpoint*, uint8_t*, int);
96 void (*output)(snd_usb_midi_out_endpoint_t*); 93 void (*output)(struct snd_usb_midi_out_endpoint*);
97 void (*output_packet)(struct urb*, uint8_t, uint8_t, uint8_t, uint8_t); 94 void (*output_packet)(struct urb*, uint8_t, uint8_t, uint8_t, uint8_t);
98 void (*init_out_endpoint)(snd_usb_midi_out_endpoint_t*); 95 void (*init_out_endpoint)(struct snd_usb_midi_out_endpoint*);
99 void (*finish_out_endpoint)(snd_usb_midi_out_endpoint_t*); 96 void (*finish_out_endpoint)(struct snd_usb_midi_out_endpoint*);
100}; 97};
101 98
102struct snd_usb_midi { 99struct snd_usb_midi {
103 snd_usb_audio_t *chip; 100 struct snd_usb_audio *chip;
104 struct usb_interface *iface; 101 struct usb_interface *iface;
105 const snd_usb_audio_quirk_t *quirk; 102 const struct snd_usb_audio_quirk *quirk;
106 snd_rawmidi_t* rmidi; 103 struct snd_rawmidi *rmidi;
107 struct usb_protocol_ops* usb_protocol_ops; 104 struct usb_protocol_ops* usb_protocol_ops;
108 struct list_head list; 105 struct list_head list;
109 struct timer_list error_timer; 106 struct timer_list error_timer;
110 107
111 struct snd_usb_midi_endpoint { 108 struct snd_usb_midi_endpoint {
112 snd_usb_midi_out_endpoint_t *out; 109 struct snd_usb_midi_out_endpoint *out;
113 snd_usb_midi_in_endpoint_t *in; 110 struct snd_usb_midi_in_endpoint *in;
114 } endpoints[MIDI_MAX_ENDPOINTS]; 111 } endpoints[MIDI_MAX_ENDPOINTS];
115 unsigned long input_triggered; 112 unsigned long input_triggered;
116}; 113};
117 114
118struct snd_usb_midi_out_endpoint { 115struct snd_usb_midi_out_endpoint {
119 snd_usb_midi_t* umidi; 116 struct snd_usb_midi* umidi;
120 struct urb* urb; 117 struct urb* urb;
121 int urb_active; 118 int urb_active;
122 int max_transfer; /* size of urb buffer */ 119 int max_transfer; /* size of urb buffer */
@@ -125,8 +122,8 @@ struct snd_usb_midi_out_endpoint {
125 spinlock_t buffer_lock; 122 spinlock_t buffer_lock;
126 123
127 struct usbmidi_out_port { 124 struct usbmidi_out_port {
128 snd_usb_midi_out_endpoint_t* ep; 125 struct snd_usb_midi_out_endpoint* ep;
129 snd_rawmidi_substream_t* substream; 126 struct snd_rawmidi_substream *substream;
130 int active; 127 int active;
131 uint8_t cable; /* cable number << 4 */ 128 uint8_t cable; /* cable number << 4 */
132 uint8_t state; 129 uint8_t state;
@@ -143,17 +140,17 @@ struct snd_usb_midi_out_endpoint {
143}; 140};
144 141
145struct snd_usb_midi_in_endpoint { 142struct snd_usb_midi_in_endpoint {
146 snd_usb_midi_t* umidi; 143 struct snd_usb_midi* umidi;
147 struct urb* urb; 144 struct urb* urb;
148 struct usbmidi_in_port { 145 struct usbmidi_in_port {
149 snd_rawmidi_substream_t* substream; 146 struct snd_rawmidi_substream *substream;
150 } ports[0x10]; 147 } ports[0x10];
151 u8 seen_f5; 148 u8 seen_f5;
152 u8 error_resubmit; 149 u8 error_resubmit;
153 int current_port; 150 int current_port;
154}; 151};
155 152
156static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep); 153static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint* ep);
157 154
158static const uint8_t snd_usbmidi_cin_length[] = { 155static const uint8_t snd_usbmidi_cin_length[] = {
159 0, 0, 2, 3, 3, 1, 2, 3, 3, 3, 3, 3, 2, 2, 3, 1 156 0, 0, 2, 3, 3, 1, 2, 3, 3, 3, 3, 3, 2, 2, 3, 1
@@ -196,10 +193,10 @@ static int snd_usbmidi_urb_error(int status)
196/* 193/*
197 * Receives a chunk of MIDI data. 194 * Receives a chunk of MIDI data.
198 */ 195 */
199static void snd_usbmidi_input_data(snd_usb_midi_in_endpoint_t* ep, int portidx, 196static void snd_usbmidi_input_data(struct snd_usb_midi_in_endpoint* ep, int portidx,
200 uint8_t* data, int length) 197 uint8_t* data, int length)
201{ 198{
202 usbmidi_in_port_t* port = &ep->ports[portidx]; 199 struct usbmidi_in_port* port = &ep->ports[portidx];
203 200
204 if (!port->substream) { 201 if (!port->substream) {
205 snd_printd("unexpected port %d!\n", portidx); 202 snd_printd("unexpected port %d!\n", portidx);
@@ -227,7 +224,7 @@ static void dump_urb(const char *type, const u8 *data, int length)
227 */ 224 */
228static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs) 225static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs)
229{ 226{
230 snd_usb_midi_in_endpoint_t* ep = urb->context; 227 struct snd_usb_midi_in_endpoint* ep = urb->context;
231 228
232 if (urb->status == 0) { 229 if (urb->status == 0) {
233 dump_urb("received", urb->transfer_buffer, urb->actual_length); 230 dump_urb("received", urb->transfer_buffer, urb->actual_length);
@@ -251,7 +248,7 @@ static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs)
251 248
252static void snd_usbmidi_out_urb_complete(struct urb* urb, struct pt_regs *regs) 249static void snd_usbmidi_out_urb_complete(struct urb* urb, struct pt_regs *regs)
253{ 250{
254 snd_usb_midi_out_endpoint_t* ep = urb->context; 251 struct snd_usb_midi_out_endpoint* ep = urb->context;
255 252
256 spin_lock(&ep->buffer_lock); 253 spin_lock(&ep->buffer_lock);
257 ep->urb_active = 0; 254 ep->urb_active = 0;
@@ -272,7 +269,7 @@ static void snd_usbmidi_out_urb_complete(struct urb* urb, struct pt_regs *regs)
272 * This is called when some data should be transferred to the device 269 * This is called when some data should be transferred to the device
273 * (from one or more substreams). 270 * (from one or more substreams).
274 */ 271 */
275static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep) 272static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint* ep)
276{ 273{
277 struct urb* urb = ep->urb; 274 struct urb* urb = ep->urb;
278 unsigned long flags; 275 unsigned long flags;
@@ -297,7 +294,7 @@ static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep)
297 294
298static void snd_usbmidi_out_tasklet(unsigned long data) 295static void snd_usbmidi_out_tasklet(unsigned long data)
299{ 296{
300 snd_usb_midi_out_endpoint_t* ep = (snd_usb_midi_out_endpoint_t *) data; 297 struct snd_usb_midi_out_endpoint* ep = (struct snd_usb_midi_out_endpoint *) data;
301 298
302 snd_usbmidi_do_output(ep); 299 snd_usbmidi_do_output(ep);
303} 300}
@@ -305,11 +302,11 @@ static void snd_usbmidi_out_tasklet(unsigned long data)
305/* called after transfers had been interrupted due to some USB error */ 302/* called after transfers had been interrupted due to some USB error */
306static void snd_usbmidi_error_timer(unsigned long data) 303static void snd_usbmidi_error_timer(unsigned long data)
307{ 304{
308 snd_usb_midi_t *umidi = (snd_usb_midi_t *)data; 305 struct snd_usb_midi *umidi = (struct snd_usb_midi *)data;
309 int i; 306 int i;
310 307
311 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { 308 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
312 snd_usb_midi_in_endpoint_t *in = umidi->endpoints[i].in; 309 struct snd_usb_midi_in_endpoint *in = umidi->endpoints[i].in;
313 if (in && in->error_resubmit) { 310 if (in && in->error_resubmit) {
314 in->error_resubmit = 0; 311 in->error_resubmit = 0;
315 in->urb->dev = umidi->chip->dev; 312 in->urb->dev = umidi->chip->dev;
@@ -321,7 +318,7 @@ static void snd_usbmidi_error_timer(unsigned long data)
321} 318}
322 319
323/* helper function to send static data that may not DMA-able */ 320/* helper function to send static data that may not DMA-able */
324static int send_bulk_static_data(snd_usb_midi_out_endpoint_t* ep, 321static int send_bulk_static_data(struct snd_usb_midi_out_endpoint* ep,
325 const void *data, int len) 322 const void *data, int len)
326{ 323{
327 int err; 324 int err;
@@ -342,7 +339,7 @@ static int send_bulk_static_data(snd_usb_midi_out_endpoint_t* ep,
342 * fourth byte in each packet, and uses length instead of CIN. 339 * fourth byte in each packet, and uses length instead of CIN.
343 */ 340 */
344 341
345static void snd_usbmidi_standard_input(snd_usb_midi_in_endpoint_t* ep, 342static void snd_usbmidi_standard_input(struct snd_usb_midi_in_endpoint* ep,
346 uint8_t* buffer, int buffer_length) 343 uint8_t* buffer, int buffer_length)
347{ 344{
348 int i; 345 int i;
@@ -355,7 +352,7 @@ static void snd_usbmidi_standard_input(snd_usb_midi_in_endpoint_t* ep,
355 } 352 }
356} 353}
357 354
358static void snd_usbmidi_midiman_input(snd_usb_midi_in_endpoint_t* ep, 355static void snd_usbmidi_midiman_input(struct snd_usb_midi_in_endpoint* ep,
359 uint8_t* buffer, int buffer_length) 356 uint8_t* buffer, int buffer_length)
360{ 357{
361 int i; 358 int i;
@@ -401,7 +398,7 @@ static void snd_usbmidi_output_midiman_packet(struct urb* urb, uint8_t p0,
401/* 398/*
402 * Converts MIDI commands to USB MIDI packets. 399 * Converts MIDI commands to USB MIDI packets.
403 */ 400 */
404static void snd_usbmidi_transmit_byte(usbmidi_out_port_t* port, 401static void snd_usbmidi_transmit_byte(struct usbmidi_out_port* port,
405 uint8_t b, struct urb* urb) 402 uint8_t b, struct urb* urb)
406{ 403{
407 uint8_t p0 = port->cable; 404 uint8_t p0 = port->cable;
@@ -495,14 +492,14 @@ static void snd_usbmidi_transmit_byte(usbmidi_out_port_t* port,
495 } 492 }
496} 493}
497 494
498static void snd_usbmidi_standard_output(snd_usb_midi_out_endpoint_t* ep) 495static void snd_usbmidi_standard_output(struct snd_usb_midi_out_endpoint* ep)
499{ 496{
500 struct urb* urb = ep->urb; 497 struct urb* urb = ep->urb;
501 int p; 498 int p;
502 499
503 /* FIXME: lower-numbered ports can starve higher-numbered ports */ 500 /* FIXME: lower-numbered ports can starve higher-numbered ports */
504 for (p = 0; p < 0x10; ++p) { 501 for (p = 0; p < 0x10; ++p) {
505 usbmidi_out_port_t* port = &ep->ports[p]; 502 struct usbmidi_out_port* port = &ep->ports[p];
506 if (!port->active) 503 if (!port->active)
507 continue; 504 continue;
508 while (urb->transfer_buffer_length + 3 < ep->max_transfer) { 505 while (urb->transfer_buffer_length + 3 < ep->max_transfer) {
@@ -534,7 +531,7 @@ static struct usb_protocol_ops snd_usbmidi_midiman_ops = {
534 * at the third byte. 531 * at the third byte.
535 */ 532 */
536 533
537static void snd_usbmidi_novation_input(snd_usb_midi_in_endpoint_t* ep, 534static void snd_usbmidi_novation_input(struct snd_usb_midi_in_endpoint* ep,
538 uint8_t* buffer, int buffer_length) 535 uint8_t* buffer, int buffer_length)
539{ 536{
540 if (buffer_length < 2 || !buffer[0] || buffer_length < buffer[0] + 1) 537 if (buffer_length < 2 || !buffer[0] || buffer_length < buffer[0] + 1)
@@ -542,7 +539,7 @@ static void snd_usbmidi_novation_input(snd_usb_midi_in_endpoint_t* ep,
542 snd_usbmidi_input_data(ep, 0, &buffer[2], buffer[0] - 1); 539 snd_usbmidi_input_data(ep, 0, &buffer[2], buffer[0] - 1);
543} 540}
544 541
545static void snd_usbmidi_novation_output(snd_usb_midi_out_endpoint_t* ep) 542static void snd_usbmidi_novation_output(struct snd_usb_midi_out_endpoint* ep)
546{ 543{
547 uint8_t* transfer_buffer; 544 uint8_t* transfer_buffer;
548 int count; 545 int count;
@@ -571,13 +568,13 @@ static struct usb_protocol_ops snd_usbmidi_novation_ops = {
571 * "raw" protocol: used by the MOTU FastLane. 568 * "raw" protocol: used by the MOTU FastLane.
572 */ 569 */
573 570
574static void snd_usbmidi_raw_input(snd_usb_midi_in_endpoint_t* ep, 571static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep,
575 uint8_t* buffer, int buffer_length) 572 uint8_t* buffer, int buffer_length)
576{ 573{
577 snd_usbmidi_input_data(ep, 0, buffer, buffer_length); 574 snd_usbmidi_input_data(ep, 0, buffer, buffer_length);
578} 575}
579 576
580static void snd_usbmidi_raw_output(snd_usb_midi_out_endpoint_t* ep) 577static void snd_usbmidi_raw_output(struct snd_usb_midi_out_endpoint* ep)
581{ 578{
582 int count; 579 int count;
583 580
@@ -602,7 +599,7 @@ static struct usb_protocol_ops snd_usbmidi_raw_ops = {
602 * Emagic USB MIDI protocol: raw MIDI with "F5 xx" port switching. 599 * Emagic USB MIDI protocol: raw MIDI with "F5 xx" port switching.
603 */ 600 */
604 601
605static void snd_usbmidi_emagic_init_out(snd_usb_midi_out_endpoint_t* ep) 602static void snd_usbmidi_emagic_init_out(struct snd_usb_midi_out_endpoint* ep)
606{ 603{
607 static const u8 init_data[] = { 604 static const u8 init_data[] = {
608 /* initialization magic: "get version" */ 605 /* initialization magic: "get version" */
@@ -619,7 +616,7 @@ static void snd_usbmidi_emagic_init_out(snd_usb_midi_out_endpoint_t* ep)
619 send_bulk_static_data(ep, init_data, sizeof(init_data)); 616 send_bulk_static_data(ep, init_data, sizeof(init_data));
620} 617}
621 618
622static void snd_usbmidi_emagic_finish_out(snd_usb_midi_out_endpoint_t* ep) 619static void snd_usbmidi_emagic_finish_out(struct snd_usb_midi_out_endpoint* ep)
623{ 620{
624 static const u8 finish_data[] = { 621 static const u8 finish_data[] = {
625 /* switch to patch mode with last preset */ 622 /* switch to patch mode with last preset */
@@ -635,7 +632,7 @@ static void snd_usbmidi_emagic_finish_out(snd_usb_midi_out_endpoint_t* ep)
635 send_bulk_static_data(ep, finish_data, sizeof(finish_data)); 632 send_bulk_static_data(ep, finish_data, sizeof(finish_data));
636} 633}
637 634
638static void snd_usbmidi_emagic_input(snd_usb_midi_in_endpoint_t* ep, 635static void snd_usbmidi_emagic_input(struct snd_usb_midi_in_endpoint* ep,
639 uint8_t* buffer, int buffer_length) 636 uint8_t* buffer, int buffer_length)
640{ 637{
641 int i; 638 int i;
@@ -679,7 +676,7 @@ static void snd_usbmidi_emagic_input(snd_usb_midi_in_endpoint_t* ep,
679 } 676 }
680} 677}
681 678
682static void snd_usbmidi_emagic_output(snd_usb_midi_out_endpoint_t* ep) 679static void snd_usbmidi_emagic_output(struct snd_usb_midi_out_endpoint* ep)
683{ 680{
684 int port0 = ep->current_port; 681 int port0 = ep->current_port;
685 uint8_t* buf = ep->urb->transfer_buffer; 682 uint8_t* buf = ep->urb->transfer_buffer;
@@ -689,7 +686,7 @@ static void snd_usbmidi_emagic_output(snd_usb_midi_out_endpoint_t* ep)
689 for (i = 0; i < 0x10; ++i) { 686 for (i = 0; i < 0x10; ++i) {
690 /* round-robin, starting at the last current port */ 687 /* round-robin, starting at the last current port */
691 int portnum = (port0 + i) & 15; 688 int portnum = (port0 + i) & 15;
692 usbmidi_out_port_t* port = &ep->ports[portnum]; 689 struct usbmidi_out_port* port = &ep->ports[portnum];
693 690
694 if (!port->active) 691 if (!port->active)
695 continue; 692 continue;
@@ -733,10 +730,10 @@ static struct usb_protocol_ops snd_usbmidi_emagic_ops = {
733}; 730};
734 731
735 732
736static int snd_usbmidi_output_open(snd_rawmidi_substream_t* substream) 733static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream)
737{ 734{
738 snd_usb_midi_t* umidi = substream->rmidi->private_data; 735 struct snd_usb_midi* umidi = substream->rmidi->private_data;
739 usbmidi_out_port_t* port = NULL; 736 struct usbmidi_out_port* port = NULL;
740 int i, j; 737 int i, j;
741 738
742 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) 739 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
@@ -755,14 +752,14 @@ static int snd_usbmidi_output_open(snd_rawmidi_substream_t* substream)
755 return 0; 752 return 0;
756} 753}
757 754
758static int snd_usbmidi_output_close(snd_rawmidi_substream_t* substream) 755static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream)
759{ 756{
760 return 0; 757 return 0;
761} 758}
762 759
763static void snd_usbmidi_output_trigger(snd_rawmidi_substream_t* substream, int up) 760static void snd_usbmidi_output_trigger(struct snd_rawmidi_substream *substream, int up)
764{ 761{
765 usbmidi_out_port_t* port = (usbmidi_out_port_t*)substream->runtime->private_data; 762 struct usbmidi_out_port* port = (struct usbmidi_out_port*)substream->runtime->private_data;
766 763
767 port->active = up; 764 port->active = up;
768 if (up) { 765 if (up) {
@@ -777,19 +774,19 @@ static void snd_usbmidi_output_trigger(snd_rawmidi_substream_t* substream, int u
777 } 774 }
778} 775}
779 776
780static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream) 777static int snd_usbmidi_input_open(struct snd_rawmidi_substream *substream)
781{ 778{
782 return 0; 779 return 0;
783} 780}
784 781
785static int snd_usbmidi_input_close(snd_rawmidi_substream_t* substream) 782static int snd_usbmidi_input_close(struct snd_rawmidi_substream *substream)
786{ 783{
787 return 0; 784 return 0;
788} 785}
789 786
790static void snd_usbmidi_input_trigger(snd_rawmidi_substream_t* substream, int up) 787static void snd_usbmidi_input_trigger(struct snd_rawmidi_substream *substream, int up)
791{ 788{
792 snd_usb_midi_t* umidi = substream->rmidi->private_data; 789 struct snd_usb_midi* umidi = substream->rmidi->private_data;
793 790
794 if (up) 791 if (up)
795 set_bit(substream->number, &umidi->input_triggered); 792 set_bit(substream->number, &umidi->input_triggered);
@@ -797,13 +794,13 @@ static void snd_usbmidi_input_trigger(snd_rawmidi_substream_t* substream, int up
797 clear_bit(substream->number, &umidi->input_triggered); 794 clear_bit(substream->number, &umidi->input_triggered);
798} 795}
799 796
800static snd_rawmidi_ops_t snd_usbmidi_output_ops = { 797static struct snd_rawmidi_ops snd_usbmidi_output_ops = {
801 .open = snd_usbmidi_output_open, 798 .open = snd_usbmidi_output_open,
802 .close = snd_usbmidi_output_close, 799 .close = snd_usbmidi_output_close,
803 .trigger = snd_usbmidi_output_trigger, 800 .trigger = snd_usbmidi_output_trigger,
804}; 801};
805 802
806static snd_rawmidi_ops_t snd_usbmidi_input_ops = { 803static struct snd_rawmidi_ops snd_usbmidi_input_ops = {
807 .open = snd_usbmidi_input_open, 804 .open = snd_usbmidi_input_open,
808 .close = snd_usbmidi_input_close, 805 .close = snd_usbmidi_input_close,
809 .trigger = snd_usbmidi_input_trigger 806 .trigger = snd_usbmidi_input_trigger
@@ -813,7 +810,7 @@ static snd_rawmidi_ops_t snd_usbmidi_input_ops = {
813 * Frees an input endpoint. 810 * Frees an input endpoint.
814 * May be called when ep hasn't been initialized completely. 811 * May be called when ep hasn't been initialized completely.
815 */ 812 */
816static void snd_usbmidi_in_endpoint_delete(snd_usb_midi_in_endpoint_t* ep) 813static void snd_usbmidi_in_endpoint_delete(struct snd_usb_midi_in_endpoint* ep)
817{ 814{
818 if (ep->urb) { 815 if (ep->urb) {
819 usb_buffer_free(ep->umidi->chip->dev, 816 usb_buffer_free(ep->umidi->chip->dev,
@@ -828,11 +825,11 @@ static void snd_usbmidi_in_endpoint_delete(snd_usb_midi_in_endpoint_t* ep)
828/* 825/*
829 * Creates an input endpoint. 826 * Creates an input endpoint.
830 */ 827 */
831static int snd_usbmidi_in_endpoint_create(snd_usb_midi_t* umidi, 828static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi,
832 snd_usb_midi_endpoint_info_t* ep_info, 829 struct snd_usb_midi_endpoint_info* ep_info,
833 snd_usb_midi_endpoint_t* rep) 830 struct snd_usb_midi_endpoint* rep)
834{ 831{
835 snd_usb_midi_in_endpoint_t* ep; 832 struct snd_usb_midi_in_endpoint* ep;
836 void* buffer; 833 void* buffer;
837 unsigned int pipe; 834 unsigned int pipe;
838 int length; 835 int length;
@@ -885,7 +882,7 @@ static unsigned int snd_usbmidi_count_bits(unsigned int x)
885 * Frees an output endpoint. 882 * Frees an output endpoint.
886 * May be called when ep hasn't been initialized completely. 883 * May be called when ep hasn't been initialized completely.
887 */ 884 */
888static void snd_usbmidi_out_endpoint_delete(snd_usb_midi_out_endpoint_t* ep) 885static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint* ep)
889{ 886{
890 if (ep->urb) { 887 if (ep->urb) {
891 usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer, 888 usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
@@ -899,11 +896,11 @@ static void snd_usbmidi_out_endpoint_delete(snd_usb_midi_out_endpoint_t* ep)
899/* 896/*
900 * Creates an output endpoint, and initializes output ports. 897 * Creates an output endpoint, and initializes output ports.
901 */ 898 */
902static int snd_usbmidi_out_endpoint_create(snd_usb_midi_t* umidi, 899static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
903 snd_usb_midi_endpoint_info_t* ep_info, 900 struct snd_usb_midi_endpoint_info* ep_info,
904 snd_usb_midi_endpoint_t* rep) 901 struct snd_usb_midi_endpoint* rep)
905{ 902{
906 snd_usb_midi_out_endpoint_t* ep; 903 struct snd_usb_midi_out_endpoint* ep;
907 int i; 904 int i;
908 unsigned int pipe; 905 unsigned int pipe;
909 void* buffer; 906 void* buffer;
@@ -951,12 +948,12 @@ static int snd_usbmidi_out_endpoint_create(snd_usb_midi_t* umidi,
951/* 948/*
952 * Frees everything. 949 * Frees everything.
953 */ 950 */
954static void snd_usbmidi_free(snd_usb_midi_t* umidi) 951static void snd_usbmidi_free(struct snd_usb_midi* umidi)
955{ 952{
956 int i; 953 int i;
957 954
958 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { 955 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
959 snd_usb_midi_endpoint_t* ep = &umidi->endpoints[i]; 956 struct snd_usb_midi_endpoint* ep = &umidi->endpoints[i];
960 if (ep->out) 957 if (ep->out)
961 snd_usbmidi_out_endpoint_delete(ep->out); 958 snd_usbmidi_out_endpoint_delete(ep->out);
962 if (ep->in) 959 if (ep->in)
@@ -970,13 +967,13 @@ static void snd_usbmidi_free(snd_usb_midi_t* umidi)
970 */ 967 */
971void snd_usbmidi_disconnect(struct list_head* p) 968void snd_usbmidi_disconnect(struct list_head* p)
972{ 969{
973 snd_usb_midi_t* umidi; 970 struct snd_usb_midi* umidi;
974 int i; 971 int i;
975 972
976 umidi = list_entry(p, snd_usb_midi_t, list); 973 umidi = list_entry(p, struct snd_usb_midi, list);
977 del_timer_sync(&umidi->error_timer); 974 del_timer_sync(&umidi->error_timer);
978 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { 975 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
979 snd_usb_midi_endpoint_t* ep = &umidi->endpoints[i]; 976 struct snd_usb_midi_endpoint* ep = &umidi->endpoints[i];
980 if (ep->out) 977 if (ep->out)
981 tasklet_kill(&ep->out->tasklet); 978 tasklet_kill(&ep->out->tasklet);
982 if (ep->out && ep->out->urb) { 979 if (ep->out && ep->out->urb) {
@@ -989,19 +986,19 @@ void snd_usbmidi_disconnect(struct list_head* p)
989 } 986 }
990} 987}
991 988
992static void snd_usbmidi_rawmidi_free(snd_rawmidi_t* rmidi) 989static void snd_usbmidi_rawmidi_free(struct snd_rawmidi *rmidi)
993{ 990{
994 snd_usb_midi_t* umidi = rmidi->private_data; 991 struct snd_usb_midi* umidi = rmidi->private_data;
995 snd_usbmidi_free(umidi); 992 snd_usbmidi_free(umidi);
996} 993}
997 994
998static snd_rawmidi_substream_t* snd_usbmidi_find_substream(snd_usb_midi_t* umidi, 995static struct snd_rawmidi_substream *snd_usbmidi_find_substream(struct snd_usb_midi* umidi,
999 int stream, int number) 996 int stream, int number)
1000{ 997{
1001 struct list_head* list; 998 struct list_head* list;
1002 999
1003 list_for_each(list, &umidi->rmidi->streams[stream].substreams) { 1000 list_for_each(list, &umidi->rmidi->streams[stream].substreams) {
1004 snd_rawmidi_substream_t* substream = list_entry(list, snd_rawmidi_substream_t, list); 1001 struct snd_rawmidi_substream *substream = list_entry(list, struct snd_rawmidi_substream, list);
1005 if (substream->number == number) 1002 if (substream->number == number)
1006 return substream; 1003 return substream;
1007 } 1004 }
@@ -1097,14 +1094,14 @@ static struct {
1097 { USB_ID(0x086a, 0x0003), 4, "%s Broadcast" }, 1094 { USB_ID(0x086a, 0x0003), 4, "%s Broadcast" },
1098}; 1095};
1099 1096
1100static void snd_usbmidi_init_substream(snd_usb_midi_t* umidi, 1097static void snd_usbmidi_init_substream(struct snd_usb_midi* umidi,
1101 int stream, int number, 1098 int stream, int number,
1102 snd_rawmidi_substream_t** rsubstream) 1099 struct snd_rawmidi_substream ** rsubstream)
1103{ 1100{
1104 int i; 1101 int i;
1105 const char *name_format; 1102 const char *name_format;
1106 1103
1107 snd_rawmidi_substream_t* substream = snd_usbmidi_find_substream(umidi, stream, number); 1104 struct snd_rawmidi_substream *substream = snd_usbmidi_find_substream(umidi, stream, number);
1108 if (!substream) { 1105 if (!substream) {
1109 snd_printd(KERN_ERR "substream %d:%d not found\n", stream, number); 1106 snd_printd(KERN_ERR "substream %d:%d not found\n", stream, number);
1110 return; 1107 return;
@@ -1128,8 +1125,8 @@ static void snd_usbmidi_init_substream(snd_usb_midi_t* umidi,
1128/* 1125/*
1129 * Creates the endpoints and their ports. 1126 * Creates the endpoints and their ports.
1130 */ 1127 */
1131static int snd_usbmidi_create_endpoints(snd_usb_midi_t* umidi, 1128static int snd_usbmidi_create_endpoints(struct snd_usb_midi* umidi,
1132 snd_usb_midi_endpoint_info_t* endpoints) 1129 struct snd_usb_midi_endpoint_info* endpoints)
1133{ 1130{
1134 int i, j, err; 1131 int i, j, err;
1135 int out_ports = 0, in_ports = 0; 1132 int out_ports = 0, in_ports = 0;
@@ -1169,8 +1166,8 @@ static int snd_usbmidi_create_endpoints(snd_usb_midi_t* umidi,
1169/* 1166/*
1170 * Returns MIDIStreaming device capabilities. 1167 * Returns MIDIStreaming device capabilities.
1171 */ 1168 */
1172static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi, 1169static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
1173 snd_usb_midi_endpoint_info_t* endpoints) 1170 struct snd_usb_midi_endpoint_info* endpoints)
1174{ 1171{
1175 struct usb_interface* intf; 1172 struct usb_interface* intf;
1176 struct usb_host_interface *hostif; 1173 struct usb_host_interface *hostif;
@@ -1244,7 +1241,7 @@ static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi,
1244 * On Roland devices, use the second alternate setting to be able to use 1241 * On Roland devices, use the second alternate setting to be able to use
1245 * the interrupt input endpoint. 1242 * the interrupt input endpoint.
1246 */ 1243 */
1247static void snd_usbmidi_switch_roland_altsetting(snd_usb_midi_t* umidi) 1244static void snd_usbmidi_switch_roland_altsetting(struct snd_usb_midi* umidi)
1248{ 1245{
1249 struct usb_interface* intf; 1246 struct usb_interface* intf;
1250 struct usb_host_interface *hostif; 1247 struct usb_host_interface *hostif;
@@ -1270,8 +1267,8 @@ static void snd_usbmidi_switch_roland_altsetting(snd_usb_midi_t* umidi)
1270/* 1267/*
1271 * Try to find any usable endpoints in the interface. 1268 * Try to find any usable endpoints in the interface.
1272 */ 1269 */
1273static int snd_usbmidi_detect_endpoints(snd_usb_midi_t* umidi, 1270static int snd_usbmidi_detect_endpoints(struct snd_usb_midi* umidi,
1274 snd_usb_midi_endpoint_info_t* endpoint, 1271 struct snd_usb_midi_endpoint_info* endpoint,
1275 int max_endpoints) 1272 int max_endpoints)
1276{ 1273{
1277 struct usb_interface* intf; 1274 struct usb_interface* intf;
@@ -1318,8 +1315,8 @@ static int snd_usbmidi_detect_endpoints(snd_usb_midi_t* umidi,
1318/* 1315/*
1319 * Detects the endpoints for one-port-per-endpoint protocols. 1316 * Detects the endpoints for one-port-per-endpoint protocols.
1320 */ 1317 */
1321static int snd_usbmidi_detect_per_port_endpoints(snd_usb_midi_t* umidi, 1318static int snd_usbmidi_detect_per_port_endpoints(struct snd_usb_midi* umidi,
1322 snd_usb_midi_endpoint_info_t* endpoints) 1319 struct snd_usb_midi_endpoint_info* endpoints)
1323{ 1320{
1324 int err, i; 1321 int err, i;
1325 1322
@@ -1336,8 +1333,8 @@ static int snd_usbmidi_detect_per_port_endpoints(snd_usb_midi_t* umidi,
1336/* 1333/*
1337 * Detects the endpoints and ports of Yamaha devices. 1334 * Detects the endpoints and ports of Yamaha devices.
1338 */ 1335 */
1339static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi, 1336static int snd_usbmidi_detect_yamaha(struct snd_usb_midi* umidi,
1340 snd_usb_midi_endpoint_info_t* endpoint) 1337 struct snd_usb_midi_endpoint_info* endpoint)
1341{ 1338{
1342 struct usb_interface* intf; 1339 struct usb_interface* intf;
1343 struct usb_host_interface *hostif; 1340 struct usb_host_interface *hostif;
@@ -1375,10 +1372,10 @@ static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi,
1375/* 1372/*
1376 * Creates the endpoints and their ports for Midiman devices. 1373 * Creates the endpoints and their ports for Midiman devices.
1377 */ 1374 */
1378static int snd_usbmidi_create_endpoints_midiman(snd_usb_midi_t* umidi, 1375static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi,
1379 snd_usb_midi_endpoint_info_t* endpoint) 1376 struct snd_usb_midi_endpoint_info* endpoint)
1380{ 1377{
1381 snd_usb_midi_endpoint_info_t ep_info; 1378 struct snd_usb_midi_endpoint_info ep_info;
1382 struct usb_interface* intf; 1379 struct usb_interface* intf;
1383 struct usb_host_interface *hostif; 1380 struct usb_host_interface *hostif;
1384 struct usb_interface_descriptor* intfd; 1381 struct usb_interface_descriptor* intfd;
@@ -1458,10 +1455,10 @@ static int snd_usbmidi_create_endpoints_midiman(snd_usb_midi_t* umidi,
1458 return 0; 1455 return 0;
1459} 1456}
1460 1457
1461static int snd_usbmidi_create_rawmidi(snd_usb_midi_t* umidi, 1458static int snd_usbmidi_create_rawmidi(struct snd_usb_midi* umidi,
1462 int out_ports, int in_ports) 1459 int out_ports, int in_ports)
1463{ 1460{
1464 snd_rawmidi_t* rmidi; 1461 struct snd_rawmidi *rmidi;
1465 int err; 1462 int err;
1466 1463
1467 err = snd_rawmidi_new(umidi->chip->card, "USB MIDI", 1464 err = snd_rawmidi_new(umidi->chip->card, "USB MIDI",
@@ -1487,18 +1484,18 @@ static int snd_usbmidi_create_rawmidi(snd_usb_midi_t* umidi,
1487 */ 1484 */
1488void snd_usbmidi_input_stop(struct list_head* p) 1485void snd_usbmidi_input_stop(struct list_head* p)
1489{ 1486{
1490 snd_usb_midi_t* umidi; 1487 struct snd_usb_midi* umidi;
1491 int i; 1488 int i;
1492 1489
1493 umidi = list_entry(p, snd_usb_midi_t, list); 1490 umidi = list_entry(p, struct snd_usb_midi, list);
1494 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { 1491 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
1495 snd_usb_midi_endpoint_t* ep = &umidi->endpoints[i]; 1492 struct snd_usb_midi_endpoint* ep = &umidi->endpoints[i];
1496 if (ep->in) 1493 if (ep->in)
1497 usb_kill_urb(ep->in->urb); 1494 usb_kill_urb(ep->in->urb);
1498 } 1495 }
1499} 1496}
1500 1497
1501static void snd_usbmidi_input_start_ep(snd_usb_midi_in_endpoint_t* ep) 1498static void snd_usbmidi_input_start_ep(struct snd_usb_midi_in_endpoint* ep)
1502{ 1499{
1503 if (ep) { 1500 if (ep) {
1504 struct urb* urb = ep->urb; 1501 struct urb* urb = ep->urb;
@@ -1512,10 +1509,10 @@ static void snd_usbmidi_input_start_ep(snd_usb_midi_in_endpoint_t* ep)
1512 */ 1509 */
1513void snd_usbmidi_input_start(struct list_head* p) 1510void snd_usbmidi_input_start(struct list_head* p)
1514{ 1511{
1515 snd_usb_midi_t* umidi; 1512 struct snd_usb_midi* umidi;
1516 int i; 1513 int i;
1517 1514
1518 umidi = list_entry(p, snd_usb_midi_t, list); 1515 umidi = list_entry(p, struct snd_usb_midi, list);
1519 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) 1516 for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
1520 snd_usbmidi_input_start_ep(umidi->endpoints[i].in); 1517 snd_usbmidi_input_start_ep(umidi->endpoints[i].in);
1521} 1518}
@@ -1523,12 +1520,12 @@ void snd_usbmidi_input_start(struct list_head* p)
1523/* 1520/*
1524 * Creates and registers everything needed for a MIDI streaming interface. 1521 * Creates and registers everything needed for a MIDI streaming interface.
1525 */ 1522 */
1526int snd_usb_create_midi_interface(snd_usb_audio_t* chip, 1523int snd_usb_create_midi_interface(struct snd_usb_audio* chip,
1527 struct usb_interface* iface, 1524 struct usb_interface* iface,
1528 const snd_usb_audio_quirk_t* quirk) 1525 const struct snd_usb_audio_quirk* quirk)
1529{ 1526{
1530 snd_usb_midi_t* umidi; 1527 struct snd_usb_midi* umidi;
1531 snd_usb_midi_endpoint_info_t endpoints[MIDI_MAX_ENDPOINTS]; 1528 struct snd_usb_midi_endpoint_info endpoints[MIDI_MAX_ENDPOINTS];
1532 int out_ports, in_ports; 1529 int out_ports, in_ports;
1533 int i, err; 1530 int i, err;
1534 1531
@@ -1551,7 +1548,7 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip,
1551 break; 1548 break;
1552 case QUIRK_MIDI_FIXED_ENDPOINT: 1549 case QUIRK_MIDI_FIXED_ENDPOINT:
1553 memcpy(&endpoints[0], quirk->data, 1550 memcpy(&endpoints[0], quirk->data,
1554 sizeof(snd_usb_midi_endpoint_info_t)); 1551 sizeof(struct snd_usb_midi_endpoint_info));
1555 err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1); 1552 err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1);
1556 break; 1553 break;
1557 case QUIRK_MIDI_YAMAHA: 1554 case QUIRK_MIDI_YAMAHA:
@@ -1560,7 +1557,7 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip,
1560 case QUIRK_MIDI_MIDIMAN: 1557 case QUIRK_MIDI_MIDIMAN:
1561 umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops; 1558 umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops;
1562 memcpy(&endpoints[0], quirk->data, 1559 memcpy(&endpoints[0], quirk->data,
1563 sizeof(snd_usb_midi_endpoint_info_t)); 1560 sizeof(struct snd_usb_midi_endpoint_info));
1564 err = 0; 1561 err = 0;
1565 break; 1562 break;
1566 case QUIRK_MIDI_NOVATION: 1563 case QUIRK_MIDI_NOVATION:
@@ -1574,7 +1571,7 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip,
1574 case QUIRK_MIDI_EMAGIC: 1571 case QUIRK_MIDI_EMAGIC:
1575 umidi->usb_protocol_ops = &snd_usbmidi_emagic_ops; 1572 umidi->usb_protocol_ops = &snd_usbmidi_emagic_ops;
1576 memcpy(&endpoints[0], quirk->data, 1573 memcpy(&endpoints[0], quirk->data,
1577 sizeof(snd_usb_midi_endpoint_info_t)); 1574 sizeof(struct snd_usb_midi_endpoint_info));
1578 err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1); 1575 err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1);
1579 break; 1576 break;
1580 case QUIRK_MIDI_MIDITECH: 1577 case QUIRK_MIDI_MIDITECH:
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index e570d140258d..678dac2d4dba 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -46,18 +46,13 @@
46/* ignore error from controls - for debugging */ 46/* ignore error from controls - for debugging */
47/* #define IGNORE_CTL_ERROR */ 47/* #define IGNORE_CTL_ERROR */
48 48
49typedef struct usb_mixer_build mixer_build_t;
50typedef struct usb_audio_term usb_audio_term_t;
51typedef struct usb_mixer_elem_info usb_mixer_elem_info_t;
52
53
54struct usb_mixer_interface { 49struct usb_mixer_interface {
55 snd_usb_audio_t *chip; 50 struct snd_usb_audio *chip;
56 unsigned int ctrlif; 51 unsigned int ctrlif;
57 struct list_head list; 52 struct list_head list;
58 unsigned int ignore_ctl_error; 53 unsigned int ignore_ctl_error;
59 struct urb *urb; 54 struct urb *urb;
60 usb_mixer_elem_info_t **id_elems; /* array[256], indexed by unit id */ 55 struct usb_mixer_elem_info **id_elems; /* array[256], indexed by unit id */
61 56
62 /* Sound Blaster remote control stuff */ 57 /* Sound Blaster remote control stuff */
63 enum { 58 enum {
@@ -86,21 +81,21 @@ struct usb_audio_term {
86 81
87struct usbmix_name_map; 82struct usbmix_name_map;
88 83
89struct usb_mixer_build { 84struct mixer_build {
90 snd_usb_audio_t *chip; 85 struct snd_usb_audio *chip;
91 struct usb_mixer_interface *mixer; 86 struct usb_mixer_interface *mixer;
92 unsigned char *buffer; 87 unsigned char *buffer;
93 unsigned int buflen; 88 unsigned int buflen;
94 DECLARE_BITMAP(unitbitmap, 256); 89 DECLARE_BITMAP(unitbitmap, 256);
95 usb_audio_term_t oterm; 90 struct usb_audio_term oterm;
96 const struct usbmix_name_map *map; 91 const struct usbmix_name_map *map;
97 const struct usbmix_selector_map *selector_map; 92 const struct usbmix_selector_map *selector_map;
98}; 93};
99 94
100struct usb_mixer_elem_info { 95struct usb_mixer_elem_info {
101 struct usb_mixer_interface *mixer; 96 struct usb_mixer_interface *mixer;
102 usb_mixer_elem_info_t *next_id_elem; /* list of controls with same id */ 97 struct usb_mixer_elem_info *next_id_elem; /* list of controls with same id */
103 snd_ctl_elem_id_t *elem_id; 98 struct snd_ctl_elem_id *elem_id;
104 unsigned int id; 99 unsigned int id;
105 unsigned int control; /* CS or ICN (high byte) */ 100 unsigned int control; /* CS or ICN (high byte) */
106 unsigned int cmask; /* channel mask bitmap: 0 = master */ 101 unsigned int cmask; /* channel mask bitmap: 0 = master */
@@ -179,7 +174,7 @@ enum {
179#include "usbmixer_maps.c" 174#include "usbmixer_maps.c"
180 175
181/* get the mapped name if the unit matches */ 176/* get the mapped name if the unit matches */
182static int check_mapped_name(mixer_build_t *state, int unitid, int control, char *buf, int buflen) 177static int check_mapped_name(struct mixer_build *state, int unitid, int control, char *buf, int buflen)
183{ 178{
184 const struct usbmix_name_map *p; 179 const struct usbmix_name_map *p;
185 180
@@ -197,7 +192,7 @@ static int check_mapped_name(mixer_build_t *state, int unitid, int control, char
197} 192}
198 193
199/* check whether the control should be ignored */ 194/* check whether the control should be ignored */
200static int check_ignored_ctl(mixer_build_t *state, int unitid, int control) 195static int check_ignored_ctl(struct mixer_build *state, int unitid, int control)
201{ 196{
202 const struct usbmix_name_map *p; 197 const struct usbmix_name_map *p;
203 198
@@ -214,7 +209,7 @@ static int check_ignored_ctl(mixer_build_t *state, int unitid, int control)
214} 209}
215 210
216/* get the mapped selector source name */ 211/* get the mapped selector source name */
217static int check_mapped_selector_name(mixer_build_t *state, int unitid, 212static int check_mapped_selector_name(struct mixer_build *state, int unitid,
218 int index, char *buf, int buflen) 213 int index, char *buf, int buflen)
219{ 214{
220 const struct usbmix_selector_map *p; 215 const struct usbmix_selector_map *p;
@@ -231,7 +226,7 @@ static int check_mapped_selector_name(mixer_build_t *state, int unitid,
231/* 226/*
232 * find an audio control unit with the given unit id 227 * find an audio control unit with the given unit id
233 */ 228 */
234static void *find_audio_control_unit(mixer_build_t *state, unsigned char unit) 229static void *find_audio_control_unit(struct mixer_build *state, unsigned char unit)
235{ 230{
236 unsigned char *p; 231 unsigned char *p;
237 232
@@ -248,7 +243,7 @@ static void *find_audio_control_unit(mixer_build_t *state, unsigned char unit)
248/* 243/*
249 * copy a string with the given id 244 * copy a string with the given id
250 */ 245 */
251static int snd_usb_copy_string_desc(mixer_build_t *state, int index, char *buf, int maxlen) 246static int snd_usb_copy_string_desc(struct mixer_build *state, int index, char *buf, int maxlen)
252{ 247{
253 int len = usb_string(state->chip->dev, index, buf, maxlen - 1); 248 int len = usb_string(state->chip->dev, index, buf, maxlen - 1);
254 buf[len] = 0; 249 buf[len] = 0;
@@ -258,7 +253,7 @@ static int snd_usb_copy_string_desc(mixer_build_t *state, int index, char *buf,
258/* 253/*
259 * convert from the byte/word on usb descriptor to the zero-based integer 254 * convert from the byte/word on usb descriptor to the zero-based integer
260 */ 255 */
261static int convert_signed_value(usb_mixer_elem_info_t *cval, int val) 256static int convert_signed_value(struct usb_mixer_elem_info *cval, int val)
262{ 257{
263 switch (cval->val_type) { 258 switch (cval->val_type) {
264 case USB_MIXER_BOOLEAN: 259 case USB_MIXER_BOOLEAN:
@@ -288,7 +283,7 @@ static int convert_signed_value(usb_mixer_elem_info_t *cval, int val)
288/* 283/*
289 * convert from the zero-based int to the byte/word for usb descriptor 284 * convert from the zero-based int to the byte/word for usb descriptor
290 */ 285 */
291static int convert_bytes_value(usb_mixer_elem_info_t *cval, int val) 286static int convert_bytes_value(struct usb_mixer_elem_info *cval, int val)
292{ 287{
293 switch (cval->val_type) { 288 switch (cval->val_type) {
294 case USB_MIXER_BOOLEAN: 289 case USB_MIXER_BOOLEAN:
@@ -305,7 +300,7 @@ static int convert_bytes_value(usb_mixer_elem_info_t *cval, int val)
305 return 0; /* not reached */ 300 return 0; /* not reached */
306} 301}
307 302
308static int get_relative_value(usb_mixer_elem_info_t *cval, int val) 303static int get_relative_value(struct usb_mixer_elem_info *cval, int val)
309{ 304{
310 if (! cval->res) 305 if (! cval->res)
311 cval->res = 1; 306 cval->res = 1;
@@ -317,7 +312,7 @@ static int get_relative_value(usb_mixer_elem_info_t *cval, int val)
317 return (val - cval->min) / cval->res; 312 return (val - cval->min) / cval->res;
318} 313}
319 314
320static int get_abs_value(usb_mixer_elem_info_t *cval, int val) 315static int get_abs_value(struct usb_mixer_elem_info *cval, int val)
321{ 316{
322 if (val < 0) 317 if (val < 0)
323 return cval->min; 318 return cval->min;
@@ -335,7 +330,7 @@ static int get_abs_value(usb_mixer_elem_info_t *cval, int val)
335 * retrieve a mixer value 330 * retrieve a mixer value
336 */ 331 */
337 332
338static int get_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, int *value_ret) 333static int get_ctl_value(struct usb_mixer_elem_info *cval, int request, int validx, int *value_ret)
339{ 334{
340 unsigned char buf[2]; 335 unsigned char buf[2];
341 int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1; 336 int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1;
@@ -357,13 +352,13 @@ static int get_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i
357 return -EINVAL; 352 return -EINVAL;
358} 353}
359 354
360static int get_cur_ctl_value(usb_mixer_elem_info_t *cval, int validx, int *value) 355static int get_cur_ctl_value(struct usb_mixer_elem_info *cval, int validx, int *value)
361{ 356{
362 return get_ctl_value(cval, GET_CUR, validx, value); 357 return get_ctl_value(cval, GET_CUR, validx, value);
363} 358}
364 359
365/* channel = 0: master, 1 = first channel */ 360/* channel = 0: master, 1 = first channel */
366static inline int get_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, int *value) 361static inline int get_cur_mix_value(struct usb_mixer_elem_info *cval, int channel, int *value)
367{ 362{
368 return get_ctl_value(cval, GET_CUR, (cval->control << 8) | channel, value); 363 return get_ctl_value(cval, GET_CUR, (cval->control << 8) | channel, value);
369} 364}
@@ -372,7 +367,7 @@ static inline int get_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, in
372 * set a mixer value 367 * set a mixer value
373 */ 368 */
374 369
375static int set_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, int value_set) 370static int set_ctl_value(struct usb_mixer_elem_info *cval, int request, int validx, int value_set)
376{ 371{
377 unsigned char buf[2]; 372 unsigned char buf[2];
378 int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1; 373 int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1;
@@ -394,12 +389,12 @@ static int set_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i
394 return -EINVAL; 389 return -EINVAL;
395} 390}
396 391
397static int set_cur_ctl_value(usb_mixer_elem_info_t *cval, int validx, int value) 392static int set_cur_ctl_value(struct usb_mixer_elem_info *cval, int validx, int value)
398{ 393{
399 return set_ctl_value(cval, SET_CUR, validx, value); 394 return set_ctl_value(cval, SET_CUR, validx, value);
400} 395}
401 396
402static inline int set_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, int value) 397static inline int set_cur_mix_value(struct usb_mixer_elem_info *cval, int channel, int value)
403{ 398{
404 return set_ctl_value(cval, SET_CUR, (cval->control << 8) | channel, value); 399 return set_ctl_value(cval, SET_CUR, (cval->control << 8) | channel, value);
405} 400}
@@ -409,7 +404,7 @@ static inline int set_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, in
409 * parser routines begin here... 404 * parser routines begin here...
410 */ 405 */
411 406
412static int parse_audio_unit(mixer_build_t *state, int unitid); 407static int parse_audio_unit(struct mixer_build *state, int unitid);
413 408
414 409
415/* 410/*
@@ -430,9 +425,9 @@ static int check_matrix_bitmap(unsigned char *bmap, int ich, int och, int num_ou
430 * if failed, give up and free the control instance. 425 * if failed, give up and free the control instance.
431 */ 426 */
432 427
433static int add_control_to_empty(mixer_build_t *state, snd_kcontrol_t *kctl) 428static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
434{ 429{
435 usb_mixer_elem_info_t *cval = kctl->private_data; 430 struct usb_mixer_elem_info *cval = kctl->private_data;
436 int err; 431 int err;
437 432
438 while (snd_ctl_find_id(state->chip->card, &kctl->id)) 433 while (snd_ctl_find_id(state->chip->card, &kctl->id))
@@ -496,7 +491,7 @@ static struct iterm_name_combo {
496 { 0 }, 491 { 0 },
497}; 492};
498 493
499static int get_term_name(mixer_build_t *state, usb_audio_term_t *iterm, 494static int get_term_name(struct mixer_build *state, struct usb_audio_term *iterm,
500 unsigned char *name, int maxlen, int term_only) 495 unsigned char *name, int maxlen, int term_only)
501{ 496{
502 struct iterm_name_combo *names; 497 struct iterm_name_combo *names;
@@ -546,7 +541,7 @@ static int get_term_name(mixer_build_t *state, usb_audio_term_t *iterm,
546 * parse the source unit recursively until it reaches to a terminal 541 * parse the source unit recursively until it reaches to a terminal
547 * or a branched unit. 542 * or a branched unit.
548 */ 543 */
549static int check_input_term(mixer_build_t *state, int id, usb_audio_term_t *term) 544static int check_input_term(struct mixer_build *state, int id, struct usb_audio_term *term)
550{ 545{
551 unsigned char *p1; 546 unsigned char *p1;
552 547
@@ -621,7 +616,7 @@ static struct usb_feature_control_info audio_feature_info[] = {
621 616
622 617
623/* private_free callback */ 618/* private_free callback */
624static void usb_mixer_elem_free(snd_kcontrol_t *kctl) 619static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
625{ 620{
626 kfree(kctl->private_data); 621 kfree(kctl->private_data);
627 kctl->private_data = NULL; 622 kctl->private_data = NULL;
@@ -635,7 +630,7 @@ static void usb_mixer_elem_free(snd_kcontrol_t *kctl)
635/* 630/*
636 * retrieve the minimum and maximum values for the specified control 631 * retrieve the minimum and maximum values for the specified control
637 */ 632 */
638static int get_min_max(usb_mixer_elem_info_t *cval, int default_min) 633static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
639{ 634{
640 /* for failsafe */ 635 /* for failsafe */
641 cval->min = default_min; 636 cval->min = default_min;
@@ -683,9 +678,9 @@ static int get_min_max(usb_mixer_elem_info_t *cval, int default_min)
683 678
684 679
685/* get a feature/mixer unit info */ 680/* get a feature/mixer unit info */
686static int mixer_ctl_feature_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 681static int mixer_ctl_feature_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
687{ 682{
688 usb_mixer_elem_info_t *cval = kcontrol->private_data; 683 struct usb_mixer_elem_info *cval = kcontrol->private_data;
689 684
690 if (cval->val_type == USB_MIXER_BOOLEAN || 685 if (cval->val_type == USB_MIXER_BOOLEAN ||
691 cval->val_type == USB_MIXER_INV_BOOLEAN) 686 cval->val_type == USB_MIXER_INV_BOOLEAN)
@@ -707,9 +702,9 @@ static int mixer_ctl_feature_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
707} 702}
708 703
709/* get the current value from feature/mixer unit */ 704/* get the current value from feature/mixer unit */
710static int mixer_ctl_feature_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 705static int mixer_ctl_feature_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
711{ 706{
712 usb_mixer_elem_info_t *cval = kcontrol->private_data; 707 struct usb_mixer_elem_info *cval = kcontrol->private_data;
713 int c, cnt, val, err; 708 int c, cnt, val, err;
714 709
715 if (cval->cmask) { 710 if (cval->cmask) {
@@ -748,9 +743,9 @@ static int mixer_ctl_feature_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
748} 743}
749 744
750/* put the current value to feature/mixer unit */ 745/* put the current value to feature/mixer unit */
751static int mixer_ctl_feature_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 746static int mixer_ctl_feature_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
752{ 747{
753 usb_mixer_elem_info_t *cval = kcontrol->private_data; 748 struct usb_mixer_elem_info *cval = kcontrol->private_data;
754 int c, cnt, val, oval, err; 749 int c, cnt, val, oval, err;
755 int changed = 0; 750 int changed = 0;
756 751
@@ -791,7 +786,7 @@ static int mixer_ctl_feature_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
791 return changed; 786 return changed;
792} 787}
793 788
794static snd_kcontrol_new_t usb_feature_unit_ctl = { 789static struct snd_kcontrol_new usb_feature_unit_ctl = {
795 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 790 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
796 .name = "", /* will be filled later manually */ 791 .name = "", /* will be filled later manually */
797 .info = mixer_ctl_feature_info, 792 .info = mixer_ctl_feature_info,
@@ -804,15 +799,15 @@ static snd_kcontrol_new_t usb_feature_unit_ctl = {
804 * build a feature control 799 * build a feature control
805 */ 800 */
806 801
807static void build_feature_ctl(mixer_build_t *state, unsigned char *desc, 802static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
808 unsigned int ctl_mask, int control, 803 unsigned int ctl_mask, int control,
809 usb_audio_term_t *iterm, int unitid) 804 struct usb_audio_term *iterm, int unitid)
810{ 805{
811 unsigned int len = 0; 806 unsigned int len = 0;
812 int mapped_name = 0; 807 int mapped_name = 0;
813 int nameid = desc[desc[0] - 1]; 808 int nameid = desc[desc[0] - 1];
814 snd_kcontrol_t *kctl; 809 struct snd_kcontrol *kctl;
815 usb_mixer_elem_info_t *cval; 810 struct usb_mixer_elem_info *cval;
816 811
817 control++; /* change from zero-based to 1-based value */ 812 control++; /* change from zero-based to 1-based value */
818 813
@@ -928,10 +923,10 @@ static void build_feature_ctl(mixer_build_t *state, unsigned char *desc,
928 * 923 *
929 * most of controlls are defined here. 924 * most of controlls are defined here.
930 */ 925 */
931static int parse_audio_feature_unit(mixer_build_t *state, int unitid, unsigned char *ftr) 926static int parse_audio_feature_unit(struct mixer_build *state, int unitid, unsigned char *ftr)
932{ 927{
933 int channels, i, j; 928 int channels, i, j;
934 usb_audio_term_t iterm; 929 struct usb_audio_term iterm;
935 unsigned int master_bits, first_ch_bits; 930 unsigned int master_bits, first_ch_bits;
936 int err, csize; 931 int err, csize;
937 932
@@ -984,15 +979,15 @@ static int parse_audio_feature_unit(mixer_build_t *state, int unitid, unsigned c
984 * input channel number (zero based) is given in control field instead. 979 * input channel number (zero based) is given in control field instead.
985 */ 980 */
986 981
987static void build_mixer_unit_ctl(mixer_build_t *state, unsigned char *desc, 982static void build_mixer_unit_ctl(struct mixer_build *state, unsigned char *desc,
988 int in_pin, int in_ch, int unitid, 983 int in_pin, int in_ch, int unitid,
989 usb_audio_term_t *iterm) 984 struct usb_audio_term *iterm)
990{ 985{
991 usb_mixer_elem_info_t *cval; 986 struct usb_mixer_elem_info *cval;
992 unsigned int input_pins = desc[4]; 987 unsigned int input_pins = desc[4];
993 unsigned int num_outs = desc[5 + input_pins]; 988 unsigned int num_outs = desc[5 + input_pins];
994 unsigned int i, len; 989 unsigned int i, len;
995 snd_kcontrol_t *kctl; 990 struct snd_kcontrol *kctl;
996 991
997 if (check_ignored_ctl(state, unitid, 0)) 992 if (check_ignored_ctl(state, unitid, 0))
998 return; 993 return;
@@ -1039,9 +1034,9 @@ static void build_mixer_unit_ctl(mixer_build_t *state, unsigned char *desc,
1039/* 1034/*
1040 * parse a mixer unit 1035 * parse a mixer unit
1041 */ 1036 */
1042static int parse_audio_mixer_unit(mixer_build_t *state, int unitid, unsigned char *desc) 1037static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, unsigned char *desc)
1043{ 1038{
1044 usb_audio_term_t iterm; 1039 struct usb_audio_term iterm;
1045 int input_pins, num_ins, num_outs; 1040 int input_pins, num_ins, num_outs;
1046 int pin, ich, err; 1041 int pin, ich, err;
1047 1042
@@ -1089,9 +1084,9 @@ static int parse_audio_mixer_unit(mixer_build_t *state, int unitid, unsigned cha
1089 */ 1084 */
1090 1085
1091/* get callback for processing/extension unit */ 1086/* get callback for processing/extension unit */
1092static int mixer_ctl_procunit_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1087static int mixer_ctl_procunit_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1093{ 1088{
1094 usb_mixer_elem_info_t *cval = kcontrol->private_data; 1089 struct usb_mixer_elem_info *cval = kcontrol->private_data;
1095 int err, val; 1090 int err, val;
1096 1091
1097 err = get_cur_ctl_value(cval, cval->control << 8, &val); 1092 err = get_cur_ctl_value(cval, cval->control << 8, &val);
@@ -1107,9 +1102,9 @@ static int mixer_ctl_procunit_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
1107} 1102}
1108 1103
1109/* put callback for processing/extension unit */ 1104/* put callback for processing/extension unit */
1110static int mixer_ctl_procunit_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1105static int mixer_ctl_procunit_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1111{ 1106{
1112 usb_mixer_elem_info_t *cval = kcontrol->private_data; 1107 struct usb_mixer_elem_info *cval = kcontrol->private_data;
1113 int val, oval, err; 1108 int val, oval, err;
1114 1109
1115 err = get_cur_ctl_value(cval, cval->control << 8, &oval); 1110 err = get_cur_ctl_value(cval, cval->control << 8, &oval);
@@ -1128,7 +1123,7 @@ static int mixer_ctl_procunit_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
1128} 1123}
1129 1124
1130/* alsa control interface for processing/extension unit */ 1125/* alsa control interface for processing/extension unit */
1131static snd_kcontrol_new_t mixer_procunit_ctl = { 1126static struct snd_kcontrol_new mixer_procunit_ctl = {
1132 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1127 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1133 .name = "", /* will be filled later */ 1128 .name = "", /* will be filled later */
1134 .info = mixer_ctl_feature_info, 1129 .info = mixer_ctl_feature_info,
@@ -1205,11 +1200,11 @@ static struct procunit_info procunits[] = {
1205/* 1200/*
1206 * build a processing/extension unit 1201 * build a processing/extension unit
1207 */ 1202 */
1208static int build_audio_procunit(mixer_build_t *state, int unitid, unsigned char *dsc, struct procunit_info *list, char *name) 1203static int build_audio_procunit(struct mixer_build *state, int unitid, unsigned char *dsc, struct procunit_info *list, char *name)
1209{ 1204{
1210 int num_ins = dsc[6]; 1205 int num_ins = dsc[6];
1211 usb_mixer_elem_info_t *cval; 1206 struct usb_mixer_elem_info *cval;
1212 snd_kcontrol_t *kctl; 1207 struct snd_kcontrol *kctl;
1213 int i, err, nameid, type, len; 1208 int i, err, nameid, type, len;
1214 struct procunit_info *info; 1209 struct procunit_info *info;
1215 struct procunit_value_info *valinfo; 1210 struct procunit_value_info *valinfo;
@@ -1297,12 +1292,12 @@ static int build_audio_procunit(mixer_build_t *state, int unitid, unsigned char
1297} 1292}
1298 1293
1299 1294
1300static int parse_audio_processing_unit(mixer_build_t *state, int unitid, unsigned char *desc) 1295static int parse_audio_processing_unit(struct mixer_build *state, int unitid, unsigned char *desc)
1301{ 1296{
1302 return build_audio_procunit(state, unitid, desc, procunits, "Processing Unit"); 1297 return build_audio_procunit(state, unitid, desc, procunits, "Processing Unit");
1303} 1298}
1304 1299
1305static int parse_audio_extension_unit(mixer_build_t *state, int unitid, unsigned char *desc) 1300static int parse_audio_extension_unit(struct mixer_build *state, int unitid, unsigned char *desc)
1306{ 1301{
1307 return build_audio_procunit(state, unitid, desc, NULL, "Extension Unit"); 1302 return build_audio_procunit(state, unitid, desc, NULL, "Extension Unit");
1308} 1303}
@@ -1315,9 +1310,9 @@ static int parse_audio_extension_unit(mixer_build_t *state, int unitid, unsigned
1315/* info callback for selector unit 1310/* info callback for selector unit
1316 * use an enumerator type for routing 1311 * use an enumerator type for routing
1317 */ 1312 */
1318static int mixer_ctl_selector_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1313static int mixer_ctl_selector_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1319{ 1314{
1320 usb_mixer_elem_info_t *cval = kcontrol->private_data; 1315 struct usb_mixer_elem_info *cval = kcontrol->private_data;
1321 char **itemlist = (char **)kcontrol->private_value; 1316 char **itemlist = (char **)kcontrol->private_value;
1322 1317
1323 snd_assert(itemlist, return -EINVAL); 1318 snd_assert(itemlist, return -EINVAL);
@@ -1331,9 +1326,9 @@ static int mixer_ctl_selector_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
1331} 1326}
1332 1327
1333/* get callback for selector unit */ 1328/* get callback for selector unit */
1334static int mixer_ctl_selector_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1329static int mixer_ctl_selector_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1335{ 1330{
1336 usb_mixer_elem_info_t *cval = kcontrol->private_data; 1331 struct usb_mixer_elem_info *cval = kcontrol->private_data;
1337 int val, err; 1332 int val, err;
1338 1333
1339 err = get_cur_ctl_value(cval, 0, &val); 1334 err = get_cur_ctl_value(cval, 0, &val);
@@ -1350,9 +1345,9 @@ static int mixer_ctl_selector_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
1350} 1345}
1351 1346
1352/* put callback for selector unit */ 1347/* put callback for selector unit */
1353static int mixer_ctl_selector_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1348static int mixer_ctl_selector_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1354{ 1349{
1355 usb_mixer_elem_info_t *cval = kcontrol->private_data; 1350 struct usb_mixer_elem_info *cval = kcontrol->private_data;
1356 int val, oval, err; 1351 int val, oval, err;
1357 1352
1358 err = get_cur_ctl_value(cval, 0, &oval); 1353 err = get_cur_ctl_value(cval, 0, &oval);
@@ -1371,7 +1366,7 @@ static int mixer_ctl_selector_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
1371} 1366}
1372 1367
1373/* alsa control interface for selector unit */ 1368/* alsa control interface for selector unit */
1374static snd_kcontrol_new_t mixer_selectunit_ctl = { 1369static struct snd_kcontrol_new mixer_selectunit_ctl = {
1375 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1370 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1376 .name = "", /* will be filled later */ 1371 .name = "", /* will be filled later */
1377 .info = mixer_ctl_selector_info, 1372 .info = mixer_ctl_selector_info,
@@ -1383,12 +1378,12 @@ static snd_kcontrol_new_t mixer_selectunit_ctl = {
1383/* private free callback. 1378/* private free callback.
1384 * free both private_data and private_value 1379 * free both private_data and private_value
1385 */ 1380 */
1386static void usb_mixer_selector_elem_free(snd_kcontrol_t *kctl) 1381static void usb_mixer_selector_elem_free(struct snd_kcontrol *kctl)
1387{ 1382{
1388 int i, num_ins = 0; 1383 int i, num_ins = 0;
1389 1384
1390 if (kctl->private_data) { 1385 if (kctl->private_data) {
1391 usb_mixer_elem_info_t *cval = kctl->private_data; 1386 struct usb_mixer_elem_info *cval = kctl->private_data;
1392 num_ins = cval->max; 1387 num_ins = cval->max;
1393 kfree(cval); 1388 kfree(cval);
1394 kctl->private_data = NULL; 1389 kctl->private_data = NULL;
@@ -1405,13 +1400,13 @@ static void usb_mixer_selector_elem_free(snd_kcontrol_t *kctl)
1405/* 1400/*
1406 * parse a selector unit 1401 * parse a selector unit
1407 */ 1402 */
1408static int parse_audio_selector_unit(mixer_build_t *state, int unitid, unsigned char *desc) 1403static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsigned char *desc)
1409{ 1404{
1410 unsigned int num_ins = desc[4]; 1405 unsigned int num_ins = desc[4];
1411 unsigned int i, nameid, len; 1406 unsigned int i, nameid, len;
1412 int err; 1407 int err;
1413 usb_mixer_elem_info_t *cval; 1408 struct usb_mixer_elem_info *cval;
1414 snd_kcontrol_t *kctl; 1409 struct snd_kcontrol *kctl;
1415 char **namelist; 1410 char **namelist;
1416 1411
1417 if (! num_ins || desc[0] < 6 + num_ins) { 1412 if (! num_ins || desc[0] < 6 + num_ins) {
@@ -1452,7 +1447,7 @@ static int parse_audio_selector_unit(mixer_build_t *state, int unitid, unsigned
1452 } 1447 }
1453#define MAX_ITEM_NAME_LEN 64 1448#define MAX_ITEM_NAME_LEN 64
1454 for (i = 0; i < num_ins; i++) { 1449 for (i = 0; i < num_ins; i++) {
1455 usb_audio_term_t iterm; 1450 struct usb_audio_term iterm;
1456 len = 0; 1451 len = 0;
1457 namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL); 1452 namelist[i] = kmalloc(MAX_ITEM_NAME_LEN, GFP_KERNEL);
1458 if (! namelist[i]) { 1453 if (! namelist[i]) {
@@ -1511,7 +1506,7 @@ static int parse_audio_selector_unit(mixer_build_t *state, int unitid, unsigned
1511 * parse an audio unit recursively 1506 * parse an audio unit recursively
1512 */ 1507 */
1513 1508
1514static int parse_audio_unit(mixer_build_t *state, int unitid) 1509static int parse_audio_unit(struct mixer_build *state, int unitid)
1515{ 1510{
1516 unsigned char *p1; 1511 unsigned char *p1;
1517 1512
@@ -1556,7 +1551,7 @@ static void snd_usb_mixer_free(struct usb_mixer_interface *mixer)
1556 kfree(mixer); 1551 kfree(mixer);
1557} 1552}
1558 1553
1559static int snd_usb_mixer_dev_free(snd_device_t *device) 1554static int snd_usb_mixer_dev_free(struct snd_device *device)
1560{ 1555{
1561 struct usb_mixer_interface *mixer = device->device_data; 1556 struct usb_mixer_interface *mixer = device->device_data;
1562 snd_usb_mixer_free(mixer); 1557 snd_usb_mixer_free(mixer);
@@ -1571,7 +1566,7 @@ static int snd_usb_mixer_dev_free(snd_device_t *device)
1571static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer) 1566static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
1572{ 1567{
1573 unsigned char *desc; 1568 unsigned char *desc;
1574 mixer_build_t state; 1569 struct mixer_build state;
1575 int err; 1570 int err;
1576 const struct usbmix_ctl_map *map; 1571 const struct usbmix_ctl_map *map;
1577 struct usb_host_interface *hostif; 1572 struct usb_host_interface *hostif;
@@ -1611,7 +1606,7 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
1611static void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, 1606static void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer,
1612 int unitid) 1607 int unitid)
1613{ 1608{
1614 usb_mixer_elem_info_t *info; 1609 struct usb_mixer_elem_info *info;
1615 1610
1616 for (info = mixer->id_elems[unitid]; info; info = info->next_id_elem) 1611 for (info = mixer->id_elems[unitid]; info; info = info->next_id_elem)
1617 snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE, 1612 snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE,
@@ -1725,7 +1720,7 @@ static void snd_usb_soundblaster_remote_complete(struct urb *urb,
1725 wake_up(&mixer->rc_waitq); 1720 wake_up(&mixer->rc_waitq);
1726} 1721}
1727 1722
1728static int snd_usb_sbrc_hwdep_open(snd_hwdep_t *hw, struct file *file) 1723static int snd_usb_sbrc_hwdep_open(struct snd_hwdep *hw, struct file *file)
1729{ 1724{
1730 struct usb_mixer_interface *mixer = hw->private_data; 1725 struct usb_mixer_interface *mixer = hw->private_data;
1731 1726
@@ -1734,7 +1729,7 @@ static int snd_usb_sbrc_hwdep_open(snd_hwdep_t *hw, struct file *file)
1734 return 0; 1729 return 0;
1735} 1730}
1736 1731
1737static int snd_usb_sbrc_hwdep_release(snd_hwdep_t *hw, struct file *file) 1732static int snd_usb_sbrc_hwdep_release(struct snd_hwdep *hw, struct file *file)
1738{ 1733{
1739 struct usb_mixer_interface *mixer = hw->private_data; 1734 struct usb_mixer_interface *mixer = hw->private_data;
1740 1735
@@ -1743,7 +1738,7 @@ static int snd_usb_sbrc_hwdep_release(snd_hwdep_t *hw, struct file *file)
1743 return 0; 1738 return 0;
1744} 1739}
1745 1740
1746static long snd_usb_sbrc_hwdep_read(snd_hwdep_t *hw, char __user *buf, 1741static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf,
1747 long count, loff_t *offset) 1742 long count, loff_t *offset)
1748{ 1743{
1749 struct usb_mixer_interface *mixer = hw->private_data; 1744 struct usb_mixer_interface *mixer = hw->private_data;
@@ -1763,7 +1758,7 @@ static long snd_usb_sbrc_hwdep_read(snd_hwdep_t *hw, char __user *buf,
1763 return err < 0 ? err : count; 1758 return err < 0 ? err : count;
1764} 1759}
1765 1760
1766static unsigned int snd_usb_sbrc_hwdep_poll(snd_hwdep_t *hw, struct file *file, 1761static unsigned int snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file,
1767 poll_table *wait) 1762 poll_table *wait)
1768{ 1763{
1769 struct usb_mixer_interface *mixer = hw->private_data; 1764 struct usb_mixer_interface *mixer = hw->private_data;
@@ -1774,7 +1769,7 @@ static unsigned int snd_usb_sbrc_hwdep_poll(snd_hwdep_t *hw, struct file *file,
1774 1769
1775static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer) 1770static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer)
1776{ 1771{
1777 snd_hwdep_t *hwdep; 1772 struct snd_hwdep *hwdep;
1778 int err, len; 1773 int err, len;
1779 1774
1780 switch (mixer->chip->usb_id) { 1775 switch (mixer->chip->usb_id) {
@@ -1825,7 +1820,7 @@ static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer)
1825 return 0; 1820 return 0;
1826} 1821}
1827 1822
1828static int snd_audigy2nx_led_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1823static int snd_audigy2nx_led_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1829{ 1824{
1830 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1825 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1831 uinfo->count = 1; 1826 uinfo->count = 1;
@@ -1834,7 +1829,7 @@ static int snd_audigy2nx_led_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
1834 return 0; 1829 return 0;
1835} 1830}
1836 1831
1837static int snd_audigy2nx_led_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1832static int snd_audigy2nx_led_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1838{ 1833{
1839 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 1834 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
1840 int index = kcontrol->private_value; 1835 int index = kcontrol->private_value;
@@ -1843,7 +1838,7 @@ static int snd_audigy2nx_led_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
1843 return 0; 1838 return 0;
1844} 1839}
1845 1840
1846static int snd_audigy2nx_led_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1841static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1847{ 1842{
1848 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 1843 struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
1849 int index = kcontrol->private_value; 1844 int index = kcontrol->private_value;
@@ -1863,7 +1858,7 @@ static int snd_audigy2nx_led_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
1863 return changed; 1858 return changed;
1864} 1859}
1865 1860
1866static snd_kcontrol_new_t snd_audigy2nx_controls[] = { 1861static struct snd_kcontrol_new snd_audigy2nx_controls[] = {
1867 { 1862 {
1868 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1863 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1869 .name = "CMSS LED Switch", 1864 .name = "CMSS LED Switch",
@@ -1904,8 +1899,8 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer)
1904 return 0; 1899 return 0;
1905} 1900}
1906 1901
1907static void snd_audigy2nx_proc_read(snd_info_entry_t *entry, 1902static void snd_audigy2nx_proc_read(struct snd_info_entry *entry,
1908 snd_info_buffer_t *buffer) 1903 struct snd_info_buffer *buffer)
1909{ 1904{
1910 static const struct { 1905 static const struct {
1911 int unitid; 1906 int unitid;
@@ -1935,9 +1930,9 @@ static void snd_audigy2nx_proc_read(snd_info_entry_t *entry,
1935 } 1930 }
1936} 1931}
1937 1932
1938int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif) 1933int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif)
1939{ 1934{
1940 static snd_device_ops_t dev_ops = { 1935 static struct snd_device_ops dev_ops = {
1941 .dev_free = snd_usb_mixer_dev_free 1936 .dev_free = snd_usb_mixer_dev_free
1942 }; 1937 };
1943 struct usb_mixer_interface *mixer; 1938 struct usb_mixer_interface *mixer;
@@ -1967,7 +1962,7 @@ int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif)
1967 goto _error; 1962 goto _error;
1968 1963
1969 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) { 1964 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) {
1970 snd_info_entry_t *entry; 1965 struct snd_info_entry *entry;
1971 1966
1972 if ((err = snd_audigy2nx_controls_create(mixer)) < 0) 1967 if ((err = snd_audigy2nx_controls_create(mixer)) < 0)
1973 goto _error; 1968 goto _error;
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h
index ba506c3871f4..0e0575425797 100644
--- a/sound/usb/usbquirks.h
+++ b/sound/usb/usbquirks.h
@@ -45,7 +45,7 @@
45 45
46#define YAMAHA_DEVICE(id, name) { \ 46#define YAMAHA_DEVICE(id, name) { \
47 USB_DEVICE(0x0499, id), \ 47 USB_DEVICE(0x0499, id), \
48 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { \ 48 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
49 .vendor_name = "Yamaha", \ 49 .vendor_name = "Yamaha", \
50 .product_name = name, \ 50 .product_name = name, \
51 .ifnum = QUIRK_ANY_INTERFACE, \ 51 .ifnum = QUIRK_ANY_INTERFACE, \
@@ -54,7 +54,7 @@
54} 54}
55#define YAMAHA_INTERFACE(id, intf, name) { \ 55#define YAMAHA_INTERFACE(id, intf, name) { \
56 USB_DEVICE_VENDOR_SPEC(0x0499, id), \ 56 USB_DEVICE_VENDOR_SPEC(0x0499, id), \
57 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { \ 57 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
58 .vendor_name = "Yamaha", \ 58 .vendor_name = "Yamaha", \
59 .product_name = name, \ 59 .product_name = name, \
60 .ifnum = intf, \ 60 .ifnum = intf, \
@@ -149,12 +149,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
149 */ 149 */
150{ 150{
151 USB_DEVICE(0x0582, 0x0000), 151 USB_DEVICE(0x0582, 0x0000),
152 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 152 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
153 .vendor_name = "Roland", 153 .vendor_name = "Roland",
154 .product_name = "UA-100", 154 .product_name = "UA-100",
155 .ifnum = QUIRK_ANY_INTERFACE, 155 .ifnum = QUIRK_ANY_INTERFACE,
156 .type = QUIRK_COMPOSITE, 156 .type = QUIRK_COMPOSITE,
157 .data = (const snd_usb_audio_quirk_t[]) { 157 .data = (const struct snd_usb_audio_quirk[]) {
158 { 158 {
159 .ifnum = 0, 159 .ifnum = 0,
160 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 160 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
@@ -192,7 +192,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
192 { 192 {
193 .ifnum = 2, 193 .ifnum = 2,
194 .type = QUIRK_MIDI_FIXED_ENDPOINT, 194 .type = QUIRK_MIDI_FIXED_ENDPOINT,
195 .data = & (const snd_usb_midi_endpoint_info_t) { 195 .data = & (const struct snd_usb_midi_endpoint_info) {
196 .out_cables = 0x0007, 196 .out_cables = 0x0007,
197 .in_cables = 0x0007 197 .in_cables = 0x0007
198 } 198 }
@@ -205,12 +205,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
205}, 205},
206{ 206{
207 USB_DEVICE(0x0582, 0x0002), 207 USB_DEVICE(0x0582, 0x0002),
208 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 208 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
209 .vendor_name = "EDIROL", 209 .vendor_name = "EDIROL",
210 .product_name = "UM-4", 210 .product_name = "UM-4",
211 .ifnum = QUIRK_ANY_INTERFACE, 211 .ifnum = QUIRK_ANY_INTERFACE,
212 .type = QUIRK_COMPOSITE, 212 .type = QUIRK_COMPOSITE,
213 .data = (const snd_usb_audio_quirk_t[]) { 213 .data = (const struct snd_usb_audio_quirk[]) {
214 { 214 {
215 .ifnum = 0, 215 .ifnum = 0,
216 .type = QUIRK_IGNORE_INTERFACE 216 .type = QUIRK_IGNORE_INTERFACE
@@ -222,7 +222,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
222 { 222 {
223 .ifnum = 2, 223 .ifnum = 2,
224 .type = QUIRK_MIDI_FIXED_ENDPOINT, 224 .type = QUIRK_MIDI_FIXED_ENDPOINT,
225 .data = & (const snd_usb_midi_endpoint_info_t) { 225 .data = & (const struct snd_usb_midi_endpoint_info) {
226 .out_cables = 0x000f, 226 .out_cables = 0x000f,
227 .in_cables = 0x000f 227 .in_cables = 0x000f
228 } 228 }
@@ -235,12 +235,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
235}, 235},
236{ 236{
237 USB_DEVICE(0x0582, 0x0003), 237 USB_DEVICE(0x0582, 0x0003),
238 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 238 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
239 .vendor_name = "Roland", 239 .vendor_name = "Roland",
240 .product_name = "SC-8850", 240 .product_name = "SC-8850",
241 .ifnum = QUIRK_ANY_INTERFACE, 241 .ifnum = QUIRK_ANY_INTERFACE,
242 .type = QUIRK_COMPOSITE, 242 .type = QUIRK_COMPOSITE,
243 .data = (const snd_usb_audio_quirk_t[]) { 243 .data = (const struct snd_usb_audio_quirk[]) {
244 { 244 {
245 .ifnum = 0, 245 .ifnum = 0,
246 .type = QUIRK_IGNORE_INTERFACE 246 .type = QUIRK_IGNORE_INTERFACE
@@ -252,7 +252,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
252 { 252 {
253 .ifnum = 2, 253 .ifnum = 2,
254 .type = QUIRK_MIDI_FIXED_ENDPOINT, 254 .type = QUIRK_MIDI_FIXED_ENDPOINT,
255 .data = & (const snd_usb_midi_endpoint_info_t) { 255 .data = & (const struct snd_usb_midi_endpoint_info) {
256 .out_cables = 0x003f, 256 .out_cables = 0x003f,
257 .in_cables = 0x003f 257 .in_cables = 0x003f
258 } 258 }
@@ -265,12 +265,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
265}, 265},
266{ 266{
267 USB_DEVICE(0x0582, 0x0004), 267 USB_DEVICE(0x0582, 0x0004),
268 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 268 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
269 .vendor_name = "Roland", 269 .vendor_name = "Roland",
270 .product_name = "U-8", 270 .product_name = "U-8",
271 .ifnum = QUIRK_ANY_INTERFACE, 271 .ifnum = QUIRK_ANY_INTERFACE,
272 .type = QUIRK_COMPOSITE, 272 .type = QUIRK_COMPOSITE,
273 .data = (const snd_usb_audio_quirk_t[]) { 273 .data = (const struct snd_usb_audio_quirk[]) {
274 { 274 {
275 .ifnum = 0, 275 .ifnum = 0,
276 .type = QUIRK_IGNORE_INTERFACE 276 .type = QUIRK_IGNORE_INTERFACE
@@ -282,7 +282,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
282 { 282 {
283 .ifnum = 2, 283 .ifnum = 2,
284 .type = QUIRK_MIDI_FIXED_ENDPOINT, 284 .type = QUIRK_MIDI_FIXED_ENDPOINT,
285 .data = & (const snd_usb_midi_endpoint_info_t) { 285 .data = & (const struct snd_usb_midi_endpoint_info) {
286 .out_cables = 0x0005, 286 .out_cables = 0x0005,
287 .in_cables = 0x0005 287 .in_cables = 0x0005
288 } 288 }
@@ -296,12 +296,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
296{ 296{
297 /* a later revision uses ID 0x0099 */ 297 /* a later revision uses ID 0x0099 */
298 USB_DEVICE(0x0582, 0x0005), 298 USB_DEVICE(0x0582, 0x0005),
299 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 299 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
300 .vendor_name = "EDIROL", 300 .vendor_name = "EDIROL",
301 .product_name = "UM-2", 301 .product_name = "UM-2",
302 .ifnum = QUIRK_ANY_INTERFACE, 302 .ifnum = QUIRK_ANY_INTERFACE,
303 .type = QUIRK_COMPOSITE, 303 .type = QUIRK_COMPOSITE,
304 .data = (const snd_usb_audio_quirk_t[]) { 304 .data = (const struct snd_usb_audio_quirk[]) {
305 { 305 {
306 .ifnum = 0, 306 .ifnum = 0,
307 .type = QUIRK_IGNORE_INTERFACE 307 .type = QUIRK_IGNORE_INTERFACE
@@ -313,7 +313,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
313 { 313 {
314 .ifnum = 2, 314 .ifnum = 2,
315 .type = QUIRK_MIDI_FIXED_ENDPOINT, 315 .type = QUIRK_MIDI_FIXED_ENDPOINT,
316 .data = & (const snd_usb_midi_endpoint_info_t) { 316 .data = & (const struct snd_usb_midi_endpoint_info) {
317 .out_cables = 0x0003, 317 .out_cables = 0x0003,
318 .in_cables = 0x0003 318 .in_cables = 0x0003
319 } 319 }
@@ -326,12 +326,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
326}, 326},
327{ 327{
328 USB_DEVICE(0x0582, 0x0007), 328 USB_DEVICE(0x0582, 0x0007),
329 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 329 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
330 .vendor_name = "Roland", 330 .vendor_name = "Roland",
331 .product_name = "SC-8820", 331 .product_name = "SC-8820",
332 .ifnum = QUIRK_ANY_INTERFACE, 332 .ifnum = QUIRK_ANY_INTERFACE,
333 .type = QUIRK_COMPOSITE, 333 .type = QUIRK_COMPOSITE,
334 .data = (const snd_usb_audio_quirk_t[]) { 334 .data = (const struct snd_usb_audio_quirk[]) {
335 { 335 {
336 .ifnum = 0, 336 .ifnum = 0,
337 .type = QUIRK_IGNORE_INTERFACE 337 .type = QUIRK_IGNORE_INTERFACE
@@ -343,7 +343,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
343 { 343 {
344 .ifnum = 2, 344 .ifnum = 2,
345 .type = QUIRK_MIDI_FIXED_ENDPOINT, 345 .type = QUIRK_MIDI_FIXED_ENDPOINT,
346 .data = & (const snd_usb_midi_endpoint_info_t) { 346 .data = & (const struct snd_usb_midi_endpoint_info) {
347 .out_cables = 0x0013, 347 .out_cables = 0x0013,
348 .in_cables = 0x0013 348 .in_cables = 0x0013
349 } 349 }
@@ -356,12 +356,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
356}, 356},
357{ 357{
358 USB_DEVICE(0x0582, 0x0008), 358 USB_DEVICE(0x0582, 0x0008),
359 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 359 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
360 .vendor_name = "Roland", 360 .vendor_name = "Roland",
361 .product_name = "PC-300", 361 .product_name = "PC-300",
362 .ifnum = QUIRK_ANY_INTERFACE, 362 .ifnum = QUIRK_ANY_INTERFACE,
363 .type = QUIRK_COMPOSITE, 363 .type = QUIRK_COMPOSITE,
364 .data = (const snd_usb_audio_quirk_t[]) { 364 .data = (const struct snd_usb_audio_quirk[]) {
365 { 365 {
366 .ifnum = 0, 366 .ifnum = 0,
367 .type = QUIRK_IGNORE_INTERFACE 367 .type = QUIRK_IGNORE_INTERFACE
@@ -373,7 +373,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
373 { 373 {
374 .ifnum = 2, 374 .ifnum = 2,
375 .type = QUIRK_MIDI_FIXED_ENDPOINT, 375 .type = QUIRK_MIDI_FIXED_ENDPOINT,
376 .data = & (const snd_usb_midi_endpoint_info_t) { 376 .data = & (const struct snd_usb_midi_endpoint_info) {
377 .out_cables = 0x0001, 377 .out_cables = 0x0001,
378 .in_cables = 0x0001 378 .in_cables = 0x0001
379 } 379 }
@@ -387,12 +387,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
387{ 387{
388 /* a later revision uses ID 0x009d */ 388 /* a later revision uses ID 0x009d */
389 USB_DEVICE(0x0582, 0x0009), 389 USB_DEVICE(0x0582, 0x0009),
390 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 390 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
391 .vendor_name = "EDIROL", 391 .vendor_name = "EDIROL",
392 .product_name = "UM-1", 392 .product_name = "UM-1",
393 .ifnum = QUIRK_ANY_INTERFACE, 393 .ifnum = QUIRK_ANY_INTERFACE,
394 .type = QUIRK_COMPOSITE, 394 .type = QUIRK_COMPOSITE,
395 .data = (const snd_usb_audio_quirk_t[]) { 395 .data = (const struct snd_usb_audio_quirk[]) {
396 { 396 {
397 .ifnum = 0, 397 .ifnum = 0,
398 .type = QUIRK_IGNORE_INTERFACE 398 .type = QUIRK_IGNORE_INTERFACE
@@ -404,7 +404,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
404 { 404 {
405 .ifnum = 2, 405 .ifnum = 2,
406 .type = QUIRK_MIDI_FIXED_ENDPOINT, 406 .type = QUIRK_MIDI_FIXED_ENDPOINT,
407 .data = & (const snd_usb_midi_endpoint_info_t) { 407 .data = & (const struct snd_usb_midi_endpoint_info) {
408 .out_cables = 0x0001, 408 .out_cables = 0x0001,
409 .in_cables = 0x0001 409 .in_cables = 0x0001
410 } 410 }
@@ -417,12 +417,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
417}, 417},
418{ 418{
419 USB_DEVICE(0x0582, 0x000b), 419 USB_DEVICE(0x0582, 0x000b),
420 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 420 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
421 .vendor_name = "Roland", 421 .vendor_name = "Roland",
422 .product_name = "SK-500", 422 .product_name = "SK-500",
423 .ifnum = QUIRK_ANY_INTERFACE, 423 .ifnum = QUIRK_ANY_INTERFACE,
424 .type = QUIRK_COMPOSITE, 424 .type = QUIRK_COMPOSITE,
425 .data = (const snd_usb_audio_quirk_t[]) { 425 .data = (const struct snd_usb_audio_quirk[]) {
426 { 426 {
427 .ifnum = 0, 427 .ifnum = 0,
428 .type = QUIRK_IGNORE_INTERFACE 428 .type = QUIRK_IGNORE_INTERFACE
@@ -434,7 +434,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
434 { 434 {
435 .ifnum = 2, 435 .ifnum = 2,
436 .type = QUIRK_MIDI_FIXED_ENDPOINT, 436 .type = QUIRK_MIDI_FIXED_ENDPOINT,
437 .data = & (const snd_usb_midi_endpoint_info_t) { 437 .data = & (const struct snd_usb_midi_endpoint_info) {
438 .out_cables = 0x0013, 438 .out_cables = 0x0013,
439 .in_cables = 0x0013 439 .in_cables = 0x0013
440 } 440 }
@@ -449,12 +449,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
449 /* thanks to Emiliano Grilli <emillo@libero.it> 449 /* thanks to Emiliano Grilli <emillo@libero.it>
450 * for helping researching this data */ 450 * for helping researching this data */
451 USB_DEVICE(0x0582, 0x000c), 451 USB_DEVICE(0x0582, 0x000c),
452 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 452 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
453 .vendor_name = "Roland", 453 .vendor_name = "Roland",
454 .product_name = "SC-D70", 454 .product_name = "SC-D70",
455 .ifnum = QUIRK_ANY_INTERFACE, 455 .ifnum = QUIRK_ANY_INTERFACE,
456 .type = QUIRK_COMPOSITE, 456 .type = QUIRK_COMPOSITE,
457 .data = (const snd_usb_audio_quirk_t[]) { 457 .data = (const struct snd_usb_audio_quirk[]) {
458 { 458 {
459 .ifnum = 0, 459 .ifnum = 0,
460 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 460 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
@@ -492,7 +492,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
492 { 492 {
493 .ifnum = 2, 493 .ifnum = 2,
494 .type = QUIRK_MIDI_FIXED_ENDPOINT, 494 .type = QUIRK_MIDI_FIXED_ENDPOINT,
495 .data = & (const snd_usb_midi_endpoint_info_t) { 495 .data = & (const struct snd_usb_midi_endpoint_info) {
496 .out_cables = 0x0007, 496 .out_cables = 0x0007,
497 .in_cables = 0x0007 497 .in_cables = 0x0007
498 } 498 }
@@ -513,12 +513,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
513 * the 96kHz sample rate. 513 * the 96kHz sample rate.
514 */ 514 */
515 USB_DEVICE(0x0582, 0x0010), 515 USB_DEVICE(0x0582, 0x0010),
516 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 516 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
517 .vendor_name = "EDIROL", 517 .vendor_name = "EDIROL",
518 .product_name = "UA-5", 518 .product_name = "UA-5",
519 .ifnum = QUIRK_ANY_INTERFACE, 519 .ifnum = QUIRK_ANY_INTERFACE,
520 .type = QUIRK_COMPOSITE, 520 .type = QUIRK_COMPOSITE,
521 .data = (const snd_usb_audio_quirk_t[]) { 521 .data = (const struct snd_usb_audio_quirk[]) {
522 { 522 {
523 .ifnum = 1, 523 .ifnum = 1,
524 .type = QUIRK_AUDIO_STANDARD_INTERFACE 524 .type = QUIRK_AUDIO_STANDARD_INTERFACE
@@ -536,12 +536,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
536{ 536{
537 /* has ID 0x0013 when not in "Advanced Driver" mode */ 537 /* has ID 0x0013 when not in "Advanced Driver" mode */
538 USB_DEVICE(0x0582, 0x0012), 538 USB_DEVICE(0x0582, 0x0012),
539 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 539 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
540 .vendor_name = "Roland", 540 .vendor_name = "Roland",
541 .product_name = "XV-5050", 541 .product_name = "XV-5050",
542 .ifnum = 0, 542 .ifnum = 0,
543 .type = QUIRK_MIDI_FIXED_ENDPOINT, 543 .type = QUIRK_MIDI_FIXED_ENDPOINT,
544 .data = & (const snd_usb_midi_endpoint_info_t) { 544 .data = & (const struct snd_usb_midi_endpoint_info) {
545 .out_cables = 0x0001, 545 .out_cables = 0x0001,
546 .in_cables = 0x0001 546 .in_cables = 0x0001
547 } 547 }
@@ -550,12 +550,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
550{ 550{
551 /* has ID 0x0015 when not in "Advanced Driver" mode */ 551 /* has ID 0x0015 when not in "Advanced Driver" mode */
552 USB_DEVICE(0x0582, 0x0014), 552 USB_DEVICE(0x0582, 0x0014),
553 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 553 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
554 .vendor_name = "EDIROL", 554 .vendor_name = "EDIROL",
555 .product_name = "UM-880", 555 .product_name = "UM-880",
556 .ifnum = 0, 556 .ifnum = 0,
557 .type = QUIRK_MIDI_FIXED_ENDPOINT, 557 .type = QUIRK_MIDI_FIXED_ENDPOINT,
558 .data = & (const snd_usb_midi_endpoint_info_t) { 558 .data = & (const struct snd_usb_midi_endpoint_info) {
559 .out_cables = 0x01ff, 559 .out_cables = 0x01ff,
560 .in_cables = 0x01ff 560 .in_cables = 0x01ff
561 } 561 }
@@ -564,12 +564,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
564{ 564{
565 /* has ID 0x0017 when not in "Advanced Driver" mode */ 565 /* has ID 0x0017 when not in "Advanced Driver" mode */
566 USB_DEVICE(0x0582, 0x0016), 566 USB_DEVICE(0x0582, 0x0016),
567 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 567 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
568 .vendor_name = "EDIROL", 568 .vendor_name = "EDIROL",
569 .product_name = "SD-90", 569 .product_name = "SD-90",
570 .ifnum = QUIRK_ANY_INTERFACE, 570 .ifnum = QUIRK_ANY_INTERFACE,
571 .type = QUIRK_COMPOSITE, 571 .type = QUIRK_COMPOSITE,
572 .data = (const snd_usb_audio_quirk_t[]) { 572 .data = (const struct snd_usb_audio_quirk[]) {
573 { 573 {
574 .ifnum = 0, 574 .ifnum = 0,
575 .type = QUIRK_IGNORE_INTERFACE 575 .type = QUIRK_IGNORE_INTERFACE
@@ -581,7 +581,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
581 { 581 {
582 .ifnum = 2, 582 .ifnum = 2,
583 .type = QUIRK_MIDI_FIXED_ENDPOINT, 583 .type = QUIRK_MIDI_FIXED_ENDPOINT,
584 .data = & (const snd_usb_midi_endpoint_info_t) { 584 .data = & (const struct snd_usb_midi_endpoint_info) {
585 .out_cables = 0x000f, 585 .out_cables = 0x000f,
586 .in_cables = 0x000f 586 .in_cables = 0x000f
587 } 587 }
@@ -595,12 +595,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
595{ 595{
596 /* has ID 0x001c when not in "Advanced Driver" mode */ 596 /* has ID 0x001c when not in "Advanced Driver" mode */
597 USB_DEVICE(0x0582, 0x001b), 597 USB_DEVICE(0x0582, 0x001b),
598 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 598 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
599 .vendor_name = "Roland", 599 .vendor_name = "Roland",
600 .product_name = "MMP-2", 600 .product_name = "MMP-2",
601 .ifnum = QUIRK_ANY_INTERFACE, 601 .ifnum = QUIRK_ANY_INTERFACE,
602 .type = QUIRK_COMPOSITE, 602 .type = QUIRK_COMPOSITE,
603 .data = (const snd_usb_audio_quirk_t[]) { 603 .data = (const struct snd_usb_audio_quirk[]) {
604 { 604 {
605 .ifnum = 0, 605 .ifnum = 0,
606 .type = QUIRK_IGNORE_INTERFACE 606 .type = QUIRK_IGNORE_INTERFACE
@@ -612,7 +612,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
612 { 612 {
613 .ifnum = 2, 613 .ifnum = 2,
614 .type = QUIRK_MIDI_FIXED_ENDPOINT, 614 .type = QUIRK_MIDI_FIXED_ENDPOINT,
615 .data = & (const snd_usb_midi_endpoint_info_t) { 615 .data = & (const struct snd_usb_midi_endpoint_info) {
616 .out_cables = 0x0001, 616 .out_cables = 0x0001,
617 .in_cables = 0x0001 617 .in_cables = 0x0001
618 } 618 }
@@ -626,12 +626,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
626{ 626{
627 /* has ID 0x001e when not in "Advanced Driver" mode */ 627 /* has ID 0x001e when not in "Advanced Driver" mode */
628 USB_DEVICE(0x0582, 0x001d), 628 USB_DEVICE(0x0582, 0x001d),
629 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 629 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
630 .vendor_name = "Roland", 630 .vendor_name = "Roland",
631 .product_name = "V-SYNTH", 631 .product_name = "V-SYNTH",
632 .ifnum = 0, 632 .ifnum = 0,
633 .type = QUIRK_MIDI_FIXED_ENDPOINT, 633 .type = QUIRK_MIDI_FIXED_ENDPOINT,
634 .data = & (const snd_usb_midi_endpoint_info_t) { 634 .data = & (const struct snd_usb_midi_endpoint_info) {
635 .out_cables = 0x0001, 635 .out_cables = 0x0001,
636 .in_cables = 0x0001 636 .in_cables = 0x0001
637 } 637 }
@@ -640,12 +640,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
640{ 640{
641 /* has ID 0x0024 when not in "Advanced Driver" mode */ 641 /* has ID 0x0024 when not in "Advanced Driver" mode */
642 USB_DEVICE(0x0582, 0x0023), 642 USB_DEVICE(0x0582, 0x0023),
643 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 643 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
644 .vendor_name = "EDIROL", 644 .vendor_name = "EDIROL",
645 .product_name = "UM-550", 645 .product_name = "UM-550",
646 .ifnum = 0, 646 .ifnum = 0,
647 .type = QUIRK_MIDI_FIXED_ENDPOINT, 647 .type = QUIRK_MIDI_FIXED_ENDPOINT,
648 .data = & (const snd_usb_midi_endpoint_info_t) { 648 .data = & (const struct snd_usb_midi_endpoint_info) {
649 .out_cables = 0x003f, 649 .out_cables = 0x003f,
650 .in_cables = 0x003f 650 .in_cables = 0x003f
651 } 651 }
@@ -658,12 +658,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
658 * and no MIDI. 658 * and no MIDI.
659 */ 659 */
660 USB_DEVICE(0x0582, 0x0025), 660 USB_DEVICE(0x0582, 0x0025),
661 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 661 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
662 .vendor_name = "EDIROL", 662 .vendor_name = "EDIROL",
663 .product_name = "UA-20", 663 .product_name = "UA-20",
664 .ifnum = QUIRK_ANY_INTERFACE, 664 .ifnum = QUIRK_ANY_INTERFACE,
665 .type = QUIRK_COMPOSITE, 665 .type = QUIRK_COMPOSITE,
666 .data = (const snd_usb_audio_quirk_t[]) { 666 .data = (const struct snd_usb_audio_quirk[]) {
667 { 667 {
668 .ifnum = 1, 668 .ifnum = 1,
669 .type = QUIRK_AUDIO_STANDARD_INTERFACE 669 .type = QUIRK_AUDIO_STANDARD_INTERFACE
@@ -685,12 +685,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
685{ 685{
686 /* has ID 0x0028 when not in "Advanced Driver" mode */ 686 /* has ID 0x0028 when not in "Advanced Driver" mode */
687 USB_DEVICE(0x0582, 0x0027), 687 USB_DEVICE(0x0582, 0x0027),
688 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 688 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
689 .vendor_name = "EDIROL", 689 .vendor_name = "EDIROL",
690 .product_name = "SD-20", 690 .product_name = "SD-20",
691 .ifnum = 0, 691 .ifnum = 0,
692 .type = QUIRK_MIDI_FIXED_ENDPOINT, 692 .type = QUIRK_MIDI_FIXED_ENDPOINT,
693 .data = & (const snd_usb_midi_endpoint_info_t) { 693 .data = & (const struct snd_usb_midi_endpoint_info) {
694 .out_cables = 0x0003, 694 .out_cables = 0x0003,
695 .in_cables = 0x0007 695 .in_cables = 0x0007
696 } 696 }
@@ -699,12 +699,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
699{ 699{
700 /* has ID 0x002a when not in "Advanced Driver" mode */ 700 /* has ID 0x002a when not in "Advanced Driver" mode */
701 USB_DEVICE(0x0582, 0x0029), 701 USB_DEVICE(0x0582, 0x0029),
702 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 702 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
703 .vendor_name = "EDIROL", 703 .vendor_name = "EDIROL",
704 .product_name = "SD-80", 704 .product_name = "SD-80",
705 .ifnum = 0, 705 .ifnum = 0,
706 .type = QUIRK_MIDI_FIXED_ENDPOINT, 706 .type = QUIRK_MIDI_FIXED_ENDPOINT,
707 .data = & (const snd_usb_midi_endpoint_info_t) { 707 .data = & (const struct snd_usb_midi_endpoint_info) {
708 .out_cables = 0x000f, 708 .out_cables = 0x000f,
709 .in_cables = 0x000f 709 .in_cables = 0x000f
710 } 710 }
@@ -717,12 +717,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
717 * but offers only 16-bit PCM and no MIDI. 717 * but offers only 16-bit PCM and no MIDI.
718 */ 718 */
719 USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b), 719 USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
720 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 720 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
721 .vendor_name = "EDIROL", 721 .vendor_name = "EDIROL",
722 .product_name = "UA-700", 722 .product_name = "UA-700",
723 .ifnum = QUIRK_ANY_INTERFACE, 723 .ifnum = QUIRK_ANY_INTERFACE,
724 .type = QUIRK_COMPOSITE, 724 .type = QUIRK_COMPOSITE,
725 .data = (const snd_usb_audio_quirk_t[]) { 725 .data = (const struct snd_usb_audio_quirk[]) {
726 { 726 {
727 .ifnum = 1, 727 .ifnum = 1,
728 .type = QUIRK_AUDIO_EDIROL_UA700_UA25 728 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
@@ -744,12 +744,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
744{ 744{
745 /* has ID 0x002e when not in "Advanced Driver" mode */ 745 /* has ID 0x002e when not in "Advanced Driver" mode */
746 USB_DEVICE(0x0582, 0x002d), 746 USB_DEVICE(0x0582, 0x002d),
747 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 747 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
748 .vendor_name = "Roland", 748 .vendor_name = "Roland",
749 .product_name = "XV-2020", 749 .product_name = "XV-2020",
750 .ifnum = 0, 750 .ifnum = 0,
751 .type = QUIRK_MIDI_FIXED_ENDPOINT, 751 .type = QUIRK_MIDI_FIXED_ENDPOINT,
752 .data = & (const snd_usb_midi_endpoint_info_t) { 752 .data = & (const struct snd_usb_midi_endpoint_info) {
753 .out_cables = 0x0001, 753 .out_cables = 0x0001,
754 .in_cables = 0x0001 754 .in_cables = 0x0001
755 } 755 }
@@ -758,12 +758,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
758{ 758{
759 /* has ID 0x0030 when not in "Advanced Driver" mode */ 759 /* has ID 0x0030 when not in "Advanced Driver" mode */
760 USB_DEVICE(0x0582, 0x002f), 760 USB_DEVICE(0x0582, 0x002f),
761 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 761 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
762 .vendor_name = "Roland", 762 .vendor_name = "Roland",
763 .product_name = "VariOS", 763 .product_name = "VariOS",
764 .ifnum = 0, 764 .ifnum = 0,
765 .type = QUIRK_MIDI_FIXED_ENDPOINT, 765 .type = QUIRK_MIDI_FIXED_ENDPOINT,
766 .data = & (const snd_usb_midi_endpoint_info_t) { 766 .data = & (const struct snd_usb_midi_endpoint_info) {
767 .out_cables = 0x0007, 767 .out_cables = 0x0007,
768 .in_cables = 0x0007 768 .in_cables = 0x0007
769 } 769 }
@@ -772,12 +772,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
772{ 772{
773 /* has ID 0x0034 when not in "Advanced Driver" mode */ 773 /* has ID 0x0034 when not in "Advanced Driver" mode */
774 USB_DEVICE(0x0582, 0x0033), 774 USB_DEVICE(0x0582, 0x0033),
775 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 775 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
776 .vendor_name = "EDIROL", 776 .vendor_name = "EDIROL",
777 .product_name = "PCR", 777 .product_name = "PCR",
778 .ifnum = 0, 778 .ifnum = 0,
779 .type = QUIRK_MIDI_FIXED_ENDPOINT, 779 .type = QUIRK_MIDI_FIXED_ENDPOINT,
780 .data = & (const snd_usb_midi_endpoint_info_t) { 780 .data = & (const struct snd_usb_midi_endpoint_info) {
781 .out_cables = 0x0003, 781 .out_cables = 0x0003,
782 .in_cables = 0x0007 782 .in_cables = 0x0007
783 } 783 }
@@ -790,12 +790,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
790 * later revisions use IDs 0x0054 and 0x00a2. 790 * later revisions use IDs 0x0054 and 0x00a2.
791 */ 791 */
792 USB_DEVICE(0x0582, 0x0037), 792 USB_DEVICE(0x0582, 0x0037),
793 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 793 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
794 .vendor_name = "Roland", 794 .vendor_name = "Roland",
795 .product_name = "Digital Piano", 795 .product_name = "Digital Piano",
796 .ifnum = 0, 796 .ifnum = 0,
797 .type = QUIRK_MIDI_FIXED_ENDPOINT, 797 .type = QUIRK_MIDI_FIXED_ENDPOINT,
798 .data = & (const snd_usb_midi_endpoint_info_t) { 798 .data = & (const struct snd_usb_midi_endpoint_info) {
799 .out_cables = 0x0001, 799 .out_cables = 0x0001,
800 .in_cables = 0x0001 800 .in_cables = 0x0001
801 } 801 }
@@ -808,12 +808,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
808 * and no MIDI. 808 * and no MIDI.
809 */ 809 */
810 USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b), 810 USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
811 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 811 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
812 .vendor_name = "BOSS", 812 .vendor_name = "BOSS",
813 .product_name = "GS-10", 813 .product_name = "GS-10",
814 .ifnum = QUIRK_ANY_INTERFACE, 814 .ifnum = QUIRK_ANY_INTERFACE,
815 .type = QUIRK_COMPOSITE, 815 .type = QUIRK_COMPOSITE,
816 .data = & (const snd_usb_audio_quirk_t[]) { 816 .data = & (const struct snd_usb_audio_quirk[]) {
817 { 817 {
818 .ifnum = 1, 818 .ifnum = 1,
819 .type = QUIRK_AUDIO_STANDARD_INTERFACE 819 .type = QUIRK_AUDIO_STANDARD_INTERFACE
@@ -835,12 +835,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
835{ 835{
836 /* has ID 0x0041 when not in "Advanced Driver" mode */ 836 /* has ID 0x0041 when not in "Advanced Driver" mode */
837 USB_DEVICE(0x0582, 0x0040), 837 USB_DEVICE(0x0582, 0x0040),
838 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 838 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
839 .vendor_name = "Roland", 839 .vendor_name = "Roland",
840 .product_name = "GI-20", 840 .product_name = "GI-20",
841 .ifnum = 0, 841 .ifnum = 0,
842 .type = QUIRK_MIDI_FIXED_ENDPOINT, 842 .type = QUIRK_MIDI_FIXED_ENDPOINT,
843 .data = & (const snd_usb_midi_endpoint_info_t) { 843 .data = & (const struct snd_usb_midi_endpoint_info) {
844 .out_cables = 0x0001, 844 .out_cables = 0x0001,
845 .in_cables = 0x0001 845 .in_cables = 0x0001
846 } 846 }
@@ -849,12 +849,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
849{ 849{
850 /* has ID 0x0043 when not in "Advanced Driver" mode */ 850 /* has ID 0x0043 when not in "Advanced Driver" mode */
851 USB_DEVICE(0x0582, 0x0042), 851 USB_DEVICE(0x0582, 0x0042),
852 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 852 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
853 .vendor_name = "Roland", 853 .vendor_name = "Roland",
854 .product_name = "RS-70", 854 .product_name = "RS-70",
855 .ifnum = 0, 855 .ifnum = 0,
856 .type = QUIRK_MIDI_FIXED_ENDPOINT, 856 .type = QUIRK_MIDI_FIXED_ENDPOINT,
857 .data = & (const snd_usb_midi_endpoint_info_t) { 857 .data = & (const struct snd_usb_midi_endpoint_info) {
858 .out_cables = 0x0001, 858 .out_cables = 0x0001,
859 .in_cables = 0x0001 859 .in_cables = 0x0001
860 } 860 }
@@ -862,12 +862,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
862}, 862},
863{ 863{
864 USB_DEVICE(0x0582, 0x0044), 864 USB_DEVICE(0x0582, 0x0044),
865 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 865 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
866 .vendor_name = "Roland", 866 .vendor_name = "Roland",
867 .product_name = "UA-1000", 867 .product_name = "UA-1000",
868 .ifnum = QUIRK_ANY_INTERFACE, 868 .ifnum = QUIRK_ANY_INTERFACE,
869 .type = QUIRK_COMPOSITE, 869 .type = QUIRK_COMPOSITE,
870 .data = (const snd_usb_audio_quirk_t[]) { 870 .data = (const struct snd_usb_audio_quirk[]) {
871 { 871 {
872 .ifnum = 1, 872 .ifnum = 1,
873 .type = QUIRK_AUDIO_EDIROL_UA1000 873 .type = QUIRK_AUDIO_EDIROL_UA1000
@@ -879,7 +879,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
879 { 879 {
880 .ifnum = 3, 880 .ifnum = 3,
881 .type = QUIRK_MIDI_FIXED_ENDPOINT, 881 .type = QUIRK_MIDI_FIXED_ENDPOINT,
882 .data = & (const snd_usb_midi_endpoint_info_t) { 882 .data = & (const struct snd_usb_midi_endpoint_info) {
883 .out_cables = 0x0003, 883 .out_cables = 0x0003,
884 .in_cables = 0x0003 884 .in_cables = 0x0003
885 } 885 }
@@ -893,12 +893,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
893{ 893{
894 /* has ID 0x004a when not in "Advanced Driver" mode */ 894 /* has ID 0x004a when not in "Advanced Driver" mode */
895 USB_DEVICE(0x0582, 0x0048), 895 USB_DEVICE(0x0582, 0x0048),
896 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 896 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
897 .vendor_name = "EDIROL", 897 .vendor_name = "EDIROL",
898 .product_name = "UR-80", 898 .product_name = "UR-80",
899 .ifnum = 0, 899 .ifnum = 0,
900 .type = QUIRK_MIDI_FIXED_ENDPOINT, 900 .type = QUIRK_MIDI_FIXED_ENDPOINT,
901 .data = & (const snd_usb_midi_endpoint_info_t) { 901 .data = & (const struct snd_usb_midi_endpoint_info) {
902 .out_cables = 0x0003, 902 .out_cables = 0x0003,
903 .in_cables = 0x0007 903 .in_cables = 0x0007
904 } 904 }
@@ -908,12 +908,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
908{ 908{
909 /* has ID 0x004f when not in "Advanced Driver" mode */ 909 /* has ID 0x004f when not in "Advanced Driver" mode */
910 USB_DEVICE(0x0582, 0x004d), 910 USB_DEVICE(0x0582, 0x004d),
911 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 911 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
912 .vendor_name = "EDIROL", 912 .vendor_name = "EDIROL",
913 .product_name = "PCR-A", 913 .product_name = "PCR-A",
914 .ifnum = 0, 914 .ifnum = 0,
915 .type = QUIRK_MIDI_FIXED_ENDPOINT, 915 .type = QUIRK_MIDI_FIXED_ENDPOINT,
916 .data = & (const snd_usb_midi_endpoint_info_t) { 916 .data = & (const struct snd_usb_midi_endpoint_info) {
917 .out_cables = 0x0003, 917 .out_cables = 0x0003,
918 .in_cables = 0x0007 918 .in_cables = 0x0007
919 } 919 }
@@ -925,12 +925,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
925 * is standard compliant, but has only 16-bit PCM. 925 * is standard compliant, but has only 16-bit PCM.
926 */ 926 */
927 USB_DEVICE(0x0582, 0x0050), 927 USB_DEVICE(0x0582, 0x0050),
928 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 928 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
929 .vendor_name = "EDIROL", 929 .vendor_name = "EDIROL",
930 .product_name = "UA-3FX", 930 .product_name = "UA-3FX",
931 .ifnum = QUIRK_ANY_INTERFACE, 931 .ifnum = QUIRK_ANY_INTERFACE,
932 .type = QUIRK_COMPOSITE, 932 .type = QUIRK_COMPOSITE,
933 .data = (const snd_usb_audio_quirk_t[]) { 933 .data = (const struct snd_usb_audio_quirk[]) {
934 { 934 {
935 .ifnum = 1, 935 .ifnum = 1,
936 .type = QUIRK_AUDIO_STANDARD_INTERFACE 936 .type = QUIRK_AUDIO_STANDARD_INTERFACE
@@ -947,7 +947,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
947}, 947},
948{ 948{
949 USB_DEVICE(0x0582, 0x0052), 949 USB_DEVICE(0x0582, 0x0052),
950 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 950 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
951 .vendor_name = "EDIROL", 951 .vendor_name = "EDIROL",
952 .product_name = "UM-1SX", 952 .product_name = "UM-1SX",
953 .ifnum = 0, 953 .ifnum = 0,
@@ -958,12 +958,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
958{ 958{
959 /* has ID 0x0067 when not in "Advanced Driver" mode */ 959 /* has ID 0x0067 when not in "Advanced Driver" mode */
960 USB_DEVICE(0x0582, 0x0065), 960 USB_DEVICE(0x0582, 0x0065),
961 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 961 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
962 .vendor_name = "EDIROL", 962 .vendor_name = "EDIROL",
963 .product_name = "PCR-1", 963 .product_name = "PCR-1",
964 .ifnum = 0, 964 .ifnum = 0,
965 .type = QUIRK_MIDI_FIXED_ENDPOINT, 965 .type = QUIRK_MIDI_FIXED_ENDPOINT,
966 .data = & (const snd_usb_midi_endpoint_info_t) { 966 .data = & (const struct snd_usb_midi_endpoint_info) {
967 .out_cables = 0x0001, 967 .out_cables = 0x0001,
968 .in_cables = 0x0003 968 .in_cables = 0x0003
969 } 969 }
@@ -972,12 +972,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
972{ 972{
973 /* has ID 0x006b when not in "Advanced Driver" mode */ 973 /* has ID 0x006b when not in "Advanced Driver" mode */
974 USB_DEVICE_VENDOR_SPEC(0x0582, 0x006a), 974 USB_DEVICE_VENDOR_SPEC(0x0582, 0x006a),
975 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 975 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
976 .vendor_name = "Roland", 976 .vendor_name = "Roland",
977 .product_name = "SP-606", 977 .product_name = "SP-606",
978 .ifnum = 3, 978 .ifnum = 3,
979 .type = QUIRK_MIDI_FIXED_ENDPOINT, 979 .type = QUIRK_MIDI_FIXED_ENDPOINT,
980 .data = & (const snd_usb_midi_endpoint_info_t) { 980 .data = & (const struct snd_usb_midi_endpoint_info) {
981 .out_cables = 0x0001, 981 .out_cables = 0x0001,
982 .in_cables = 0x0001 982 .in_cables = 0x0001
983 } 983 }
@@ -986,12 +986,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
986{ 986{
987 /* has ID 0x006e when not in "Advanced Driver" mode */ 987 /* has ID 0x006e when not in "Advanced Driver" mode */
988 USB_DEVICE(0x0582, 0x006d), 988 USB_DEVICE(0x0582, 0x006d),
989 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 989 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
990 .vendor_name = "Roland", 990 .vendor_name = "Roland",
991 .product_name = "FANTOM-X", 991 .product_name = "FANTOM-X",
992 .ifnum = 0, 992 .ifnum = 0,
993 .type = QUIRK_MIDI_FIXED_ENDPOINT, 993 .type = QUIRK_MIDI_FIXED_ENDPOINT,
994 .data = & (const snd_usb_midi_endpoint_info_t) { 994 .data = & (const struct snd_usb_midi_endpoint_info) {
995 .out_cables = 0x0001, 995 .out_cables = 0x0001,
996 .in_cables = 0x0001 996 .in_cables = 0x0001
997 } 997 }
@@ -1004,12 +1004,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1004 * offers only 16-bit PCM at 44.1 kHz and no MIDI. 1004 * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1005 */ 1005 */
1006 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074), 1006 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
1007 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1007 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1008 .vendor_name = "EDIROL", 1008 .vendor_name = "EDIROL",
1009 .product_name = "UA-25", 1009 .product_name = "UA-25",
1010 .ifnum = QUIRK_ANY_INTERFACE, 1010 .ifnum = QUIRK_ANY_INTERFACE,
1011 .type = QUIRK_COMPOSITE, 1011 .type = QUIRK_COMPOSITE,
1012 .data = (const snd_usb_audio_quirk_t[]) { 1012 .data = (const struct snd_usb_audio_quirk[]) {
1013 { 1013 {
1014 .ifnum = 0, 1014 .ifnum = 0,
1015 .type = QUIRK_AUDIO_EDIROL_UA700_UA25 1015 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
@@ -1031,12 +1031,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1031{ 1031{
1032 /* has ID 0x0076 when not in "Advanced Driver" mode */ 1032 /* has ID 0x0076 when not in "Advanced Driver" mode */
1033 USB_DEVICE(0x0582, 0x0075), 1033 USB_DEVICE(0x0582, 0x0075),
1034 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1034 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1035 .vendor_name = "BOSS", 1035 .vendor_name = "BOSS",
1036 .product_name = "DR-880", 1036 .product_name = "DR-880",
1037 .ifnum = 0, 1037 .ifnum = 0,
1038 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1038 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1039 .data = & (const snd_usb_midi_endpoint_info_t) { 1039 .data = & (const struct snd_usb_midi_endpoint_info) {
1040 .out_cables = 0x0001, 1040 .out_cables = 0x0001,
1041 .in_cables = 0x0001 1041 .in_cables = 0x0001
1042 } 1042 }
@@ -1045,12 +1045,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1045{ 1045{
1046 /* has ID 0x007b when not in "Advanced Driver" mode */ 1046 /* has ID 0x007b when not in "Advanced Driver" mode */
1047 USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a), 1047 USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a),
1048 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1048 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1049 .vendor_name = "Roland", 1049 .vendor_name = "Roland",
1050 /* "RD" or "RD-700SX"? */ 1050 /* "RD" or "RD-700SX"? */
1051 .ifnum = 0, 1051 .ifnum = 0,
1052 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1052 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1053 .data = & (const snd_usb_midi_endpoint_info_t) { 1053 .data = & (const struct snd_usb_midi_endpoint_info) {
1054 .out_cables = 0x0003, 1054 .out_cables = 0x0003,
1055 .in_cables = 0x0003 1055 .in_cables = 0x0003
1056 } 1056 }
@@ -1066,12 +1066,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1066 * compliant USB MIDI ports for external MIDI and controls. 1066 * compliant USB MIDI ports for external MIDI and controls.
1067 */ 1067 */
1068 USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000), 1068 USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000),
1069 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1069 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1070 .vendor_name = "Hercules", 1070 .vendor_name = "Hercules",
1071 .product_name = "DJ Console (WE)", 1071 .product_name = "DJ Console (WE)",
1072 .ifnum = 4, 1072 .ifnum = 4,
1073 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1073 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1074 .data = & (const snd_usb_midi_endpoint_info_t) { 1074 .data = & (const struct snd_usb_midi_endpoint_info) {
1075 .out_cables = 0x0001, 1075 .out_cables = 0x0001,
1076 .in_cables = 0x0001 1076 .in_cables = 0x0001
1077 } 1077 }
@@ -1090,12 +1090,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1090/* Midiman/M-Audio devices */ 1090/* Midiman/M-Audio devices */
1091{ 1091{
1092 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002), 1092 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
1093 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1093 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1094 .vendor_name = "M-Audio", 1094 .vendor_name = "M-Audio",
1095 .product_name = "MidiSport 2x2", 1095 .product_name = "MidiSport 2x2",
1096 .ifnum = QUIRK_ANY_INTERFACE, 1096 .ifnum = QUIRK_ANY_INTERFACE,
1097 .type = QUIRK_MIDI_MIDIMAN, 1097 .type = QUIRK_MIDI_MIDIMAN,
1098 .data = & (const snd_usb_midi_endpoint_info_t) { 1098 .data = & (const struct snd_usb_midi_endpoint_info) {
1099 .out_cables = 0x0003, 1099 .out_cables = 0x0003,
1100 .in_cables = 0x0003 1100 .in_cables = 0x0003
1101 } 1101 }
@@ -1103,12 +1103,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1103}, 1103},
1104{ 1104{
1105 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011), 1105 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
1106 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1106 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1107 .vendor_name = "M-Audio", 1107 .vendor_name = "M-Audio",
1108 .product_name = "MidiSport 1x1", 1108 .product_name = "MidiSport 1x1",
1109 .ifnum = QUIRK_ANY_INTERFACE, 1109 .ifnum = QUIRK_ANY_INTERFACE,
1110 .type = QUIRK_MIDI_MIDIMAN, 1110 .type = QUIRK_MIDI_MIDIMAN,
1111 .data = & (const snd_usb_midi_endpoint_info_t) { 1111 .data = & (const struct snd_usb_midi_endpoint_info) {
1112 .out_cables = 0x0001, 1112 .out_cables = 0x0001,
1113 .in_cables = 0x0001 1113 .in_cables = 0x0001
1114 } 1114 }
@@ -1116,12 +1116,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1116}, 1116},
1117{ 1117{
1118 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015), 1118 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
1119 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1119 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1120 .vendor_name = "M-Audio", 1120 .vendor_name = "M-Audio",
1121 .product_name = "Keystation", 1121 .product_name = "Keystation",
1122 .ifnum = QUIRK_ANY_INTERFACE, 1122 .ifnum = QUIRK_ANY_INTERFACE,
1123 .type = QUIRK_MIDI_MIDIMAN, 1123 .type = QUIRK_MIDI_MIDIMAN,
1124 .data = & (const snd_usb_midi_endpoint_info_t) { 1124 .data = & (const struct snd_usb_midi_endpoint_info) {
1125 .out_cables = 0x0001, 1125 .out_cables = 0x0001,
1126 .in_cables = 0x0001 1126 .in_cables = 0x0001
1127 } 1127 }
@@ -1129,12 +1129,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1129}, 1129},
1130{ 1130{
1131 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021), 1131 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
1132 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1132 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1133 .vendor_name = "M-Audio", 1133 .vendor_name = "M-Audio",
1134 .product_name = "MidiSport 4x4", 1134 .product_name = "MidiSport 4x4",
1135 .ifnum = QUIRK_ANY_INTERFACE, 1135 .ifnum = QUIRK_ANY_INTERFACE,
1136 .type = QUIRK_MIDI_MIDIMAN, 1136 .type = QUIRK_MIDI_MIDIMAN,
1137 .data = & (const snd_usb_midi_endpoint_info_t) { 1137 .data = & (const struct snd_usb_midi_endpoint_info) {
1138 .out_cables = 0x000f, 1138 .out_cables = 0x000f,
1139 .in_cables = 0x000f 1139 .in_cables = 0x000f
1140 } 1140 }
@@ -1147,12 +1147,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1147 * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de> 1147 * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
1148 */ 1148 */
1149 USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109), 1149 USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
1150 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1150 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1151 .vendor_name = "M-Audio", 1151 .vendor_name = "M-Audio",
1152 .product_name = "MidiSport 8x8", 1152 .product_name = "MidiSport 8x8",
1153 .ifnum = QUIRK_ANY_INTERFACE, 1153 .ifnum = QUIRK_ANY_INTERFACE,
1154 .type = QUIRK_MIDI_MIDIMAN, 1154 .type = QUIRK_MIDI_MIDIMAN,
1155 .data = & (const snd_usb_midi_endpoint_info_t) { 1155 .data = & (const struct snd_usb_midi_endpoint_info) {
1156 .out_cables = 0x01ff, 1156 .out_cables = 0x01ff,
1157 .in_cables = 0x01ff 1157 .in_cables = 0x01ff
1158 } 1158 }
@@ -1160,12 +1160,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1160}, 1160},
1161{ 1161{
1162 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033), 1162 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
1163 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1163 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1164 .vendor_name = "M-Audio", 1164 .vendor_name = "M-Audio",
1165 .product_name = "MidiSport 8x8", 1165 .product_name = "MidiSport 8x8",
1166 .ifnum = QUIRK_ANY_INTERFACE, 1166 .ifnum = QUIRK_ANY_INTERFACE,
1167 .type = QUIRK_MIDI_MIDIMAN, 1167 .type = QUIRK_MIDI_MIDIMAN,
1168 .data = & (const snd_usb_midi_endpoint_info_t) { 1168 .data = & (const struct snd_usb_midi_endpoint_info) {
1169 .out_cables = 0x01ff, 1169 .out_cables = 0x01ff,
1170 .in_cables = 0x01ff 1170 .in_cables = 0x01ff
1171 } 1171 }
@@ -1173,12 +1173,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1173}, 1173},
1174{ 1174{
1175 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041), 1175 USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
1176 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1176 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1177 .vendor_name = "M-Audio", 1177 .vendor_name = "M-Audio",
1178 .product_name = "MidiSport 2x4", 1178 .product_name = "MidiSport 2x4",
1179 .ifnum = QUIRK_ANY_INTERFACE, 1179 .ifnum = QUIRK_ANY_INTERFACE,
1180 .type = QUIRK_MIDI_MIDIMAN, 1180 .type = QUIRK_MIDI_MIDIMAN,
1181 .data = & (const snd_usb_midi_endpoint_info_t) { 1181 .data = & (const struct snd_usb_midi_endpoint_info) {
1182 .out_cables = 0x000f, 1182 .out_cables = 0x000f,
1183 .in_cables = 0x0003 1183 .in_cables = 0x0003
1184 } 1184 }
@@ -1186,12 +1186,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1186}, 1186},
1187{ 1187{
1188 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001), 1188 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
1189 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1189 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1190 .vendor_name = "M-Audio", 1190 .vendor_name = "M-Audio",
1191 .product_name = "Quattro", 1191 .product_name = "Quattro",
1192 .ifnum = QUIRK_ANY_INTERFACE, 1192 .ifnum = QUIRK_ANY_INTERFACE,
1193 .type = QUIRK_COMPOSITE, 1193 .type = QUIRK_COMPOSITE,
1194 .data = & (const snd_usb_audio_quirk_t[]) { 1194 .data = & (const struct snd_usb_audio_quirk[]) {
1195 /* 1195 /*
1196 * Interfaces 0-2 are "Windows-compatible", 16-bit only, 1196 * Interfaces 0-2 are "Windows-compatible", 16-bit only,
1197 * and share endpoints with the other interfaces. 1197 * and share endpoints with the other interfaces.
@@ -1237,7 +1237,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1237 { 1237 {
1238 .ifnum = 9, 1238 .ifnum = 9,
1239 .type = QUIRK_MIDI_MIDIMAN, 1239 .type = QUIRK_MIDI_MIDIMAN,
1240 .data = & (const snd_usb_midi_endpoint_info_t) { 1240 .data = & (const struct snd_usb_midi_endpoint_info) {
1241 .out_cables = 0x0001, 1241 .out_cables = 0x0001,
1242 .in_cables = 0x0001 1242 .in_cables = 0x0001
1243 } 1243 }
@@ -1250,12 +1250,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1250}, 1250},
1251{ 1251{
1252 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003), 1252 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
1253 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1253 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1254 .vendor_name = "M-Audio", 1254 .vendor_name = "M-Audio",
1255 .product_name = "AudioPhile", 1255 .product_name = "AudioPhile",
1256 .ifnum = 6, 1256 .ifnum = 6,
1257 .type = QUIRK_MIDI_MIDIMAN, 1257 .type = QUIRK_MIDI_MIDIMAN,
1258 .data = & (const snd_usb_midi_endpoint_info_t) { 1258 .data = & (const struct snd_usb_midi_endpoint_info) {
1259 .out_cables = 0x0001, 1259 .out_cables = 0x0001,
1260 .in_cables = 0x0001 1260 .in_cables = 0x0001
1261 } 1261 }
@@ -1263,12 +1263,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1263}, 1263},
1264{ 1264{
1265 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008), 1265 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
1266 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1266 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1267 .vendor_name = "M-Audio", 1267 .vendor_name = "M-Audio",
1268 .product_name = "Ozone", 1268 .product_name = "Ozone",
1269 .ifnum = 3, 1269 .ifnum = 3,
1270 .type = QUIRK_MIDI_MIDIMAN, 1270 .type = QUIRK_MIDI_MIDIMAN,
1271 .data = & (const snd_usb_midi_endpoint_info_t) { 1271 .data = & (const struct snd_usb_midi_endpoint_info) {
1272 .out_cables = 0x0001, 1272 .out_cables = 0x0001,
1273 .in_cables = 0x0001 1273 .in_cables = 0x0001
1274 } 1274 }
@@ -1276,12 +1276,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1276}, 1276},
1277{ 1277{
1278 USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d), 1278 USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
1279 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1279 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1280 .vendor_name = "M-Audio", 1280 .vendor_name = "M-Audio",
1281 .product_name = "OmniStudio", 1281 .product_name = "OmniStudio",
1282 .ifnum = QUIRK_ANY_INTERFACE, 1282 .ifnum = QUIRK_ANY_INTERFACE,
1283 .type = QUIRK_COMPOSITE, 1283 .type = QUIRK_COMPOSITE,
1284 .data = & (const snd_usb_audio_quirk_t[]) { 1284 .data = & (const struct snd_usb_audio_quirk[]) {
1285 { 1285 {
1286 .ifnum = 0, 1286 .ifnum = 0,
1287 .type = QUIRK_IGNORE_INTERFACE 1287 .type = QUIRK_IGNORE_INTERFACE
@@ -1321,7 +1321,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1321 { 1321 {
1322 .ifnum = 9, 1322 .ifnum = 9,
1323 .type = QUIRK_MIDI_MIDIMAN, 1323 .type = QUIRK_MIDI_MIDIMAN,
1324 .data = & (const snd_usb_midi_endpoint_info_t) { 1324 .data = & (const struct snd_usb_midi_endpoint_info) {
1325 .out_cables = 0x0001, 1325 .out_cables = 0x0001,
1326 .in_cables = 0x0001 1326 .in_cables = 0x0001
1327 } 1327 }
@@ -1342,12 +1342,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1342 .idVendor = 0x07fd, 1342 .idVendor = 0x07fd,
1343 .idProduct = 0x0001, 1343 .idProduct = 0x0001,
1344 .bDeviceSubClass = 2, 1344 .bDeviceSubClass = 2,
1345 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1345 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1346 .vendor_name = "MOTU", 1346 .vendor_name = "MOTU",
1347 .product_name = "Fastlane", 1347 .product_name = "Fastlane",
1348 .ifnum = QUIRK_ANY_INTERFACE, 1348 .ifnum = QUIRK_ANY_INTERFACE,
1349 .type = QUIRK_COMPOSITE, 1349 .type = QUIRK_COMPOSITE,
1350 .data = & (const snd_usb_audio_quirk_t[]) { 1350 .data = & (const struct snd_usb_audio_quirk[]) {
1351 { 1351 {
1352 .ifnum = 0, 1352 .ifnum = 0,
1353 .type = QUIRK_MIDI_RAW 1353 .type = QUIRK_MIDI_RAW
@@ -1366,7 +1366,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1366{ 1366{
1367 /* Creative Sound Blaster MP3+ */ 1367 /* Creative Sound Blaster MP3+ */
1368 USB_DEVICE(0x041e, 0x3010), 1368 USB_DEVICE(0x041e, 0x3010),
1369 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1369 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1370 .vendor_name = "Creative Labs", 1370 .vendor_name = "Creative Labs",
1371 .product_name = "Sound Blaster MP3+", 1371 .product_name = "Sound Blaster MP3+",
1372 .ifnum = QUIRK_NO_INTERFACE 1372 .ifnum = QUIRK_NO_INTERFACE
@@ -1377,12 +1377,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1377/* Emagic devices */ 1377/* Emagic devices */
1378{ 1378{
1379 USB_DEVICE(0x086a, 0x0001), 1379 USB_DEVICE(0x086a, 0x0001),
1380 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1380 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1381 .vendor_name = "Emagic", 1381 .vendor_name = "Emagic",
1382 /* .product_name = "Unitor8", */ 1382 /* .product_name = "Unitor8", */
1383 .ifnum = 2, 1383 .ifnum = 2,
1384 .type = QUIRK_MIDI_EMAGIC, 1384 .type = QUIRK_MIDI_EMAGIC,
1385 .data = & (const snd_usb_midi_endpoint_info_t) { 1385 .data = & (const struct snd_usb_midi_endpoint_info) {
1386 .out_cables = 0x80ff, 1386 .out_cables = 0x80ff,
1387 .in_cables = 0x80ff 1387 .in_cables = 0x80ff
1388 } 1388 }
@@ -1390,12 +1390,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1390}, 1390},
1391{ 1391{
1392 USB_DEVICE(0x086a, 0x0002), 1392 USB_DEVICE(0x086a, 0x0002),
1393 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1393 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1394 .vendor_name = "Emagic", 1394 .vendor_name = "Emagic",
1395 /* .product_name = "AMT8", */ 1395 /* .product_name = "AMT8", */
1396 .ifnum = 2, 1396 .ifnum = 2,
1397 .type = QUIRK_MIDI_EMAGIC, 1397 .type = QUIRK_MIDI_EMAGIC,
1398 .data = & (const snd_usb_midi_endpoint_info_t) { 1398 .data = & (const struct snd_usb_midi_endpoint_info) {
1399 .out_cables = 0x80ff, 1399 .out_cables = 0x80ff,
1400 .in_cables = 0x80ff 1400 .in_cables = 0x80ff
1401 } 1401 }
@@ -1403,12 +1403,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1403}, 1403},
1404{ 1404{
1405 USB_DEVICE(0x086a, 0x0003), 1405 USB_DEVICE(0x086a, 0x0003),
1406 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1406 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1407 .vendor_name = "Emagic", 1407 .vendor_name = "Emagic",
1408 /* .product_name = "MT4", */ 1408 /* .product_name = "MT4", */
1409 .ifnum = 2, 1409 .ifnum = 2,
1410 .type = QUIRK_MIDI_EMAGIC, 1410 .type = QUIRK_MIDI_EMAGIC,
1411 .data = & (const snd_usb_midi_endpoint_info_t) { 1411 .data = & (const struct snd_usb_midi_endpoint_info) {
1412 .out_cables = 0x800f, 1412 .out_cables = 0x800f,
1413 .in_cables = 0x8003 1413 .in_cables = 0x8003
1414 } 1414 }
@@ -1418,7 +1418,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1418/* TerraTec devices */ 1418/* TerraTec devices */
1419{ 1419{
1420 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012), 1420 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
1421 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1421 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1422 .vendor_name = "TerraTec", 1422 .vendor_name = "TerraTec",
1423 .product_name = "PHASE 26", 1423 .product_name = "PHASE 26",
1424 .ifnum = 3, 1424 .ifnum = 3,
@@ -1427,7 +1427,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1427}, 1427},
1428{ 1428{
1429 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013), 1429 USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
1430 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1430 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1431 .vendor_name = "TerraTec", 1431 .vendor_name = "TerraTec",
1432 .product_name = "PHASE 26", 1432 .product_name = "PHASE 26",
1433 .ifnum = 3, 1433 .ifnum = 3,
@@ -1438,7 +1438,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1438/* Novation EMS devices */ 1438/* Novation EMS devices */
1439{ 1439{
1440 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001), 1440 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
1441 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1441 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1442 .vendor_name = "Novation", 1442 .vendor_name = "Novation",
1443 .product_name = "ReMOTE Audio/XStation", 1443 .product_name = "ReMOTE Audio/XStation",
1444 .ifnum = 4, 1444 .ifnum = 4,
@@ -1447,7 +1447,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1447}, 1447},
1448{ 1448{
1449 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002), 1449 USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
1450 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1450 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1451 .vendor_name = "Novation", 1451 .vendor_name = "Novation",
1452 .product_name = "Speedio", 1452 .product_name = "Speedio",
1453 .ifnum = 3, 1453 .ifnum = 3,
@@ -1456,7 +1456,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1456}, 1456},
1457{ 1457{
1458 USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661), 1458 USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
1459 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1459 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1460 .vendor_name = "Novation", 1460 .vendor_name = "Novation",
1461 .product_name = "ReMOTE25", 1461 .product_name = "ReMOTE25",
1462 .ifnum = 0, 1462 .ifnum = 0,
@@ -1466,7 +1466,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1466 1466
1467{ 1467{
1468 USB_DEVICE(0x4752, 0x0011), 1468 USB_DEVICE(0x4752, 0x0011),
1469 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1469 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1470 .vendor_name = "Miditech", 1470 .vendor_name = "Miditech",
1471 .product_name = "Midistart-2", 1471 .product_name = "Midistart-2",
1472 .ifnum = 0, 1472 .ifnum = 0,
@@ -1475,7 +1475,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1475}, 1475},
1476{ 1476{
1477 USB_DEVICE(0x7104, 0x2202), 1477 USB_DEVICE(0x7104, 0x2202),
1478 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1478 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1479 .vendor_name = "Miditech", 1479 .vendor_name = "Miditech",
1480 .product_name = "MidiStudio-2", 1480 .product_name = "MidiStudio-2",
1481 .ifnum = 0, 1481 .ifnum = 0,
@@ -1492,7 +1492,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1492 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 1492 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
1493 .bInterfaceClass = USB_CLASS_AUDIO, 1493 .bInterfaceClass = USB_CLASS_AUDIO,
1494 .bInterfaceSubClass = USB_SUBCLASS_MIDI_STREAMING, 1494 .bInterfaceSubClass = USB_SUBCLASS_MIDI_STREAMING,
1495 .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { 1495 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1496 .ifnum = QUIRK_ANY_INTERFACE, 1496 .ifnum = QUIRK_ANY_INTERFACE,
1497 .type = QUIRK_MIDI_STANDARD_INTERFACE 1497 .type = QUIRK_MIDI_STANDARD_INTERFACE
1498 } 1498 }