#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/regmap.h>
#include "mt8188-afe-clk.h"
#include "mt8188-afe-common.h"
#include "mt8188-reg.h"
#include "../common/mtk-dai-adda-common.h"
#define ADDA_HIRES_THRES …
enum { … };
struct mtk_dai_adda_priv { … };
static int mt8188_adda_mtkaif_init(struct mtk_base_afe *afe)
{ … }
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 void mtk_adda_ul_mictype(struct mtk_base_afe *afe, bool dmic)
{ … }
static int mtk_adda_ul_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
static struct mtk_dai_adda_priv *get_adda_priv_by_name(struct mtk_base_afe *afe,
const char *name)
{ … }
static int mtk_afe_adda_hires_connect(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static const struct snd_kcontrol_new mtk_dai_adda_o176_mix[] = …;
static const struct snd_kcontrol_new mtk_dai_adda_o177_mix[] = …;
static const char * const adda_dlgain_mux_map[] = …;
static SOC_ENUM_SINGLE_DECL(adda_dlgain_mux_map_enum,
SND_SOC_NOPM, 0,
adda_dlgain_mux_map);
static const struct snd_kcontrol_new adda_dlgain_mux_control = …;
static const struct snd_soc_dapm_widget mtk_dai_adda_widgets[] = …;
static const struct snd_soc_dapm_route mtk_dai_adda_routes[] = …;
static int mt8188_adda_dmic_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int mt8188_adda_dmic_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new mtk_dai_adda_controls[] = …;
static int mtk_dai_da_configure(struct mtk_base_afe *afe,
unsigned int rate, int id)
{ … }
static int mtk_dai_ad_configure(struct mtk_base_afe *afe,
unsigned int rate, int id)
{ … }
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[] = …;
static int init_adda_priv_data(struct mtk_base_afe *afe)
{ … }
int mt8188_dai_adda_register(struct mtk_base_afe *afe)
{ … }