aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/caiaq/audio.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-06-01 15:36:23 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-02 03:39:29 -0400
commit9318dce5038f193f46091b80c61928395a4139b7 (patch)
tree0258e9550b023e635103f4cf695336f27d190c05 /sound/usb/caiaq/audio.c
parent3218911f839b6c85acbf872ad264ea69aa4d89ad (diff)
ALSA: snd_usb_caiaq: clean whitespaces
Cosmetic changes only, no code change. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/caiaq/audio.c')
-rw-r--r--sound/usb/caiaq/audio.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index b13ce767ac72..b14451342166 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -42,10 +42,10 @@
42 (stream << 1) | (~(i / (dev->n_streams * BYTES_PER_SAMPLE_USB)) & 1) 42 (stream << 1) | (~(i / (dev->n_streams * BYTES_PER_SAMPLE_USB)) & 1)
43 43
44static struct snd_pcm_hardware snd_usb_caiaq_pcm_hardware = { 44static struct snd_pcm_hardware snd_usb_caiaq_pcm_hardware = {
45 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 45 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
46 SNDRV_PCM_INFO_BLOCK_TRANSFER), 46 SNDRV_PCM_INFO_BLOCK_TRANSFER),
47 .formats = SNDRV_PCM_FMTBIT_S24_3BE, 47 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
48 .rates = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | 48 .rates = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
49 SNDRV_PCM_RATE_96000), 49 SNDRV_PCM_RATE_96000),
50 .rate_min = 44100, 50 .rate_min = 44100,
51 .rate_max = 0, /* will overwrite later */ 51 .rate_max = 0, /* will overwrite later */
@@ -68,7 +68,7 @@ activate_substream(struct snd_usb_caiaqdev *dev,
68 dev->sub_capture[sub->number] = sub; 68 dev->sub_capture[sub->number] = sub;
69} 69}
70 70
71static void 71static void
72deactivate_substream(struct snd_usb_caiaqdev *dev, 72deactivate_substream(struct snd_usb_caiaqdev *dev,
73 struct snd_pcm_substream *sub) 73 struct snd_pcm_substream *sub)
74{ 74{
@@ -118,7 +118,7 @@ static int stream_start(struct snd_usb_caiaqdev *dev)
118 return -EPIPE; 118 return -EPIPE;
119 } 119 }
120 } 120 }
121 121
122 return 0; 122 return 0;
123} 123}
124 124
@@ -129,7 +129,7 @@ static void stream_stop(struct snd_usb_caiaqdev *dev)
129 debug("%s(%p)\n", __func__, dev); 129 debug("%s(%p)\n", __func__, dev);
130 if (!dev->streaming) 130 if (!dev->streaming)
131 return; 131 return;
132 132
133 dev->streaming = 0; 133 dev->streaming = 0;
134 134
135 for (i = 0; i < N_URBS; i++) { 135 for (i = 0; i < N_URBS; i++) {
@@ -154,7 +154,7 @@ static int snd_usb_caiaq_substream_close(struct snd_pcm_substream *substream)
154 debug("%s(%p)\n", __func__, substream); 154 debug("%s(%p)\n", __func__, substream);
155 if (all_substreams_zero(dev->sub_playback) && 155 if (all_substreams_zero(dev->sub_playback) &&
156 all_substreams_zero(dev->sub_capture)) { 156 all_substreams_zero(dev->sub_capture)) {
157 /* when the last client has stopped streaming, 157 /* when the last client has stopped streaming,
158 * all sample rates are allowed again */ 158 * all sample rates are allowed again */
159 stream_stop(dev); 159 stream_stop(dev);
160 dev->pcm_info.rates = dev->samplerates; 160 dev->pcm_info.rates = dev->samplerates;
@@ -194,7 +194,7 @@ static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
194 struct snd_pcm_runtime *runtime = substream->runtime; 194 struct snd_pcm_runtime *runtime = substream->runtime;
195 195
196 debug("%s(%p)\n", __func__, substream); 196 debug("%s(%p)\n", __func__, substream);
197 197
198 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 198 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
199 dev->period_out_count[index] = BYTES_PER_SAMPLE + 1; 199 dev->period_out_count[index] = BYTES_PER_SAMPLE + 1;
200 dev->audio_out_buf_pos[index] = BYTES_PER_SAMPLE + 1; 200 dev->audio_out_buf_pos[index] = BYTES_PER_SAMPLE + 1;
@@ -205,19 +205,19 @@ static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
205 205
206 if (dev->streaming) 206 if (dev->streaming)
207 return 0; 207 return 0;
208 208
209 /* the first client that opens a stream defines the sample rate 209 /* the first client that opens a stream defines the sample rate
210 * setting for all subsequent calls, until the last client closed. */ 210 * setting for all subsequent calls, until the last client closed. */
211 for (i=0; i < ARRAY_SIZE(rates); i++) 211 for (i=0; i < ARRAY_SIZE(rates); i++)
212 if (runtime->rate == rates[i]) 212 if (runtime->rate == rates[i])
213 dev->pcm_info.rates = 1 << i; 213 dev->pcm_info.rates = 1 << i;
214 214
215 snd_pcm_limit_hw_rates(runtime); 215 snd_pcm_limit_hw_rates(runtime);
216 216
217 bytes_per_sample = BYTES_PER_SAMPLE; 217 bytes_per_sample = BYTES_PER_SAMPLE;
218 if (dev->spec.data_alignment == 2) 218 if (dev->spec.data_alignment == 2)
219 bytes_per_sample++; 219 bytes_per_sample++;
220 220
221 bpp = ((runtime->rate / 8000) + CLOCK_DRIFT_TOLERANCE) 221 bpp = ((runtime->rate / 8000) + CLOCK_DRIFT_TOLERANCE)
222 * bytes_per_sample * CHANNELS_PER_STREAM * dev->n_streams; 222 * bytes_per_sample * CHANNELS_PER_STREAM * dev->n_streams;
223 223
@@ -232,7 +232,7 @@ static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
232 ret = stream_start(dev); 232 ret = stream_start(dev);
233 if (ret) 233 if (ret)
234 return ret; 234 return ret;
235 235
236 dev->output_running = 0; 236 dev->output_running = 0;
237 wait_event_timeout(dev->prepare_wait_queue, dev->output_running, HZ); 237 wait_event_timeout(dev->prepare_wait_queue, dev->output_running, HZ);
238 if (!dev->output_running) { 238 if (!dev->output_running) {
@@ -273,7 +273,7 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
273 return SNDRV_PCM_POS_XRUN; 273 return SNDRV_PCM_POS_XRUN;
274 274
275 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) 275 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK)
276 return bytes_to_frames(sub->runtime, 276 return bytes_to_frames(sub->runtime,
277 dev->audio_out_buf_pos[index]); 277 dev->audio_out_buf_pos[index]);
278 else 278 else
279 return bytes_to_frames(sub->runtime, 279 return bytes_to_frames(sub->runtime,
@@ -291,7 +291,7 @@ static struct snd_pcm_ops snd_usb_caiaq_ops = {
291 .trigger = snd_usb_caiaq_pcm_trigger, 291 .trigger = snd_usb_caiaq_pcm_trigger,
292 .pointer = snd_usb_caiaq_pcm_pointer 292 .pointer = snd_usb_caiaq_pcm_pointer
293}; 293};
294 294
295static void check_for_elapsed_periods(struct snd_usb_caiaqdev *dev, 295static void check_for_elapsed_periods(struct snd_usb_caiaqdev *dev,
296 struct snd_pcm_substream **subs) 296 struct snd_pcm_substream **subs)
297{ 297{
@@ -333,7 +333,7 @@ static void read_in_urb_mode0(struct snd_usb_caiaqdev *dev,
333 struct snd_pcm_runtime *rt = sub->runtime; 333 struct snd_pcm_runtime *rt = sub->runtime;
334 char *audio_buf = rt->dma_area; 334 char *audio_buf = rt->dma_area;
335 int sz = frames_to_bytes(rt, rt->buffer_size); 335 int sz = frames_to_bytes(rt, rt->buffer_size);
336 audio_buf[dev->audio_in_buf_pos[stream]++] 336 audio_buf[dev->audio_in_buf_pos[stream]++]
337 = usb_buf[i]; 337 = usb_buf[i];
338 dev->period_in_count[stream]++; 338 dev->period_in_count[stream]++;
339 if (dev->audio_in_buf_pos[stream] == sz) 339 if (dev->audio_in_buf_pos[stream] == sz)
@@ -354,14 +354,14 @@ static void read_in_urb_mode2(struct snd_usb_caiaqdev *dev,
354 354
355 for (i = 0; i < iso->actual_length;) { 355 for (i = 0; i < iso->actual_length;) {
356 if (i % (dev->n_streams * BYTES_PER_SAMPLE_USB) == 0) { 356 if (i % (dev->n_streams * BYTES_PER_SAMPLE_USB) == 0) {
357 for (stream = 0; 357 for (stream = 0;
358 stream < dev->n_streams; 358 stream < dev->n_streams;
359 stream++, i++) { 359 stream++, i++) {
360 if (dev->first_packet) 360 if (dev->first_packet)
361 continue; 361 continue;
362 362
363 check_byte = MAKE_CHECKBYTE(dev, stream, i); 363 check_byte = MAKE_CHECKBYTE(dev, stream, i);
364 364
365 if ((usb_buf[i] & 0x3f) != check_byte) 365 if ((usb_buf[i] & 0x3f) != check_byte)
366 dev->input_panic = 1; 366 dev->input_panic = 1;
367 367
@@ -410,21 +410,21 @@ static void read_in_urb(struct snd_usb_caiaqdev *dev,
410 } 410 }
411 411
412 if ((dev->input_panic || dev->output_panic) && !dev->warned) { 412 if ((dev->input_panic || dev->output_panic) && !dev->warned) {
413 debug("streaming error detected %s %s\n", 413 debug("streaming error detected %s %s\n",
414 dev->input_panic ? "(input)" : "", 414 dev->input_panic ? "(input)" : "",
415 dev->output_panic ? "(output)" : ""); 415 dev->output_panic ? "(output)" : "");
416 dev->warned = 1; 416 dev->warned = 1;
417 } 417 }
418} 418}
419 419
420static void fill_out_urb(struct snd_usb_caiaqdev *dev, 420static void fill_out_urb(struct snd_usb_caiaqdev *dev,
421 struct urb *urb, 421 struct urb *urb,
422 const struct usb_iso_packet_descriptor *iso) 422 const struct usb_iso_packet_descriptor *iso)
423{ 423{
424 unsigned char *usb_buf = urb->transfer_buffer + iso->offset; 424 unsigned char *usb_buf = urb->transfer_buffer + iso->offset;
425 struct snd_pcm_substream *sub; 425 struct snd_pcm_substream *sub;
426 int stream, i; 426 int stream, i;
427 427
428 for (i = 0; i < iso->length;) { 428 for (i = 0; i < iso->length;) {
429 for (stream = 0; stream < dev->n_streams; stream++, i++) { 429 for (stream = 0; stream < dev->n_streams; stream++, i++) {
430 sub = dev->sub_playback[stream]; 430 sub = dev->sub_playback[stream];
@@ -444,7 +444,7 @@ static void fill_out_urb(struct snd_usb_caiaqdev *dev,
444 444
445 /* fill in the check bytes */ 445 /* fill in the check bytes */
446 if (dev->spec.data_alignment == 2 && 446 if (dev->spec.data_alignment == 2 &&
447 i % (dev->n_streams * BYTES_PER_SAMPLE_USB) == 447 i % (dev->n_streams * BYTES_PER_SAMPLE_USB) ==
448 (dev->n_streams * CHANNELS_PER_STREAM)) 448 (dev->n_streams * CHANNELS_PER_STREAM))
449 for (stream = 0; stream < dev->n_streams; stream++, i++) 449 for (stream = 0; stream < dev->n_streams; stream++, i++)
450 usb_buf[i] = MAKE_CHECKBYTE(dev, stream, i); 450 usb_buf[i] = MAKE_CHECKBYTE(dev, stream, i);
@@ -453,7 +453,7 @@ static void fill_out_urb(struct snd_usb_caiaqdev *dev,
453 453
454static void read_completed(struct urb *urb) 454static void read_completed(struct urb *urb)
455{ 455{
456 struct snd_usb_caiaq_cb_info *info = urb->context; 456 struct snd_usb_caiaq_cb_info *info = urb->context;
457 struct snd_usb_caiaqdev *dev; 457 struct snd_usb_caiaqdev *dev;
458 struct urb *out; 458 struct urb *out;
459 int frame, len, send_it = 0, outframe = 0; 459 int frame, len, send_it = 0, outframe = 0;
@@ -478,7 +478,7 @@ static void read_completed(struct urb *urb)
478 out->iso_frame_desc[outframe].length = len; 478 out->iso_frame_desc[outframe].length = len;
479 out->iso_frame_desc[outframe].actual_length = 0; 479 out->iso_frame_desc[outframe].actual_length = 0;
480 out->iso_frame_desc[outframe].offset = BYTES_PER_FRAME * frame; 480 out->iso_frame_desc[outframe].offset = BYTES_PER_FRAME * frame;
481 481
482 if (len > 0) { 482 if (len > 0) {
483 spin_lock(&dev->spinlock); 483 spin_lock(&dev->spinlock);
484 fill_out_urb(dev, out, &out->iso_frame_desc[outframe]); 484 fill_out_urb(dev, out, &out->iso_frame_desc[outframe]);
@@ -497,14 +497,14 @@ static void read_completed(struct urb *urb)
497 out->transfer_flags = URB_ISO_ASAP; 497 out->transfer_flags = URB_ISO_ASAP;
498 usb_submit_urb(out, GFP_ATOMIC); 498 usb_submit_urb(out, GFP_ATOMIC);
499 } 499 }
500 500
501 /* re-submit inbound urb */ 501 /* re-submit inbound urb */
502 for (frame = 0; frame < FRAMES_PER_URB; frame++) { 502 for (frame = 0; frame < FRAMES_PER_URB; frame++) {
503 urb->iso_frame_desc[frame].offset = BYTES_PER_FRAME * frame; 503 urb->iso_frame_desc[frame].offset = BYTES_PER_FRAME * frame;
504 urb->iso_frame_desc[frame].length = BYTES_PER_FRAME; 504 urb->iso_frame_desc[frame].length = BYTES_PER_FRAME;
505 urb->iso_frame_desc[frame].actual_length = 0; 505 urb->iso_frame_desc[frame].actual_length = 0;
506 } 506 }
507 507
508 urb->number_of_packets = FRAMES_PER_URB; 508 urb->number_of_packets = FRAMES_PER_URB;
509 urb->transfer_flags = URB_ISO_ASAP; 509 urb->transfer_flags = URB_ISO_ASAP;
510 usb_submit_urb(urb, GFP_ATOMIC); 510 usb_submit_urb(urb, GFP_ATOMIC);
@@ -528,7 +528,7 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *dev, int dir, int *ret)
528 struct usb_device *usb_dev = dev->chip.dev; 528 struct usb_device *usb_dev = dev->chip.dev;
529 unsigned int pipe; 529 unsigned int pipe;
530 530
531 pipe = (dir == SNDRV_PCM_STREAM_PLAYBACK) ? 531 pipe = (dir == SNDRV_PCM_STREAM_PLAYBACK) ?
532 usb_sndisocpipe(usb_dev, ENDPOINT_PLAYBACK) : 532 usb_sndisocpipe(usb_dev, ENDPOINT_PLAYBACK) :
533 usb_rcvisocpipe(usb_dev, ENDPOINT_CAPTURE); 533 usb_rcvisocpipe(usb_dev, ENDPOINT_CAPTURE);
534 534
@@ -547,25 +547,25 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *dev, int dir, int *ret)
547 return urbs; 547 return urbs;
548 } 548 }
549 549
550 urbs[i]->transfer_buffer = 550 urbs[i]->transfer_buffer =
551 kmalloc(FRAMES_PER_URB * BYTES_PER_FRAME, GFP_KERNEL); 551 kmalloc(FRAMES_PER_URB * BYTES_PER_FRAME, GFP_KERNEL);
552 if (!urbs[i]->transfer_buffer) { 552 if (!urbs[i]->transfer_buffer) {
553 log("unable to kmalloc() transfer buffer, OOM!?\n"); 553 log("unable to kmalloc() transfer buffer, OOM!?\n");
554 *ret = -ENOMEM; 554 *ret = -ENOMEM;
555 return urbs; 555 return urbs;
556 } 556 }
557 557
558 for (frame = 0; frame < FRAMES_PER_URB; frame++) { 558 for (frame = 0; frame < FRAMES_PER_URB; frame++) {
559 struct usb_iso_packet_descriptor *iso = 559 struct usb_iso_packet_descriptor *iso =
560 &urbs[i]->iso_frame_desc[frame]; 560 &urbs[i]->iso_frame_desc[frame];
561 561
562 iso->offset = BYTES_PER_FRAME * frame; 562 iso->offset = BYTES_PER_FRAME * frame;
563 iso->length = BYTES_PER_FRAME; 563 iso->length = BYTES_PER_FRAME;
564 } 564 }
565 565
566 urbs[i]->dev = usb_dev; 566 urbs[i]->dev = usb_dev;
567 urbs[i]->pipe = pipe; 567 urbs[i]->pipe = pipe;
568 urbs[i]->transfer_buffer_length = FRAMES_PER_URB 568 urbs[i]->transfer_buffer_length = FRAMES_PER_URB
569 * BYTES_PER_FRAME; 569 * BYTES_PER_FRAME;
570 urbs[i]->context = &dev->data_cb_info[i]; 570 urbs[i]->context = &dev->data_cb_info[i];
571 urbs[i]->interval = 1; 571 urbs[i]->interval = 1;
@@ -589,7 +589,7 @@ static void free_urbs(struct urb **urbs)
589 for (i = 0; i < N_URBS; i++) { 589 for (i = 0; i < N_URBS; i++) {
590 if (!urbs[i]) 590 if (!urbs[i])
591 continue; 591 continue;
592 592
593 usb_kill_urb(urbs[i]); 593 usb_kill_urb(urbs[i]);
594 kfree(urbs[i]->transfer_buffer); 594 kfree(urbs[i]->transfer_buffer);
595 usb_free_urb(urbs[i]); 595 usb_free_urb(urbs[i]);
@@ -602,11 +602,11 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
602{ 602{
603 int i, ret; 603 int i, ret;
604 604
605 dev->n_audio_in = max(dev->spec.num_analog_audio_in, 605 dev->n_audio_in = max(dev->spec.num_analog_audio_in,
606 dev->spec.num_digital_audio_in) / 606 dev->spec.num_digital_audio_in) /
607 CHANNELS_PER_STREAM; 607 CHANNELS_PER_STREAM;
608 dev->n_audio_out = max(dev->spec.num_analog_audio_out, 608 dev->n_audio_out = max(dev->spec.num_analog_audio_out,
609 dev->spec.num_digital_audio_out) / 609 dev->spec.num_digital_audio_out) /
610 CHANNELS_PER_STREAM; 610 CHANNELS_PER_STREAM;
611 dev->n_streams = max(dev->n_audio_in, dev->n_audio_out); 611 dev->n_streams = max(dev->n_audio_in, dev->n_audio_out);
612 612
@@ -619,7 +619,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
619 return -EINVAL; 619 return -EINVAL;
620 } 620 }
621 621
622 ret = snd_pcm_new(dev->chip.card, dev->product_name, 0, 622 ret = snd_pcm_new(dev->chip.card, dev->product_name, 0,
623 dev->n_audio_out, dev->n_audio_in, &dev->pcm); 623 dev->n_audio_out, dev->n_audio_in, &dev->pcm);
624 624
625 if (ret < 0) { 625 if (ret < 0) {
@@ -632,7 +632,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
632 632
633 memset(dev->sub_playback, 0, sizeof(dev->sub_playback)); 633 memset(dev->sub_playback, 0, sizeof(dev->sub_playback));
634 memset(dev->sub_capture, 0, sizeof(dev->sub_capture)); 634 memset(dev->sub_capture, 0, sizeof(dev->sub_capture));
635 635
636 memcpy(&dev->pcm_info, &snd_usb_caiaq_pcm_hardware, 636 memcpy(&dev->pcm_info, &snd_usb_caiaq_pcm_hardware,
637 sizeof(snd_usb_caiaq_pcm_hardware)); 637 sizeof(snd_usb_caiaq_pcm_hardware));
638 638
@@ -651,9 +651,9 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
651 break; 651 break;
652 } 652 }
653 653
654 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK, 654 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK,
655 &snd_usb_caiaq_ops); 655 &snd_usb_caiaq_ops);
656 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_CAPTURE, 656 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_CAPTURE,
657 &snd_usb_caiaq_ops); 657 &snd_usb_caiaq_ops);
658 658
659 snd_pcm_lib_preallocate_pages_for_all(dev->pcm, 659 snd_pcm_lib_preallocate_pages_for_all(dev->pcm,
@@ -662,7 +662,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
662 MAX_BUFFER_SIZE, MAX_BUFFER_SIZE); 662 MAX_BUFFER_SIZE, MAX_BUFFER_SIZE);
663 663
664 dev->data_cb_info = 664 dev->data_cb_info =
665 kmalloc(sizeof(struct snd_usb_caiaq_cb_info) * N_URBS, 665 kmalloc(sizeof(struct snd_usb_caiaq_cb_info) * N_URBS,
666 GFP_KERNEL); 666 GFP_KERNEL);
667 667
668 if (!dev->data_cb_info) 668 if (!dev->data_cb_info)
@@ -672,14 +672,14 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
672 dev->data_cb_info[i].dev = dev; 672 dev->data_cb_info[i].dev = dev;
673 dev->data_cb_info[i].index = i; 673 dev->data_cb_info[i].index = i;
674 } 674 }
675 675
676 dev->data_urbs_in = alloc_urbs(dev, SNDRV_PCM_STREAM_CAPTURE, &ret); 676 dev->data_urbs_in = alloc_urbs(dev, SNDRV_PCM_STREAM_CAPTURE, &ret);
677 if (ret < 0) { 677 if (ret < 0) {
678 kfree(dev->data_cb_info); 678 kfree(dev->data_cb_info);
679 free_urbs(dev->data_urbs_in); 679 free_urbs(dev->data_urbs_in);
680 return ret; 680 return ret;
681 } 681 }
682 682
683 dev->data_urbs_out = alloc_urbs(dev, SNDRV_PCM_STREAM_PLAYBACK, &ret); 683 dev->data_urbs_out = alloc_urbs(dev, SNDRV_PCM_STREAM_PLAYBACK, &ret);
684 if (ret < 0) { 684 if (ret < 0) {
685 kfree(dev->data_cb_info); 685 kfree(dev->data_cb_info);