From c7474d09777c3d321f9f7f6a416f276204926c54 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 23 Nov 2020 09:53:11 +0100 Subject: ALSA: usb-audio: Add snd_usb_get_endpoint() helper Factor out the code to obtain snd_usb_endpoint object matching with the given endpoint. It'll be used in the later patch to add the implicit feedback hw-constraint. No functional change by this patch itself. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-6-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/usb/endpoint.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/usb/endpoint.h') diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h index d23fa0a8c11b..61487095a766 100644 --- a/sound/usb/endpoint.h +++ b/sound/usb/endpoint.h @@ -5,6 +5,10 @@ #define SND_USB_ENDPOINT_TYPE_DATA 0 #define SND_USB_ENDPOINT_TYPE_SYNC 1 +struct snd_usb_endpoint *snd_usb_get_endpoint(struct snd_usb_audio *chip, + int ep_num, int iface, + int altsetting); + struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, struct usb_host_interface *alts, int ep_num, int direction, int type); -- cgit v1.2.3