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

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

/*
 * You can use Synchronous Sampling Rate Convert (if no DVC)
 *
 *	amixer set "SRC Out Rate" on
 *	aplay xxx.wav &
 *	amixer set "SRC Out Rate" 96000 // convert rate to 96000Hz
 *	amixer set "SRC Out Rate" 22050 // convert rate to 22050Hz
 */

/*
 * 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 <linux/of_irq.h>
#include "rsnd.h"

#define SRC_NAME

/* SCU_SYSTEM_STATUS0/1 */
#define OUF_SRC(id)

struct rsnd_src {};

#define RSND_SRC_NAME_SIZE

#define rsnd_src_get(priv, id)
#define rsnd_src_nr(priv)
#define rsnd_src_sync_is_enabled(mod)

#define rsnd_mod_to_src(_mod)

#define for_each_rsnd_src(pos, priv, i)


/*
 *		image of SRC (Sampling Rate Converter)
 *
 * 96kHz   <-> +-----+	48kHz	+-----+	 48kHz	+-------+
 * 48kHz   <-> | SRC | <------>	| SSI |	<----->	| codec |
 * 44.1kHz <-> +-----+		+-----+		+-------+
 * ...
 *
 */

static void rsnd_src_activation(struct rsnd_mod *mod)
{}

static void rsnd_src_halt(struct rsnd_mod *mod)
{}

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

static u32 rsnd_src_convert_rate(struct rsnd_dai_stream *io,
				 struct rsnd_mod *mod)
{}

unsigned int rsnd_src_get_rate(struct rsnd_priv *priv,
			       struct rsnd_dai_stream *io,
			       int is_in)
{}

static const u32 bsdsr_table_pattern1[] =;

static const u32 bsdsr_table_pattern2[] =;

static const u32 bsisr_table[] =;

static const u32 chan288888[] =;

static const u32 chan244888[] =;

static const u32 chan222222[] =;

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

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

static void rsnd_src_status_clear(struct rsnd_mod *mod)
{}

static bool rsnd_src_error_occurred(struct rsnd_mod *mod)
{}

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

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

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

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

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

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

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

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

#ifdef CONFIG_DEBUG_FS
static void rsnd_src_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_src_ops =;

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

int rsnd_src_probe(struct rsnd_priv *priv)
{}

void rsnd_src_remove(struct rsnd_priv *priv)
{}