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

// SPDX-License-Identifier: GPL-2.0
//
// mix.c
//
// Copyright (c) 2015 Kuninori Morimoto <[email protected]>

/*
 *		    CTUn	MIXn
 *		    +------+	+------+
 * [SRC3 / SRC6] -> |CTU n0| ->	[MIX n0| ->
 * [SRC4 / SRC9] -> |CTU n1| ->	[MIX n1| ->
 * [SRC0 / SRC1] -> |CTU n2| ->	[MIX n2| ->
 * [SRC2 / SRC5] -> |CTU n3| ->	[MIX n3| ->
 *		    +------+	+------+
 *
 * ex)
 *	DAI0 : playback = <&src0 &ctu02 &mix0 &dvc0 &ssi0>;
 *	DAI1 : playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
 *
 * MIX Volume
 *	amixer set "MIX",0  100%  // DAI0 Volume
 *	amixer set "MIX",1  100%  // DAI1 Volume
 *
 * Volume Ramp
 *	amixer set "MIX Ramp Up Rate"   "0.125 dB/1 step"
 *	amixer set "MIX Ramp Down Rate" "4 dB/1 step"
 *	amixer set "MIX Ramp" on
 *	aplay xxx.wav &
 *	amixer set "MIX",0  80%  // DAI0 Volume Down
 *	amixer set "MIX",1 100%  // DAI1 Volume Up
 */

#include "rsnd.h"

#define MIX_NAME_SIZE
#define MIX_NAME

struct rsnd_mix {};

#define ONCE_KCTRL_INITIALIZED
#define HAS_VOLA
#define HAS_VOLB
#define HAS_VOLC
#define HAS_VOLD

#define VOL_MAX

#define rsnd_mod_to_mix(_mod)

#define rsnd_mix_get(priv, id)
#define rsnd_mix_nr(priv)
#define for_each_rsnd_mix(pos, priv, i)

static void rsnd_mix_activation(struct rsnd_mod *mod)
{}

static void rsnd_mix_halt(struct rsnd_mod *mod)
{}

#define rsnd_mix_get_vol(mix, X)
static void rsnd_mix_volume_parameter(struct rsnd_dai_stream *io,
				      struct rsnd_mod *mod)
{}

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

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

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

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

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

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

#ifdef CONFIG_DEBUG_FS
static void rsnd_mix_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_mix_ops =;

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

int rsnd_mix_probe(struct rsnd_priv *priv)
{}

void rsnd_mix_remove(struct rsnd_priv *priv)
{}