Files
Wesley Cheng 5886d35219 FROMGIT: ALSA: usb-audio: Export USB SND APIs for modules
Some vendor modules will utilize useful parsing and endpoint management
APIs to start audio playback/capture.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Puma Hsu <pumahsu@google.com>
Tested-by: Daehwan Jung <dh10.jung@samsung.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250409194804.3773260-9-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 392112015
(cherry picked from commit 5a49a6ba2214a438edcb05f9a1f5259a70a61e47
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: I05ab1229cf340934e7251f84736e48254e9408ee
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
2025-04-16 13:40:05 +00:00

30 lines
1.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __USBAUDIO_PCM_H
#define __USBAUDIO_PCM_H
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);
bool snd_usb_pcm_has_fixed_rate(struct snd_usb_substream *as);
int snd_usb_init_pitch(struct snd_usb_audio *chip,
const struct audioformat *fmt);
void snd_usb_preallocate_buffer(struct snd_usb_substream *subs);
int snd_usb_audioformat_set_sync_ep(struct snd_usb_audio *chip,
struct audioformat *fmt);
const struct audioformat *
snd_usb_find_format(struct list_head *fmt_list_head, snd_pcm_format_t format,
unsigned int rate, unsigned int channels, bool strict_match,
struct snd_usb_substream *subs);
const struct audioformat *
snd_usb_find_substream_format(struct snd_usb_substream *subs,
const struct snd_pcm_hw_params *params);
int snd_usb_hw_params(struct snd_usb_substream *subs,
struct snd_pcm_hw_params *hw_params);
int snd_usb_hw_free(struct snd_usb_substream *subs);
#endif /* __USBAUDIO_PCM_H */