#include <linux/regmap.h>
#include <linux/delay.h>
#include "mt8186-afe-clk.h"
#include "mt8186-afe-common.h"
#include "mt8186-afe-gpio.h"
#include "mt8186-interconnection.h"
#include "../common/mtk-dai-adda-common.h"
enum { … };
enum { … };
enum { … };
#define SDM_AUTO_RESET_THRESHOLD …
struct mtk_afe_adda_priv { … };
static struct mtk_afe_adda_priv *get_adda_priv_by_name(struct mtk_base_afe *afe,
const char *name)
{ … }
static const struct snd_kcontrol_new mtk_adda_dl_ch1_mix[] = …;
static const struct snd_kcontrol_new mtk_adda_dl_ch2_mix[] = …;
enum { … };
static int mtk_adda_ul_src_dmic(struct mtk_base_afe *afe, int id)
{ … }
static int mtk_adda_ul_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
static int mtk_adda_pad_top_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
static int mtk_adda_mtkaif_cfg_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
static int mtk_adda_dl_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
static int mt8186_adda_dmic_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int mt8186_adda_dmic_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new mtk_adda_controls[] = …;
enum { … };
static const char * const adda_ul_mux_map[] = …;
static int adda_ul_map_value[] = …;
static SOC_VALUE_ENUM_SINGLE_DECL(adda_ul_mux_map_enum,
SND_SOC_NOPM,
0,
ADDA_UL_MUX_MASK,
adda_ul_mux_map,
adda_ul_map_value);
static const struct snd_kcontrol_new adda_ul_mux_control = …;
static const struct snd_soc_dapm_widget mtk_dai_adda_widgets[] = …;
#define HIRES_THRESHOLD …
static int mtk_afe_dac_hires_connect(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static int mtk_afe_adc_hires_connect(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static const struct snd_soc_dapm_route mtk_dai_adda_routes[] = …;
static int mtk_dai_adda_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops mtk_dai_adda_ops = …;
#define MTK_ADDA_PLAYBACK_RATES …
#define MTK_ADDA_CAPTURE_RATES …
#define MTK_ADDA_FORMATS …
static struct snd_soc_dai_driver mtk_dai_adda_driver[] = …;
int mt8186_dai_adda_register(struct mtk_base_afe *afe)
{ … }