#include <sound/pcm.h>
#include "digi00x.h"
#define CIP_FMT_AM …
#define AMDTP_FDF_AM824 …
#define MIDI_BYTES_PER_SECOND …
#define MAX_MIDI_RX_BLOCKS …
#define MAX_MIDI_PORTS …
struct dot_state { … };
struct amdtp_dot { … };
#define BYTE_PER_SAMPLE …
#define MAGIC_DOT_BYTE …
#define MAGIC_BYTE_OFF(x) …
static u8 dot_scrt(const u8 idx, const unsigned int off)
{ … }
static void dot_encode_step(struct dot_state *state, __be32 *const buffer)
{ … }
int amdtp_dot_set_parameters(struct amdtp_stream *s, unsigned int rate,
unsigned int pcm_channels)
{ … }
static void write_pcm_s32(struct amdtp_stream *s, struct snd_pcm_substream *pcm,
__be32 *buffer, unsigned int frames,
unsigned int pcm_frames)
{ … }
static void read_pcm_s32(struct amdtp_stream *s, struct snd_pcm_substream *pcm,
__be32 *buffer, unsigned int frames,
unsigned int pcm_frames)
{ … }
static void write_pcm_silence(struct amdtp_stream *s, __be32 *buffer,
unsigned int data_blocks)
{ … }
static bool midi_ratelimit_per_packet(struct amdtp_stream *s, unsigned int port)
{ … }
static inline void midi_use_bytes(struct amdtp_stream *s,
unsigned int port, unsigned int count)
{ … }
static void write_midi_messages(struct amdtp_stream *s, __be32 *buffer,
unsigned int data_blocks, unsigned int data_block_counter)
{ … }
static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
unsigned int data_blocks)
{ … }
int amdtp_dot_add_pcm_hw_constraints(struct amdtp_stream *s,
struct snd_pcm_runtime *runtime)
{ … }
void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
struct snd_rawmidi_substream *midi)
{ … }
static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
unsigned int count, struct snd_pcm_substream *pcm)
{ … }
static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
unsigned int count, struct snd_pcm_substream *pcm)
{ … }
int amdtp_dot_init(struct amdtp_stream *s, struct fw_unit *unit,
enum amdtp_stream_direction dir)
{ … }
void amdtp_dot_reset(struct amdtp_stream *s)
{ … }