#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <sound/initval.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
#include "ak4458.h"
#define AK4458_NUM_SUPPLIES …
static const char *ak4458_supply_names[AK4458_NUM_SUPPLIES] = …;
enum ak4458_type { … };
struct ak4458_drvdata { … };
struct ak4458_priv { … };
static const struct reg_default ak4458_reg_defaults[] = …;
static DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
static const char * const ak4458_dem_select_texts[] = …;
static const char * const ak4458_digfil_select_texts[] = …;
static const char * const ak4458_dzfb_select_texts[] = …;
static const char * const ak4458_sc_select_texts[] = …;
static const char * const ak4458_fir_select_texts[] = …;
static const char * const ak4458_ats_select_texts[] = …;
static const char * const ak4458_dif_select_texts[] = …;
static const struct soc_enum ak4458_dac1_dem_enum = …;
static const struct soc_enum ak4458_dac2_dem_enum = …;
static const struct soc_enum ak4458_dac3_dem_enum = …;
static const struct soc_enum ak4458_dac4_dem_enum = …;
static const struct soc_enum ak4458_digfil_enum = …;
static const struct soc_enum ak4458_dzfb_enum = …;
static const struct soc_enum ak4458_sm_enum = …;
static const struct soc_enum ak4458_fir_enum = …;
static const struct soc_enum ak4458_ats_enum = …;
static const struct soc_enum ak4458_dif_enum = …;
static int get_digfil(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int set_digfil(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new ak4458_snd_controls[] = …;
static const struct snd_soc_dapm_widget ak4458_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ak4458_intercon[] = …;
static const struct snd_kcontrol_new ak4497_snd_controls[] = …;
static const struct snd_soc_dapm_widget ak4497_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ak4497_intercon[] = …;
static int ak4458_get_tdm_mode(struct ak4458_priv *ak4458)
{ … }
static int ak4458_rstn_control(struct snd_soc_component *component, int bit)
{ … }
static int ak4458_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int ak4458_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static const int att_speed[] = …;
static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int ak4458_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int slot_width)
{ … }
#define AK4458_FORMATS …
static const unsigned int ak4458_rates[] = …;
static const struct snd_pcm_hw_constraint_list ak4458_rate_constraints = …;
static int ak4458_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops ak4458_dai_ops = …;
static struct snd_soc_dai_driver ak4458_dai = …;
static struct snd_soc_dai_driver ak4497_dai = …;
static void ak4458_reset(struct ak4458_priv *ak4458, bool active)
{ … }
#ifdef CONFIG_PM
static int __maybe_unused ak4458_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused ak4458_runtime_resume(struct device *dev)
{ … }
#endif
static const struct snd_soc_component_driver soc_codec_dev_ak4458 = …;
static const struct snd_soc_component_driver soc_codec_dev_ak4497 = …;
static const struct regmap_config ak4458_regmap = …;
static const struct ak4458_drvdata ak4458_drvdata = …;
static const struct ak4458_drvdata ak4497_drvdata = …;
static const struct dev_pm_ops ak4458_pm = …;
static int ak4458_i2c_probe(struct i2c_client *i2c)
{ … }
static void ak4458_i2c_remove(struct i2c_client *i2c)
{ … }
static const struct of_device_id ak4458_of_match[] = …;
MODULE_DEVICE_TABLE(of, ak4458_of_match);
static struct i2c_driver ak4458_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;