android_kernel_xiaomi_sm8450/sound/usb/pcm.h
Hemant Kumar 3f60546293 ANDROID: sound: usb: Add helper APIs to enable audio stream
Adding helper API to find usb substream context information
using card number, pcm device number and direction. This usb
substream is used to enable/disable by issuing SET_ALT
command to device. Also add disconnect call back to perform
any clean up required.

Bug: 140989596
Change-Id: I252f5171bd94b5ab096eb1a2f053f29a8c049c3b
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2019-12-05 10:20:53 -08:00

21 lines
686 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __USBAUDIO_PCM_H
#define __USBAUDIO_PCM_H
snd_pcm_uframes_t snd_usb_pcm_delay(struct snd_usb_substream *subs,
unsigned int rate);
void snd_usb_set_pcm_ops(struct snd_pcm *pcm, int stream);
int snd_usb_pcm_suspend(struct snd_usb_stream *as);
int snd_usb_pcm_resume(struct snd_usb_stream *as);
int snd_usb_init_pitch(struct snd_usb_audio *chip, int iface,
struct usb_host_interface *alts,
struct audioformat *fmt);
void snd_usb_preallocate_buffer(struct snd_usb_substream *subs);
int snd_usb_enable_audio_stream(struct snd_usb_substream *subs,
int datainterval, bool enable);
#endif /* __USBAUDIO_PCM_H */