linux/sound/usb/caiaq/audio.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   Copyright (c) 2006-2008 Daniel Mack, Karsten Wiese
*/

#include <linux/device.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <sound/core.h>
#include <sound/pcm.h>

#include "device.h"
#include "audio.h"

#define N_URBS
#define CLOCK_DRIFT_TOLERANCE
#define FRAMES_PER_URB
#define BYTES_PER_FRAME
#define CHANNELS_PER_STREAM
#define BYTES_PER_SAMPLE
#define BYTES_PER_SAMPLE_USB
#define MAX_BUFFER_SIZE
#define MAX_ENDPOINT_SIZE

#define ENDPOINT_CAPTURE
#define ENDPOINT_PLAYBACK

#define MAKE_CHECKBYTE(cdev,stream,i)

static const struct snd_pcm_hardware snd_usb_caiaq_pcm_hardware =;

static void
activate_substream(struct snd_usb_caiaqdev *cdev,
	           struct snd_pcm_substream *sub)
{}

static void
deactivate_substream(struct snd_usb_caiaqdev *cdev,
		     struct snd_pcm_substream *sub)
{}

static int
all_substreams_zero(struct snd_pcm_substream **subs)
{}

static int stream_start(struct snd_usb_caiaqdev *cdev)
{}

static void stream_stop(struct snd_usb_caiaqdev *cdev)
{}

static int snd_usb_caiaq_substream_open(struct snd_pcm_substream *substream)
{}

static int snd_usb_caiaq_substream_close(struct snd_pcm_substream *substream)
{}

static int snd_usb_caiaq_pcm_hw_free(struct snd_pcm_substream *sub)
{}

/* this should probably go upstream */
#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_192000 != 1 << 12
#error "Change this table"
#endif

static const unsigned int rates[] =;

static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
{}

static int snd_usb_caiaq_pcm_trigger(struct snd_pcm_substream *sub, int cmd)
{}

static snd_pcm_uframes_t
snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
{}

/* operators for both playback and capture */
static const struct snd_pcm_ops snd_usb_caiaq_ops =;

static void check_for_elapsed_periods(struct snd_usb_caiaqdev *cdev,
				      struct snd_pcm_substream **subs)
{}

static void read_in_urb_mode0(struct snd_usb_caiaqdev *cdev,
			      const struct urb *urb,
			      const struct usb_iso_packet_descriptor *iso)
{}

static void read_in_urb_mode2(struct snd_usb_caiaqdev *cdev,
			      const struct urb *urb,
			      const struct usb_iso_packet_descriptor *iso)
{}

static void read_in_urb_mode3(struct snd_usb_caiaqdev *cdev,
			      const struct urb *urb,
			      const struct usb_iso_packet_descriptor *iso)
{}

static void read_in_urb(struct snd_usb_caiaqdev *cdev,
			const struct urb *urb,
			const struct usb_iso_packet_descriptor *iso)
{}

static void fill_out_urb_mode_0(struct snd_usb_caiaqdev *cdev,
				struct urb *urb,
				const struct usb_iso_packet_descriptor *iso)
{}

static void fill_out_urb_mode_3(struct snd_usb_caiaqdev *cdev,
				struct urb *urb,
				const struct usb_iso_packet_descriptor *iso)
{}

static inline void fill_out_urb(struct snd_usb_caiaqdev *cdev,
				struct urb *urb,
				const struct usb_iso_packet_descriptor *iso)
{}

static void read_completed(struct urb *urb)
{}

static void write_completed(struct urb *urb)
{}

static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret)
{}

static void free_urbs(struct urb **urbs)
{}

int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *cdev)
{}

void snd_usb_caiaq_audio_free(struct snd_usb_caiaqdev *cdev)
{}