linux/sound/soc/meson/axg-spdifout.c

// SPDX-License-Identifier: (GPL-2.0 OR MIT)
//
// Copyright (c) 2018 BayLibre, SAS.
// Author: Jerome Brunet <[email protected]>

#include <linux/clk.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/regmap.h>
#include <sound/soc.h>
#include <sound/soc-dai.h>
#include <sound/pcm_params.h>
#include <sound/pcm_iec958.h>

/*
 * NOTE:
 * The meaning of bits SPDIFOUT_CTRL0_XXX_SEL is actually the opposite
 * of what the documentation says. Manual control on V, U and C bits is
 * applied when the related sel bits are cleared
 */

#define SPDIFOUT_STAT
#define SPDIFOUT_GAIN0
#define SPDIFOUT_GAIN1
#define SPDIFOUT_CTRL0
#define SPDIFOUT_CTRL0_EN
#define SPDIFOUT_CTRL0_RST_OUT
#define SPDIFOUT_CTRL0_RST_IN
#define SPDIFOUT_CTRL0_USEL
#define SPDIFOUT_CTRL0_USET
#define SPDIFOUT_CTRL0_CHSTS_SEL
#define SPDIFOUT_CTRL0_DATA_SEL
#define SPDIFOUT_CTRL0_MSB_FIRST
#define SPDIFOUT_CTRL0_VSEL
#define SPDIFOUT_CTRL0_VSET
#define SPDIFOUT_CTRL0_MASK_MASK
#define SPDIFOUT_CTRL0_MASK(x)
#define SPDIFOUT_CTRL1
#define SPDIFOUT_CTRL1_MSB_POS_MASK
#define SPDIFOUT_CTRL1_MSB_POS(x)
#define SPDIFOUT_CTRL1_TYPE_MASK
#define SPDIFOUT_CTRL1_TYPE(x)
#define SPDIFOUT_PREAMB
#define SPDIFOUT_SWAP
#define SPDIFOUT_CHSTS0
#define SPDIFOUT_CHSTS1
#define SPDIFOUT_CHSTS2
#define SPDIFOUT_CHSTS3
#define SPDIFOUT_CHSTS4
#define SPDIFOUT_CHSTS5
#define SPDIFOUT_CHSTS6
#define SPDIFOUT_CHSTS7
#define SPDIFOUT_CHSTS8
#define SPDIFOUT_CHSTS9
#define SPDIFOUT_CHSTSA
#define SPDIFOUT_CHSTSB
#define SPDIFOUT_MUTE_VAL

struct axg_spdifout {};

static void axg_spdifout_enable(struct regmap *map)
{}

static void axg_spdifout_disable(struct regmap *map)
{}

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

static int axg_spdifout_mute(struct snd_soc_dai *dai, int mute, int direction)
{}

static int axg_spdifout_sample_fmt(struct snd_pcm_hw_params *params,
				   struct snd_soc_dai *dai)
{}

static int axg_spdifout_set_chsts(struct snd_pcm_hw_params *params,
				  struct snd_soc_dai *dai)
{}

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

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

static void axg_spdifout_shutdown(struct snd_pcm_substream *substream,
				  struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops axg_spdifout_ops =;

static struct snd_soc_dai_driver axg_spdifout_dai_drv[] =;

static const char * const spdifout_sel_texts[] =;

static SOC_ENUM_SINGLE_DECL(axg_spdifout_sel_enum, SPDIFOUT_CTRL1, 24,
			    spdifout_sel_texts);

static const struct snd_kcontrol_new axg_spdifout_in_mux =;

static const struct snd_soc_dapm_widget axg_spdifout_dapm_widgets[] =;

static const struct snd_soc_dapm_route axg_spdifout_dapm_routes[] =;

static const struct snd_kcontrol_new axg_spdifout_controls[] =;

static int axg_spdifout_set_bias_level(struct snd_soc_component *component,
				       enum snd_soc_bias_level level)
{}

static const struct snd_soc_component_driver axg_spdifout_component_drv =;

static const struct regmap_config axg_spdifout_regmap_cfg =;

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

static int axg_spdifout_probe(struct platform_device *pdev)
{}

static struct platform_driver axg_spdifout_pdrv =;
module_platform_driver();

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