aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-11-23 09:53:37 +0100
committerTakashi Iwai <tiwai@suse.de>2020-11-23 15:16:13 +0100
commit3d58760f4d0015cc1e7765b580daa007d759d86b (patch)
treebca1eab6c6df12e77c1f98f0f46992fa4528ae30 /sound/usb/endpoint.h
parentALSA: usb-audio: Drop unneeded snd_usb_substream fields (diff)
downloadlinux-dev-3d58760f4d0015cc1e7765b580daa007d759d86b.tar.xz
linux-dev-3d58760f4d0015cc1e7765b580daa007d759d86b.zip
ALSA: usb-audio: Unify the code for the next packet size calculation
There are two places calculating the next packet size for the playback stream in the exactly same way. Provide the single helper for this purpose and use it from both places gracefully. Tested-by: Keith Milner <kamilner@superlative.org> Tested-by: Dylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-32-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.h')
-rw-r--r--sound/usb/endpoint.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h
index 201011d89659..11e3bb839fd7 100644
--- a/sound/usb/endpoint.h
+++ b/sound/usb/endpoint.h
@@ -45,7 +45,7 @@ void snd_usb_endpoint_release(struct snd_usb_endpoint *ep);
void snd_usb_endpoint_free(struct snd_usb_endpoint *ep);
int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
-int snd_usb_endpoint_slave_next_packet_size(struct snd_usb_endpoint *ep);
-int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);
+int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep,
+ struct snd_urb_ctx *ctx, int idx);
#endif /* __USBAUDIO_ENDPOINT_H */