#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/gpio/consumer.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <dt-bindings/sound/cs42l42.h>
#include "cs42l42.h"
#include "cirrus_legacy.h"
static const char * const cs42l42_supply_names[] = …;
static const struct reg_default cs42l42_reg_defaults[] = …;
bool cs42l42_readable_register(struct device *dev, unsigned int reg)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
bool cs42l42_volatile_register(struct device *dev, unsigned int reg)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
const struct regmap_range_cfg cs42l42_page_range = …;
EXPORT_SYMBOL_NS_GPL(…);
const struct regmap_config cs42l42_regmap = …;
EXPORT_SYMBOL_NS_GPL(…);
static DECLARE_TLV_DB_SCALE(adc_tlv, -9700, 100, true);
static DECLARE_TLV_DB_SCALE(mixer_tlv, -6300, 100, true);
static int cs42l42_slow_start_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const char * const cs42l42_hpf_freq_text[] = …;
static SOC_ENUM_SINGLE_DECL(cs42l42_hpf_freq_enum, CS42L42_ADC_WNF_HPF_CTL,
CS42L42_ADC_HPF_CF_SHIFT,
cs42l42_hpf_freq_text);
static const char * const cs42l42_wnf3_freq_text[] = …;
static SOC_ENUM_SINGLE_DECL(cs42l42_wnf3_freq_enum, CS42L42_ADC_WNF_HPF_CTL,
CS42L42_ADC_WNF_CF_SHIFT,
cs42l42_wnf3_freq_text);
static const struct snd_kcontrol_new cs42l42_snd_controls[] = …;
static int cs42l42_hp_adc_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget cs42l42_dapm_widgets[] = …;
static const struct snd_soc_dapm_route cs42l42_audio_map[] = …;
static int cs42l42_set_jack(struct snd_soc_component *component, struct snd_soc_jack *jk, void *d)
{ … }
const struct snd_soc_component_driver cs42l42_soc_component = …;
EXPORT_SYMBOL_NS_GPL(…);
static const struct reg_sequence cs42l42_to_sclk_seq[] = …;
static const struct reg_sequence cs42l42_to_osc_seq[] = …;
struct cs42l42_pll_params { … };
static const struct cs42l42_pll_params pll_ratio_table[] = …;
int cs42l42_pll_config(struct snd_soc_component *component, unsigned int clk,
unsigned int sample_rate)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void cs42l42_src_config(struct snd_soc_component *component, unsigned int sample_rate)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int cs42l42_asp_config(struct snd_soc_component *component,
unsigned int sclk, unsigned int sample_rate)
{ … }
static int cs42l42_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{ … }
static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
static int cs42l42_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int cs42l42_set_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int cs42l42_set_bclk_ratio(struct snd_soc_dai *dai,
unsigned int bclk_ratio)
{ … }
int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
#define CS42L42_FORMATS …
static const struct snd_soc_dai_ops cs42l42_ops = …;
struct snd_soc_dai_driver cs42l42_dai = …;
EXPORT_SYMBOL_NS_GPL(…);
static void cs42l42_manual_hs_type_detect(struct cs42l42_private *cs42l42)
{ … }
static void cs42l42_process_hs_type_detect(struct cs42l42_private *cs42l42)
{ … }
static void cs42l42_init_hs_type_detect(struct cs42l42_private *cs42l42)
{ … }
static void cs42l42_cancel_hs_type_detect(struct cs42l42_private *cs42l42)
{ … }
static int cs42l42_handle_button_press(struct cs42l42_private *cs42l42)
{ … }
struct cs42l42_irq_params { … };
static const struct cs42l42_irq_params irq_params_table[] = …;
irqreturn_t cs42l42_irq_thread(int irq, void *data)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static void cs42l42_set_interrupt_masks(struct cs42l42_private *cs42l42)
{ … }
static void cs42l42_setup_hs_type_detect(struct cs42l42_private *cs42l42)
{ … }
static const unsigned int threshold_defaults[] = …;
static int cs42l42_handle_device_data(struct device *dev,
struct cs42l42_private *cs42l42)
{ … }
static const struct reg_sequence __maybe_unused cs42l42_shutdown_seq[] = …;
int cs42l42_suspend(struct device *dev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int cs42l42_resume(struct device *dev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void cs42l42_resume_restore(struct device *dev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int __maybe_unused cs42l42_i2c_resume(struct device *dev)
{ … }
int cs42l42_common_probe(struct cs42l42_private *cs42l42,
const struct snd_soc_component_driver *component_drv,
struct snd_soc_dai_driver *dai)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int cs42l42_init(struct cs42l42_private *cs42l42)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void cs42l42_common_remove(struct cs42l42_private *cs42l42)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;