#include <linux/regmap.h>
#include "mt8186-afe-common.h"
#include "mt8186-interconnection.h"
struct mtk_afe_src_priv { … };
static const unsigned int src_iir_coeff_32_to_16[] = …;
static const unsigned int src_iir_coeff_44_to_16[] = …;
static const unsigned int src_iir_coeff_44_to_32[] = …;
static const unsigned int src_iir_coeff_48_to_16[] = …;
static const unsigned int src_iir_coeff_48_to_32[] = …;
static const unsigned int src_iir_coeff_48_to_44[] = …;
static const unsigned int src_iir_coeff_96_to_16[] = …;
static const unsigned int src_iir_coeff_96_to_44[] = …;
static unsigned int mtk_get_src_freq_mode(struct mtk_base_afe *afe, int rate)
{ … }
static const unsigned int *get_iir_coeff(unsigned int rate_in,
unsigned int rate_out,
unsigned int *param_num)
{ … }
static int mtk_set_src_1_param(struct mtk_base_afe *afe, int id)
{ … }
static int mtk_set_src_2_param(struct mtk_base_afe *afe, int id)
{ … }
#define HW_SRC_1_EN_W_NAME …
#define HW_SRC_2_EN_W_NAME …
static int mtk_hw_src_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event)
{ … }
static const struct snd_kcontrol_new mtk_hw_src_1_in_ch1_mix[] = …;
static const struct snd_kcontrol_new mtk_hw_src_1_in_ch2_mix[] = …;
static const struct snd_kcontrol_new mtk_hw_src_2_in_ch1_mix[] = …;
static const struct snd_kcontrol_new mtk_hw_src_2_in_ch2_mix[] = …;
static const struct snd_soc_dapm_widget mtk_dai_src_widgets[] = …;
static int mtk_afe_src_en_connect(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static const struct snd_soc_dapm_route mtk_dai_src_routes[] = …;
static int mtk_dai_src_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int mtk_dai_src_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops mtk_dai_src_ops = …;
#define MTK_SRC_RATES …
#define MTK_SRC_FORMATS …
static struct snd_soc_dai_driver mtk_dai_src_driver[] = …;
int mt8186_dai_src_register(struct mtk_base_afe *afe)
{ … }