#include <linux/slab.h>
#include <sound/pcm.h>
#include "pcm.h"
#include "chip.h"
#define OUT_EP …
#define PCM_N_URBS …
#define PCM_PACKET_SIZE …
#define PCM_BUFFER_SIZE …
struct pcm_urb { … };
struct pcm_substream { … };
enum { … };
struct pcm_runtime { … };
static const unsigned int rates[] = …;
static const struct snd_pcm_hw_constraint_list constraints_extra_rates = …;
static const struct snd_pcm_hardware pcm_hw = …;
#define HIFACE_SET_RATE_REQUEST …
#define HIFACE_RATE_44100 …
#define HIFACE_RATE_48000 …
#define HIFACE_RATE_88200 …
#define HIFACE_RATE_96000 …
#define HIFACE_RATE_176400 …
#define HIFACE_RATE_192000 …
#define HIFACE_RATE_352800 …
#define HIFACE_RATE_384000 …
static int hiface_pcm_set_rate(struct pcm_runtime *rt, unsigned int rate)
{ … }
static struct pcm_substream *hiface_pcm_get_substream(struct snd_pcm_substream
*alsa_sub)
{ … }
static void hiface_pcm_stream_stop(struct pcm_runtime *rt)
{ … }
static int hiface_pcm_stream_start(struct pcm_runtime *rt)
{ … }
static void memcpy_swahw32(u8 *dest, u8 *src, unsigned int n)
{ … }
static bool hiface_pcm_playback(struct pcm_substream *sub, struct pcm_urb *urb)
{ … }
static void hiface_pcm_out_urb_handler(struct urb *usb_urb)
{ … }
static int hiface_pcm_open(struct snd_pcm_substream *alsa_sub)
{ … }
static int hiface_pcm_close(struct snd_pcm_substream *alsa_sub)
{ … }
static int hiface_pcm_prepare(struct snd_pcm_substream *alsa_sub)
{ … }
static int hiface_pcm_trigger(struct snd_pcm_substream *alsa_sub, int cmd)
{ … }
static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub)
{ … }
static const struct snd_pcm_ops pcm_ops = …;
static int hiface_pcm_init_urb(struct pcm_urb *urb,
struct hiface_chip *chip,
unsigned int ep,
void (*handler)(struct urb *))
{ … }
void hiface_pcm_abort(struct hiface_chip *chip)
{ … }
static void hiface_pcm_destroy(struct hiface_chip *chip)
{ … }
static void hiface_pcm_free(struct snd_pcm *pcm)
{ … }
int hiface_pcm_init(struct hiface_chip *chip, u8 extra_freq)
{ … }