Lines 520-531
static int snd_usb_hw_params(struct snd_pcm_substream *substream,
Link Here
|
520 |
close_endpoints(chip, subs); |
520 |
close_endpoints(chip, subs); |
521 |
} |
521 |
} |
522 |
|
522 |
|
523 |
subs->data_endpoint = snd_usb_endpoint_open(chip, fmt, hw_params, false); |
|
|
524 |
if (!subs->data_endpoint) { |
525 |
ret = -EINVAL; |
526 |
goto unlock; |
527 |
} |
528 |
|
529 |
if (fmt->sync_ep) { |
523 |
if (fmt->sync_ep) { |
530 |
subs->sync_endpoint = snd_usb_endpoint_open(chip, sync_fmt, |
524 |
subs->sync_endpoint = snd_usb_endpoint_open(chip, sync_fmt, |
531 |
hw_params, |
525 |
hw_params, |
Lines 535-543
static int snd_usb_hw_params(struct snd_pcm_substream *substream,
Link Here
|
535 |
goto unlock; |
529 |
goto unlock; |
536 |
} |
530 |
} |
537 |
|
531 |
|
|
|
532 |
ssleep(2); |
533 |
} |
534 |
|
535 |
subs->data_endpoint = snd_usb_endpoint_open(chip, fmt, hw_params, false); |
536 |
if (!subs->data_endpoint) { |
537 |
ret = -EINVAL; |
538 |
goto unlock; |
539 |
} |
540 |
|
541 |
if (subs->sync_endpoint) |
538 |
snd_usb_endpoint_set_sync(chip, subs->data_endpoint, |
542 |
snd_usb_endpoint_set_sync(chip, subs->data_endpoint, |
539 |
subs->sync_endpoint); |
543 |
subs->sync_endpoint); |
540 |
} |
|
|
541 |
|
544 |
|
542 |
mutex_lock(&chip->mutex); |
545 |
mutex_lock(&chip->mutex); |
543 |
subs->cur_audiofmt = fmt; |
546 |
subs->cur_audiofmt = fmt; |