linux/sound/soc/sh/rcar/ssi.c

// SPDX-License-Identifier: GPL-2.0
//
// Renesas R-Car SSIU/SSI support
//
// Copyright (C) 2013 Renesas Solutions Corp.
// Kuninori Morimoto <[email protected]>
//
// Based on fsi.c
// Kuninori Morimoto <[email protected]>

/*
 * you can enable below define if you don't need
 * SSI interrupt status debug message when debugging
 * see rsnd_print_irq_status()
 *
 * #define RSND_DEBUG_NO_IRQ_STATUS 1
 */

#include <sound/simple_card_utils.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/delay.h>
#include "rsnd.h"
#define RSND_SSI_NAME_SIZE

/*
 * SSICR
 */
#define FORCE
#define DMEN
#define UIEN
#define OIEN
#define IIEN
#define DIEN
#define CHNL_4
#define CHNL_6
#define CHNL_8
#define DWL_MASK
#define DWL_8
#define DWL_16
#define DWL_18
#define DWL_20
#define DWL_22
#define DWL_24
#define DWL_32

/*
 * System word length
 */
#define SWL_16
#define SWL_24
#define SWL_32

#define SCKD
#define SWSD
#define SCKP
#define SWSP
#define SDTA
#define PDTA
#define DEL
#define CKDV(v)
#define TRMD
#define EN

/*
 * SSISR
 */
#define UIRQ
#define OIRQ
#define IIRQ
#define DIRQ

/*
 * SSIWSR
 */
#define CONT
#define WS_MODE

#define SSI_NAME

struct rsnd_ssi {};

/* flags */
#define RSND_SSI_CLK_PIN_SHARE
#define RSND_SSI_NO_BUSIF
#define RSND_SSI_PROBED

#define for_each_rsnd_ssi(pos, priv, i)

#define rsnd_ssi_get(priv, id)
#define rsnd_ssi_nr(priv)
#define rsnd_mod_to_ssi(_mod)
#define rsnd_ssi_is_parent(ssi, io)
#define rsnd_ssi_is_multi_secondary(mod, io)
#define rsnd_ssi_is_run_mods(mod, io)
#define rsnd_ssi_can_output_clk(mod)

int rsnd_ssi_use_busif(struct rsnd_dai_stream *io)
{}

static void rsnd_ssi_status_clear(struct rsnd_mod *mod)
{}

static u32 rsnd_ssi_status_get(struct rsnd_mod *mod)
{}

static void rsnd_ssi_status_check(struct rsnd_mod *mod,
				  u32 bit)
{}

static u32 rsnd_ssi_multi_secondaries(struct rsnd_dai_stream *io)
{}

static u32 rsnd_ssi_run_mods(struct rsnd_dai_stream *io)
{}

u32 rsnd_ssi_multi_secondaries_runtime(struct rsnd_dai_stream *io)
{}

static u32 rsnd_rdai_width_to_swl(struct rsnd_dai *rdai)
{}

unsigned int rsnd_ssi_clk_query(struct rsnd_dai *rdai,
		       int param1, int param2, int *idx)
{}

static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
				     struct rsnd_dai_stream *io)
{}

static void rsnd_ssi_master_clk_stop(struct rsnd_mod *mod,
				     struct rsnd_dai_stream *io)
{}

static void rsnd_ssi_config_init(struct rsnd_mod *mod,
				struct rsnd_dai_stream *io)
{}

static void rsnd_ssi_register_setup(struct rsnd_mod *mod)
{}

/*
 *	SSI mod common functions
 */
static int rsnd_ssi_init(struct rsnd_mod *mod,
			 struct rsnd_dai_stream *io,
			 struct rsnd_priv *priv)
{}

static int rsnd_ssi_quit(struct rsnd_mod *mod,
			 struct rsnd_dai_stream *io,
			 struct rsnd_priv *priv)
{}

static int rsnd_ssi_hw_params(struct rsnd_mod *mod,
			      struct rsnd_dai_stream *io,
			      struct snd_pcm_substream *substream,
			      struct snd_pcm_hw_params *params)
{}

static int rsnd_ssi_start(struct rsnd_mod *mod,
			  struct rsnd_dai_stream *io,
			  struct rsnd_priv *priv)
{}

static int rsnd_ssi_stop(struct rsnd_mod *mod,
			 struct rsnd_dai_stream *io,
			 struct rsnd_priv *priv)
{}

static int rsnd_ssi_irq(struct rsnd_mod *mod,
			struct rsnd_dai_stream *io,
			struct rsnd_priv *priv,
			int enable)
{}

static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
				   struct rsnd_dai_stream *io);
static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
				 struct rsnd_dai_stream *io)
{}

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

static u32 *rsnd_ssi_get_status(struct rsnd_mod *mod,
				struct rsnd_dai_stream *io,
				enum rsnd_mod_type type)
{}

/*
 *		SSI PIO
 */
static void rsnd_ssi_parent_attach(struct rsnd_mod *mod,
				   struct rsnd_dai_stream *io)
{}

static int rsnd_ssi_pcm_new(struct rsnd_mod *mod,
			    struct rsnd_dai_stream *io,
			    struct snd_soc_pcm_runtime *rtd)
{}

static int rsnd_ssi_common_probe(struct rsnd_mod *mod,
				 struct rsnd_dai_stream *io,
				 struct rsnd_priv *priv)
{}

static int rsnd_ssi_common_remove(struct rsnd_mod *mod,
				  struct rsnd_dai_stream *io,
				  struct rsnd_priv *priv)
{}

/*
 *	SSI PIO functions
 */
static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
				   struct rsnd_dai_stream *io)
{}

static int rsnd_ssi_pio_init(struct rsnd_mod *mod,
			     struct rsnd_dai_stream *io,
			     struct rsnd_priv *priv)
{}

static int rsnd_ssi_pio_pointer(struct rsnd_mod *mod,
			    struct rsnd_dai_stream *io,
			    snd_pcm_uframes_t *pointer)
{}

static struct rsnd_mod_ops rsnd_ssi_pio_ops =;

static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
			      struct rsnd_dai_stream *io,
			      struct rsnd_priv *priv)
{}

static int rsnd_ssi_fallback(struct rsnd_mod *mod,
			     struct rsnd_dai_stream *io,
			     struct rsnd_priv *priv)
{}

static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io,
					 struct rsnd_mod *mod)
{}

#ifdef CONFIG_DEBUG_FS
static void rsnd_ssi_debug_info(struct seq_file *m,
				struct rsnd_dai_stream *io,
				struct rsnd_mod *mod)
{}
#define DEBUG_INFO
#else
#define DEBUG_INFO
#endif

static struct rsnd_mod_ops rsnd_ssi_dma_ops =;

int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod)
{}

/*
 *		ssi mod function
 */
static void rsnd_ssi_connect(struct rsnd_mod *mod,
			     struct rsnd_dai_stream *io)
{}

void rsnd_parse_connect_ssi(struct rsnd_dai *rdai,
			    struct device_node *playback,
			    struct device_node *capture)
{}

struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id)
{}

int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
{}

int rsnd_ssi_probe(struct rsnd_priv *priv)
{}

void rsnd_ssi_remove(struct rsnd_priv *priv)
{}