#include <asm/dma.h>
#include <linux/slab.h>
#include <linux/sched/signal.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/gus.h>
#include <sound/pcm_params.h>
#include "gus_tables.h"
#define SNDRV_GF1_PCM_RATE …
#define SNDRV_GF1_PCM_PFLG_NONE …
#define SNDRV_GF1_PCM_PFLG_ACTIVE …
#define SNDRV_GF1_PCM_PFLG_NEUTRAL …
struct gus_pcm_private { … };
static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data)
{ … }
static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream,
unsigned int offset,
unsigned int addr,
unsigned int count)
{ … }
static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream)
{ … }
static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus,
struct snd_gus_voice *pvoice)
{ … }
static void snd_gf1_pcm_interrupt_volume(struct snd_gus_card * gus,
struct snd_gus_voice * pvoice)
{ … }
static void snd_gf1_pcm_volume_change(struct snd_gus_card * gus)
{ … }
static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf,
unsigned int pos, unsigned int count,
int w16, int invert)
{ … }
static int get_bpos(struct gus_pcm_private *pcmp, int voice, unsigned int pos,
unsigned int len)
{ … }
static int playback_copy_ack(struct snd_pcm_substream *substream,
unsigned int bpos, unsigned int len)
{ … }
static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream,
int voice, unsigned long pos,
struct iov_iter *src, unsigned long count)
{ … }
static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream,
int voice, unsigned long pos,
unsigned long count)
{ … }
static int snd_gf1_pcm_playback_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{ … }
static int snd_gf1_pcm_playback_hw_free(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_playback_prepare(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{ … }
static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *substream)
{ … }
static const struct snd_ratnum clock = …;
static const struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = …;
static int snd_gf1_pcm_capture_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{ … }
static int snd_gf1_pcm_capture_prepare(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{ … }
static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(struct snd_pcm_substream *substream)
{ … }
static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus)
{ … }
static const struct snd_pcm_hardware snd_gf1_pcm_playback = …;
static const struct snd_pcm_hardware snd_gf1_pcm_capture = …;
static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime)
{ … }
static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_playback_close(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_capture_open(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_capture_close(struct snd_pcm_substream *substream)
{ … }
static int snd_gf1_pcm_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_gf1_pcm_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new snd_gf1_pcm_volume_control = …;
static const struct snd_kcontrol_new snd_gf1_pcm_volume_control1 = …;
static const struct snd_pcm_ops snd_gf1_pcm_playback_ops = …;
static const struct snd_pcm_ops snd_gf1_pcm_capture_ops = …;
int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index)
{ … }