#include <linux/module.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/delay.h>
#include <linux/pm_runtime.h>
#include <linux/dma-mapping.h>
#include <sound/soc.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include "loongson_i2s.h"
#define DMA_ORDER_STOP …
#define DMA_ORDER_START …
#define DMA_ORDER_ASK_VALID …
#define DMA_ORDER_AXI_UNCO …
#define DMA_ORDER_ADDR_64 …
#define DMA_ORDER_ASK_MASK …
#define DMA_ORDER_CTRL_MASK …
struct loongson_dma_desc { … } __packed;
struct loongson_runtime_data { … };
static const struct snd_pcm_hardware ls_pcm_hardware = …;
static struct
loongson_dma_desc *dma_desc_save(struct loongson_runtime_data *prtd)
{ … }
static int loongson_pcm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{ … }
static int loongson_pcm_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static snd_pcm_uframes_t
loongson_pcm_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static irqreturn_t loongson_pcm_dma_irq(int irq, void *devid)
{ … }
static int loongson_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int loongson_pcm_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int loongson_pcm_mmap(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct vm_area_struct *vma)
{ … }
static int loongson_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{ … }
const struct snd_soc_component_driver loongson_i2s_component = …;