linux/sound/usb/hiface/pcm.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Linux driver for M2Tech hiFace compatible devices
 *
 * Copyright 2012-2013 (C) M2TECH S.r.l and Amarula Solutions B.V.
 *
 * Authors:  Michael Trimarchi <[email protected]>
 *           Antonio Ospite <[email protected]>
 *
 * The driver is based on the work done in TerraTec DMX 6Fire USB
 */

#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 =;

/* message values used to change the sample rate */
#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)
{}

/* call with stream_mutex locked */
static void hiface_pcm_stream_stop(struct pcm_runtime *rt)
{}

/* call with stream_mutex locked */
static int hiface_pcm_stream_start(struct pcm_runtime *rt)
{}

/* The hardware wants word-swapped 32-bit values */
static void memcpy_swahw32(u8 *dest, u8 *src, unsigned int n)
{}

/* call with substream locked */
/* returns true if a period elapsed */
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)
{}