linux/sound/firewire/oxfw/oxfw-stream.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * oxfw_stream.c - a part of driver for OXFW970/971 based devices
 *
 * Copyright (c) 2014 Takashi Sakamoto
 */

#include "oxfw.h"
#include <linux/delay.h>

#define AVC_GENERIC_FRAME_MAXIMUM_BYTES
#define READY_TIMEOUT_MS

/*
 * According to datasheet of Oxford Semiconductor:
 *  OXFW970: 32.0/44.1/48.0/96.0 Khz, 8 audio channels I/O
 *  OXFW971: 32.0/44.1/48.0/88.2/96.0/192.0 kHz, 16 audio channels I/O, MIDI I/O
 */
static const unsigned int oxfw_rate_table[] =;

/*
 * See Table 5.7 – Sampling frequency for Multi-bit Audio
 * in AV/C Stream Format Information Specification 1.1 (Apr 2005, 1394TA)
 */
static const unsigned int avc_stream_rate_table[] =;

static int set_rate(struct snd_oxfw *oxfw, unsigned int rate)
{}

static int set_stream_format(struct snd_oxfw *oxfw, struct amdtp_stream *s,
			     unsigned int rate, unsigned int pcm_channels)
{}

static int start_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
{}

static int check_connection_used_by_others(struct snd_oxfw *oxfw,
					   struct amdtp_stream *stream)
{}

static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
{}

static int keep_resources(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
{}

int snd_oxfw_stream_reserve_duplex(struct snd_oxfw *oxfw,
				   struct amdtp_stream *stream,
				   unsigned int rate, unsigned int pcm_channels,
				   unsigned int frames_per_period,
				   unsigned int frames_per_buffer)
{}

int snd_oxfw_stream_start_duplex(struct snd_oxfw *oxfw)
{}

void snd_oxfw_stream_stop_duplex(struct snd_oxfw *oxfw)
{}

static void destroy_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
{}

int snd_oxfw_stream_init_duplex(struct snd_oxfw *oxfw)
{}

// This function should be called before starting the stream or after stopping
// the streams.
void snd_oxfw_stream_destroy_duplex(struct snd_oxfw *oxfw)
{}

void snd_oxfw_stream_update_duplex(struct snd_oxfw *oxfw)
{}

int snd_oxfw_stream_get_current_formation(struct snd_oxfw *oxfw,
				enum avc_general_plug_dir dir,
				struct snd_oxfw_stream_formation *formation)
{}

/*
 * See Table 6.16 - AM824 Stream Format
 *     Figure 6.19 - format_information field for AM824 Compound
 * in AV/C Stream Format Information Specification 1.1 (Apr 2005, 1394TA)
 * Also 'Clause 12 AM824 sequence adaption layers' in IEC 61883-6:2005
 */
int snd_oxfw_stream_parse_format(const u8 *format,
				 struct snd_oxfw_stream_formation *formation)
{}

static int
assume_stream_formats(struct snd_oxfw *oxfw, enum avc_general_plug_dir dir,
		      unsigned int pid, u8 *buf, unsigned int *len,
		      u8 **formats)
{}

static int fill_stream_formats(struct snd_oxfw *oxfw,
			       enum avc_general_plug_dir dir,
			       unsigned short pid)
{}

int snd_oxfw_stream_discover(struct snd_oxfw *oxfw)
{}

void snd_oxfw_stream_lock_changed(struct snd_oxfw *oxfw)
{}

int snd_oxfw_stream_lock_try(struct snd_oxfw *oxfw)
{}

void snd_oxfw_stream_lock_release(struct snd_oxfw *oxfw)
{}