Skip to content
Commit 32eeeed9 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: usb-audio: Clean up endpoint setups at PCM prepare



This patch cleans up the superfluous checks and calls for setting up
the endpoints at PCM prepare callback:

- Drop stop_endpoints() and sync_pending_stops() calls; the stream is
  guaranteed to have been already stopped and synced at each PCM
  prepare call by ALSA PCM core

- Call snd_usb_endpoint_prepare() unconditionally;
  the check for endpoint->need_setup is done in
  snd_pcm_hw_endpoint_prepare() itself

- Apply snd_usb_set_format_quirk() only when the endpoint is actually
  set up (i.e. the return code from snd_usb_endpoint_prepare() > 0)

- Move a few lines back into snd_usb_pcm_prepare();
  it's even easier to follow than a small useless function

Link: https://lore.kernel.org/r/20220901130831.6136-1-tiwai@suse.de
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 041af768
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment