linux/drivers/usb/gadget/function/u_uac1_legacy.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * u_uac1.h -- interface to USB gadget "ALSA AUDIO" utilities
 *
 * Copyright (C) 2008 Bryan Wu <[email protected]>
 * Copyright (C) 2008 Analog Devices, Inc
 */

#ifndef __U_UAC1_LEGACY_H
#define __U_UAC1_LEGACY_H

#include <linux/device.h>
#include <linux/err.h>
#include <linux/usb/audio.h>
#include <linux/usb/composite.h>

#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>

#define FILE_PCM_PLAYBACK
#define FILE_PCM_CAPTURE
#define FILE_CONTROL

#define UAC1_OUT_EP_MAX_PACKET_SIZE
#define UAC1_REQ_COUNT
#define UAC1_AUDIO_BUF_SIZE

/*
 * This represents the USB side of an audio card device, managed by a USB
 * function which provides control and stream interfaces.
 */

struct gaudio_snd_dev {};

struct gaudio {};

struct f_uac1_legacy_opts {};

int gaudio_setup(struct gaudio *card);
void gaudio_cleanup(struct gaudio *the_card);

size_t u_audio_playback(struct gaudio *card, void *buf, size_t count);
int u_audio_get_playback_channels(struct gaudio *card);
int u_audio_get_playback_rate(struct gaudio *card);

#endif /* __U_UAC1_LEGACY_H */