linux/sound/soc/codecs/cs35l45.c

// SPDX-License-Identifier: GPL-2.0
//
// cs35l45.c - CS35L45 ALSA SoC audio driver
//
// Copyright 2019-2022 Cirrus Logic, Inc.
//
// Author: James Schulman <[email protected]>

#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/firmware.h>
#include <linux/regulator/consumer.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>

#include "cs35l45.h"

static bool cs35l45_check_cspl_mbox_sts(const enum cs35l45_cspl_mboxcmd cmd,
					enum cs35l45_cspl_mboxstate sts)
{}

static int cs35l45_set_cspl_mbox_cmd(struct cs35l45_private *cs35l45,
				      struct regmap *regmap,
				      const enum cs35l45_cspl_mboxcmd cmd)
{}

static int cs35l45_global_en_ev(struct snd_soc_dapm_widget *w,
				struct snd_kcontrol *kcontrol, int event)
{}

static int cs35l45_dsp_preload_ev(struct snd_soc_dapm_widget *w,
				  struct snd_kcontrol *kcontrol, int event)
{}

static int cs35l45_dsp_audio_ev(struct snd_soc_dapm_widget *w,
				struct snd_kcontrol *kcontrol, int event)
{}

static int cs35l45_activate_ctl(struct snd_soc_component *component,
				const char *ctl_name, bool active)
{}

static int cs35l45_amplifier_mode_get(struct snd_kcontrol *kcontrol,
				      struct snd_ctl_elem_value *ucontrol)
{}

static int cs35l45_amplifier_mode_put(struct snd_kcontrol *kcontrol,
				      struct snd_ctl_elem_value *ucontrol)
{}

static const char * const cs35l45_asp_tx_txt[] =;

static const unsigned int cs35l45_asp_tx_val[] =;

static const struct soc_enum cs35l45_asp_tx_enums[] =;

static const char * const cs35l45_dsp_rx_txt[] =;

static const unsigned int cs35l45_dsp_rx_val[] =;

static const struct soc_enum cs35l45_dsp_rx_enums[] =;

static const char * const cs35l45_dac_txt[] =;

static const unsigned int cs35l45_dac_val[] =;

static const struct soc_enum cs35l45_dacpcm_enums[] =;

static const struct snd_kcontrol_new cs35l45_asp_muxes[] =;

static const struct snd_kcontrol_new cs35l45_dsp_muxes[] =;

static const struct snd_kcontrol_new cs35l45_dac_muxes[] =;
static const struct snd_kcontrol_new amp_en_ctl =;

static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] =;

#define CS35L45_ASP_MUX_ROUTE(name)

#define CS35L45_DSP_MUX_ROUTE(name)

#define CS35L45_DAC_MUX_ROUTE(name)

static const struct snd_soc_dapm_route cs35l45_dapm_routes[] =;

static const char * const amplifier_mode_texts[] =;
static SOC_ENUM_SINGLE_DECL(amplifier_mode_enum, SND_SOC_NOPM, 0,
			    amplifier_mode_texts);
static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 1000, 300, 0);
static const DECLARE_TLV_DB_SCALE(cs35l45_dig_pcm_vol_tlv, -10225, 25, true);

static const struct snd_kcontrol_new cs35l45_controls[] =;

static int cs35l45_set_pll(struct cs35l45_private *cs35l45, unsigned int freq)
{}

static int cs35l45_asp_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{}

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

static int cs35l45_asp_set_tdm_slot(struct snd_soc_dai *dai,
				    unsigned int tx_mask, unsigned int rx_mask,
				    int slots, int slot_width)
{}

static int cs35l45_asp_set_sysclk(struct snd_soc_dai *dai,
				  int clk_id, unsigned int freq, int dir)
{}

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

static const struct snd_soc_dai_ops cs35l45_asp_dai_ops =;

static struct snd_soc_dai_driver cs35l45_dai[] =;

static int cs35l45_component_probe(struct snd_soc_component *component)
{}

static void cs35l45_component_remove(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver cs35l45_component =;

static void cs35l45_setup_hibernate(struct cs35l45_private *cs35l45)
{}

static int cs35l45_enter_hibernate(struct cs35l45_private *cs35l45)
{}

static int cs35l45_exit_hibernate(struct cs35l45_private *cs35l45)
{}

static int cs35l45_runtime_suspend(struct device *dev)
{}

static int cs35l45_runtime_resume(struct device *dev)
{}

static int cs35l45_sys_suspend(struct device *dev)
{}

static int cs35l45_sys_suspend_noirq(struct device *dev)
{}

static int cs35l45_sys_resume_noirq(struct device *dev)
{}

static int cs35l45_sys_resume(struct device *dev)
{}

static int cs35l45_apply_property_config(struct cs35l45_private *cs35l45)
{}

static int cs35l45_dsp_virt2_mbox3_irq_handle(struct cs35l45_private *cs35l45,
					      const unsigned int cmd,
					      unsigned int data)
{}

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

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

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

static irqreturn_t cs35l45_spk_safe_err(int irq, void *data);

static const struct cs35l45_irq cs35l45_irqs[] =;

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

static const struct regmap_irq cs35l45_reg_irqs[] =;

static const struct regmap_irq_chip cs35l45_regmap_irq_chip =;

static int cs35l45_initialize(struct cs35l45_private *cs35l45)
{}

static const struct reg_sequence cs35l45_fs_errata_patch[] =;

static const struct cs_dsp_region cs35l45_dsp1_regions[] =;

static int cs35l45_dsp_init(struct cs35l45_private *cs35l45)
{}

int cs35l45_probe(struct cs35l45_private *cs35l45)
{}
EXPORT_SYMBOL_NS_GPL();

void cs35l45_remove(struct cs35l45_private *cs35l45)
{}
EXPORT_SYMBOL_NS_GPL();

EXPORT_GPL_DEV_PM_OPS(cs35l45_pm_ops) =;

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