mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
Revert "ALSA: usb-audio: Apply mutex around snd_usb_endpoint_set_params()"
This reverts commit06b6de69cfwhich is commita74f8d0aa9upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: If238e0b195375789db1828f9c3e940638f7ab2bf Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1343,11 +1343,10 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
|
||||
const struct audioformat *fmt = ep->cur_audiofmt;
|
||||
int err;
|
||||
|
||||
mutex_lock(&chip->mutex);
|
||||
/* release old buffers, if any */
|
||||
err = release_urbs(ep, false);
|
||||
if (err < 0)
|
||||
goto unlock;
|
||||
return err;
|
||||
|
||||
ep->datainterval = fmt->datainterval;
|
||||
ep->maxpacksize = fmt->maxpacksize;
|
||||
@@ -1385,16 +1384,13 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
|
||||
usb_audio_dbg(chip, "Set up %d URBS, ret=%d\n", ep->nurbs, err);
|
||||
|
||||
if (err < 0)
|
||||
goto unlock;
|
||||
return err;
|
||||
|
||||
/* some unit conversions in runtime */
|
||||
ep->maxframesize = ep->maxpacksize / ep->cur_frame_bytes;
|
||||
ep->curframesize = ep->curpacksize / ep->cur_frame_bytes;
|
||||
|
||||
err = update_clock_ref_rate(chip, ep);
|
||||
unlock:
|
||||
mutex_unlock(&chip->mutex);
|
||||
return err;
|
||||
return update_clock_ref_rate(chip, ep);
|
||||
}
|
||||
|
||||
static int init_sample_rate(struct snd_usb_audio *chip,
|
||||
|
||||
Reference in New Issue
Block a user