linux/sound/soc/sh/rz-ssi.c

// SPDX-License-Identifier: GPL-2.0
//
// Renesas RZ/G2L ASoC Serial Sound Interface (SSIF-2) Driver
//
// Copyright (C) 2021 Renesas Electronics Corp.
// Copyright (C) 2019 Chris Brandt.
//

#include <linux/clk.h>
#include <linux/dmaengine.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <sound/soc.h>

/* REGISTER OFFSET */
#define SSICR
#define SSISR
#define SSIFCR
#define SSIFSR
#define SSIFTDR
#define SSIFRDR
#define SSIOFR
#define SSISCR

/* SSI REGISTER BITS */
#define SSICR_DWL(x)
#define SSICR_SWL(x)

#define SSICR_CKS
#define SSICR_TUIEN
#define SSICR_TOIEN
#define SSICR_RUIEN
#define SSICR_ROIEN
#define SSICR_MST
#define SSICR_BCKP
#define SSICR_LRCKP
#define SSICR_CKDV(x)
#define SSICR_TEN
#define SSICR_REN

#define SSISR_TUIRQ
#define SSISR_TOIRQ
#define SSISR_RUIRQ
#define SSISR_ROIRQ
#define SSISR_IIRQ

#define SSIFCR_AUCKE
#define SSIFCR_SSIRST
#define SSIFCR_TIE
#define SSIFCR_RIE
#define SSIFCR_TFRST
#define SSIFCR_RFRST

#define SSIFSR_TDC_MASK
#define SSIFSR_TDC_SHIFT
#define SSIFSR_RDC_MASK
#define SSIFSR_RDC_SHIFT

#define SSIFSR_TDE
#define SSIFSR_RDF

#define SSIOFR_LRCONT

#define SSISCR_TDES(x)
#define SSISCR_RDFS(x)

/* Pre allocated buffers sizes */
#define PREALLOC_BUFFER
#define PREALLOC_BUFFER_MAX

#define SSI_RATES
#define SSI_FMTS
#define SSI_CHAN_MIN
#define SSI_CHAN_MAX
#define SSI_FIFO_DEPTH

struct rz_ssi_priv;

struct rz_ssi_stream {};

struct rz_ssi_priv {};

static void rz_ssi_dma_complete(void *data);

static void rz_ssi_reg_writel(struct rz_ssi_priv *priv, uint reg, u32 data)
{}

static u32 rz_ssi_reg_readl(struct rz_ssi_priv *priv, uint reg)
{}

static void rz_ssi_reg_mask_setl(struct rz_ssi_priv *priv, uint reg,
				 u32 bclr, u32 bset)
{}

static inline struct snd_soc_dai *
rz_ssi_get_dai(struct snd_pcm_substream *substream)
{}

static inline bool rz_ssi_stream_is_play(struct rz_ssi_priv *ssi,
					 struct snd_pcm_substream *substream)
{}

static inline struct rz_ssi_stream *
rz_ssi_stream_get(struct rz_ssi_priv *ssi, struct snd_pcm_substream *substream)
{}

static inline bool rz_ssi_is_dma_enabled(struct rz_ssi_priv *ssi)
{}

static void rz_ssi_set_substream(struct rz_ssi_stream *strm,
				 struct snd_pcm_substream *substream)
{}

static bool rz_ssi_stream_is_valid(struct rz_ssi_priv *ssi,
				   struct rz_ssi_stream *strm)
{}

static void rz_ssi_stream_init(struct rz_ssi_stream *strm,
			       struct snd_pcm_substream *substream)
{}

static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi,
			       struct rz_ssi_stream *strm)
{}

static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate,
			    unsigned int channels)
{}

static int rz_ssi_start(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm)
{}

static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm)
{}

static void rz_ssi_pointer_update(struct rz_ssi_stream *strm, int frames)
{}

static int rz_ssi_pio_recv(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm)
{}

static int rz_ssi_pio_send(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm)
{}

static irqreturn_t rz_ssi_interrupt(int irq, void *data)
{}

static int rz_ssi_dma_slave_config(struct rz_ssi_priv *ssi,
				   struct dma_chan *dma_ch, bool is_play)
{}

static int rz_ssi_dma_transfer(struct rz_ssi_priv *ssi,
			       struct rz_ssi_stream *strm)
{}

static void rz_ssi_dma_complete(void *data)
{}

static void rz_ssi_release_dma_channels(struct rz_ssi_priv *ssi)
{}

static int rz_ssi_dma_request(struct rz_ssi_priv *ssi, struct device *dev)
{}

static int rz_ssi_dai_trigger(struct snd_pcm_substream *substream, int cmd,
			      struct snd_soc_dai *dai)
{}

static int rz_ssi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *params,
				struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops rz_ssi_dai_ops =;

static const struct snd_pcm_hardware rz_ssi_pcm_hardware =;

static int rz_ssi_pcm_open(struct snd_soc_component *component,
			   struct snd_pcm_substream *substream)
{}

static snd_pcm_uframes_t rz_ssi_pcm_pointer(struct snd_soc_component *component,
					    struct snd_pcm_substream *substream)
{}

static int rz_ssi_pcm_new(struct snd_soc_component *component,
			  struct snd_soc_pcm_runtime *rtd)
{}

static struct snd_soc_dai_driver rz_ssi_soc_dai[] =;

static const struct snd_soc_component_driver rz_ssi_soc_component =;

static int rz_ssi_probe(struct platform_device *pdev)
{}

static void rz_ssi_remove(struct platform_device *pdev)
{}

static const struct of_device_id rz_ssi_of_match[] =;
MODULE_DEVICE_TABLE(of, rz_ssi_of_match);

static struct platform_driver rz_ssi_driver =;

module_platform_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_AUTHOR();