linux/sound/soc/codecs/sti-sas.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) STMicroelectronics SA 2015
 * Authors: Arnaud Pouliquen <[email protected]>
 *          for STMicroelectronics.
 */

#include <linux/io.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/mfd/syscon.h>

#include <sound/soc.h>
#include <sound/soc-dapm.h>

/* DAC definitions */

/* stih407 DAC registers */
/* sysconf 5041: Audio-Gue-Control */
#define STIH407_AUDIO_GLUE_CTRL
/* sysconf 5042: Audio-DAC-Control */
#define STIH407_AUDIO_DAC_CTRL

/* DAC definitions */
#define STIH407_DAC_SOFTMUTE
#define STIH407_DAC_STANDBY_ANA
#define STIH407_DAC_STANDBY

#define STIH407_DAC_SOFTMUTE_MASK
#define STIH407_DAC_STANDBY_ANA_MASK
#define STIH407_DAC_STANDBY_MASK

/* SPDIF definitions */
#define SPDIF_BIPHASE_ENABLE
#define SPDIF_BIPHASE_IDLE

#define SPDIF_BIPHASE_ENABLE_MASK
#define SPDIF_BIPHASE_IDLE_MASK

enum {};

static const struct reg_default stih407_sas_reg_defaults[] =;

struct sti_dac_audio {};

struct sti_spdif_audio {};

/* device data structure */
struct sti_sas_dev_data {};

/* driver data structure */
struct sti_sas_data {};

/* Read a register from the sysconf reg bank */
static int sti_sas_read_reg(void *context, unsigned int reg,
			    unsigned int *value)
{}

/* Read a register from the sysconf reg bank */
static int sti_sas_write_reg(void *context, unsigned int reg,
			     unsigned int value)
{}

static int  sti_sas_init_sas_registers(struct snd_soc_component *component,
				       struct sti_sas_data *data)
{}

/*
 * DAC
 */
static int sti_sas_dac_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] =;

static const struct snd_soc_dapm_route stih407_sas_route[] =;


static int stih407_sas_dac_mute(struct snd_soc_dai *dai, int mute, int stream)
{}

/*
 * SPDIF
 */
static int sti_sas_spdif_set_fmt(struct snd_soc_dai *dai,
				 unsigned int fmt)
{}

/*
 * sti_sas_spdif_trigger:
 * Trigger function is used to ensure that BiPhase Formater is disabled
 * before CPU dai is stopped.
 * This is mandatory to avoid that BPF is stalled
 */
static int sti_sas_spdif_trigger(struct snd_pcm_substream *substream, int cmd,
				 struct snd_soc_dai *dai)
{}

static bool sti_sas_volatile_register(struct device *dev, unsigned int reg)
{}

/*
 * CODEC DAIS
 */

/*
 * sti_sas_set_sysclk:
 * get MCLK input frequency to check that MCLK-FS ratio is coherent
 */
static int sti_sas_set_sysclk(struct snd_soc_dai *dai, int clk_id,
			      unsigned int freq, int dir)
{}

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

static const struct snd_soc_dai_ops stih407_dac_ops =;

static const struct regmap_config stih407_sas_regmap =;

static const struct sti_sas_dev_data stih407_data =;

static struct snd_soc_dai_driver sti_sas_dai[] =;

#ifdef CONFIG_PM_SLEEP
static int sti_sas_resume(struct snd_soc_component *component)
{}
#else
#define sti_sas_resume
#endif

static int sti_sas_component_probe(struct snd_soc_component *component)
{}

static struct snd_soc_component_driver sti_sas_driver =;

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

static int sti_sas_driver_probe(struct platform_device *pdev)
{}

static struct platform_driver sti_sas_platform_driver =;

module_platform_driver();

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