Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[linux-2.6-block.git] / sound / usb / endpoint.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
e5779998
DM
2#ifndef __USBAUDIO_ENDPOINT_H
3#define __USBAUDIO_ENDPOINT_H
4
8fdff6a3
DM
5#define SND_USB_ENDPOINT_TYPE_DATA 0
6#define SND_USB_ENDPOINT_TYPE_SYNC 1
7
8struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
9 struct usb_host_interface *alts,
10 int ep_num, int direction, int type);
11
12int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
35ec7aa2
DR
13 snd_pcm_format_t pcm_format,
14 unsigned int channels,
15 unsigned int period_bytes,
976b6c06
AS
16 unsigned int period_frames,
17 unsigned int buffer_periods,
35ec7aa2 18 unsigned int rate,
8fdff6a3
DM
19 struct audioformat *fmt,
20 struct snd_usb_endpoint *sync_ep);
21
1d0f9530 22int snd_usb_endpoint_start(struct snd_usb_endpoint *ep);
b2eb950d 23void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);
f58161ba 24void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
8fdff6a3 25int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
9b7c552b 26void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
92a586bd 27void snd_usb_endpoint_release(struct snd_usb_endpoint *ep);
a6cece9d 28void snd_usb_endpoint_free(struct snd_usb_endpoint *ep);
8fdff6a3 29
98ae472b 30int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
245baf98 31int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);
8fdff6a3
DM
32
33void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
34 struct snd_usb_endpoint *sender,
35 const struct urb *urb);
36
e5779998 37#endif /* __USBAUDIO_ENDPOINT_H */