summaryrefslogtreecommitdiff
path: root/sound/usb/endpoint.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-09-29 10:08:41 +0200
committerTakashi Iwai <tiwai@suse.de>2021-09-30 13:55:22 +0200
commitd215f63d49da9a8803af3e81acd6cad743686573 (patch)
treebb91dedf94d63f1d82e5f62a44a94396b7233030 /sound/usb/endpoint.h
parentbceee75387554f682638e719d1ea60125ea78cea (diff)
ALSA: usb-audio: Check available frames for the next packet size
This is yet more preparation for the upcoming changes. Extend snd_usb_endpoint_next_packet_size() to check the available frames and return -EAGAIN if the next packet size is equal or exceeds the given size. This will be needed for avoiding XRUN during the low latency operation. As of this patch, avail=0 is passed, i.e. the check is skipped and no behavior change. Link: https://lore.kernel.org/r/20210929080844.11583-7-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.h')
-rw-r--r--sound/usb/endpoint.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h
index a1099ec37e1c..1f1a72535a64 100644
--- a/sound/usb/endpoint.h
+++ b/sound/usb/endpoint.h
@@ -46,6 +46,7 @@ void snd_usb_endpoint_free_all(struct snd_usb_audio *chip);
int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep,
- struct snd_urb_ctx *ctx, int idx);
+ struct snd_urb_ctx *ctx, int idx,
+ unsigned int avail);
#endif /* __USBAUDIO_ENDPOINT_H */