mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
ASoC: tegra-alt: cleanup driver codec_probe
snd_soc_codec_driver probe() callback for most of the drivers appear to be redundant, as only some member initialization is done. The same can be done in platform_driver probe(). Hence codec_probe is removed from drivers except OPE driver, where peq and mbdrc initialization is done. Bug 200503387 Bug 200520821 Change-Id: Icd03df1d65d61388bf563468eb86bc134701479f Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2144216 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -102,13 +102,6 @@ static int tegra186_arad_runtime_resume(struct device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra186_arad_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra186_arad *arad = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra186_arad_get_lane_lock_status(
|
||||
struct tegra186_arad *arad, unsigned int lane_id)
|
||||
{
|
||||
@@ -548,7 +541,6 @@ void tegra186_arad_send_ratio(void)
|
||||
EXPORT_SYMBOL(tegra186_arad_send_ratio);
|
||||
|
||||
static struct snd_soc_codec_driver tegra186_arad_codec = {
|
||||
.probe = tegra186_arad_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra186_arad_widgets,
|
||||
|
||||
@@ -585,13 +585,6 @@ static int tegra186_asrc_req_arad_ratio(struct snd_soc_dapm_widget *w,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tegra186_asrc_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra186_asrc *asrc = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra186_asrc_in_dai_ops = {
|
||||
.hw_params = tegra186_asrc_in_hw_params,
|
||||
};
|
||||
@@ -891,7 +884,6 @@ static const struct snd_kcontrol_new tegra186_asrc_controls[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra186_asrc_codec = {
|
||||
.probe = tegra186_asrc_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra186_asrc_widgets,
|
||||
|
||||
@@ -264,16 +264,6 @@ static int tegra186_dspk_hw_params(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tegra186_dspk_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra186_dspk *dspk = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
dspk->rx_fifo_th = 0;
|
||||
dspk->osr_val = TEGRA186_DSPK_OSR_64;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra186_dspk_dai_ops = {
|
||||
.hw_params = tegra186_dspk_hw_params,
|
||||
.set_bclk_ratio = tegra186_dspk_set_dai_bclk_ratio,
|
||||
@@ -373,7 +363,6 @@ static const struct snd_kcontrol_new tegrat186_dspk_controls[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra186_dspk_codec = {
|
||||
.probe = tegra186_dspk_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra186_dspk_widgets,
|
||||
@@ -487,6 +476,8 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
|
||||
dspk->is_shutdown = false;
|
||||
dspk->prod_name = NULL;
|
||||
dspk->rx_fifo_th = 0;
|
||||
dspk->osr_val = TEGRA186_DSPK_OSR_64;
|
||||
|
||||
if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) {
|
||||
dspk->clk_dspk = devm_clk_get(&pdev->dev, NULL);
|
||||
|
||||
@@ -1071,15 +1071,7 @@ static struct snd_kcontrol_new tegra186_admaif_controls[] = {
|
||||
tegra210_ape_dump_reg_get, tegra210_ape_dump_reg_put),
|
||||
};
|
||||
|
||||
static int tegra_admaif_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra_admaif *admaif = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_admaif_codec = {
|
||||
.probe = tegra_admaif_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra_admaif_widgets,
|
||||
@@ -1092,7 +1084,6 @@ static struct snd_soc_codec_driver tegra210_admaif_codec = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra186_admaif_codec = {
|
||||
.probe = tegra_admaif_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra_admaif_widgets,
|
||||
|
||||
@@ -4404,13 +4404,7 @@ static const struct snd_soc_component_driver tegra210_adsp_component = {
|
||||
.probe = tegra210_adsp_component_probe,
|
||||
};
|
||||
|
||||
static int tegra210_adsp_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_adsp_codec = {
|
||||
.probe = tegra210_adsp_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -521,13 +521,6 @@ static int tegra210_adx_put_out_channels(struct snd_kcontrol *kcontrol,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_adx_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_adx *adx = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_adx_in_dai_ops = {
|
||||
.hw_params = tegra210_adx_in_hw_params,
|
||||
.set_channel_map = tegra210_adx_set_channel_map,
|
||||
@@ -683,7 +676,6 @@ static struct snd_kcontrol_new tegra210_adx_controls[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_adx_codec = {
|
||||
.probe = tegra210_adx_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_adx_widgets,
|
||||
|
||||
@@ -59,6 +59,7 @@ static const struct reg_default tegra210_afc_reg_defaults[] = {
|
||||
|
||||
static void tegra210_afc_init(struct tegra210_afc *afc)
|
||||
{
|
||||
afc->is_shutdown = false;
|
||||
afc->ppm_diff = AFC_CLK_PPM_DIFF;
|
||||
afc->threshold_type = TH_DEFAULT;
|
||||
afc->src_burst = 0;
|
||||
@@ -364,15 +365,6 @@ static int tegra210_afc_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
}
|
||||
|
||||
static int tegra210_afc_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_afc *afc = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
tegra210_afc_init(afc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_afc_dai_ops = {
|
||||
.hw_params = tegra210_afc_hw_params,
|
||||
};
|
||||
@@ -415,7 +407,6 @@ static const struct snd_soc_dapm_route tegra210_afc_routes[] = {
|
||||
};
|
||||
|
||||
static const struct snd_soc_codec_driver tegra210_afc_codec = {
|
||||
.probe = tegra210_afc_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_afc_widgets,
|
||||
@@ -426,7 +417,6 @@ static const struct snd_soc_codec_driver tegra210_afc_codec = {
|
||||
};
|
||||
|
||||
static const struct snd_soc_codec_driver tegra186_afc_codec = {
|
||||
.probe = tegra210_afc_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_afc_widgets,
|
||||
@@ -544,7 +534,7 @@ static int tegra210_afc_platform_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
afc->soc_data = soc_data;
|
||||
afc->is_shutdown = false;
|
||||
tegra210_afc_init(afc);
|
||||
|
||||
dev_set_drvdata(&pdev->dev, afc);
|
||||
|
||||
|
||||
@@ -569,13 +569,6 @@ static int tegra210_amx_put_channels(struct snd_kcontrol *kcontrol,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_amx_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_amx *amx = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_amx_out_dai_ops = {
|
||||
.hw_params = tegra210_amx_out_hw_params,
|
||||
.set_channel_map = tegra210_amx_set_channel_map,
|
||||
@@ -730,7 +723,6 @@ static struct snd_kcontrol_new tegra210_amx_controls[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_amx_codec = {
|
||||
.probe = tegra210_amx_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_amx_widgets,
|
||||
|
||||
@@ -364,15 +364,6 @@ static int tegra210_dmic_put_control(struct snd_kcontrol *kcontrol,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_dmic_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_dmic *dmic = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
dmic->osr_val = TEGRA210_DMIC_OSR_64;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_dmic_dai_ops = {
|
||||
.hw_params = tegra210_dmic_hw_params,
|
||||
.set_bclk_ratio = tegra210_dmic_set_dai_bclk_ratio,
|
||||
@@ -485,7 +476,6 @@ static const struct snd_kcontrol_new tegra210_dmic_controls[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_dmic_codec = {
|
||||
.probe = tegra210_dmic_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_dmic_widgets,
|
||||
@@ -606,6 +596,7 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev)
|
||||
|
||||
dmic->is_shutdown = false;
|
||||
dmic->prod_name = NULL;
|
||||
dmic->osr_val = TEGRA210_DMIC_OSR_64;
|
||||
dev_set_drvdata(&pdev->dev, dmic);
|
||||
|
||||
if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) {
|
||||
|
||||
@@ -708,16 +708,6 @@ static int tegra210_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_i2s_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_i2s *i2s = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
/* default threshold settings */
|
||||
i2s->rx_fifo_th = 3;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_i2s_dai_ops = {
|
||||
.set_fmt = tegra210_i2s_set_fmt,
|
||||
.hw_params = tegra210_i2s_hw_params,
|
||||
@@ -911,7 +901,6 @@ static const struct snd_soc_dapm_route tegra210_i2s_routes[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_i2s_codec = {
|
||||
.probe = tegra210_i2s_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_i2s_widgets,
|
||||
@@ -1066,6 +1055,8 @@ static int tegra210_i2s_platform_probe(struct platform_device *pdev)
|
||||
i2s->loopback = 0;
|
||||
i2s->is_shutdown = false;
|
||||
i2s->prod_name = NULL;
|
||||
/* default threshold settings */
|
||||
i2s->rx_fifo_th = 3;
|
||||
dev_set_drvdata(&pdev->dev, i2s);
|
||||
|
||||
if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) {
|
||||
|
||||
@@ -143,14 +143,6 @@ static int tegra210_iqc_hw_params(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int tegra210_iqc_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_iqc *iqc = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_iqc_dai_ops = {
|
||||
.hw_params = tegra210_iqc_hw_params,
|
||||
};
|
||||
@@ -213,7 +205,6 @@ static const struct snd_soc_dapm_route tegra210_iqc_routes[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_iqc_codec = {
|
||||
.probe = tegra210_iqc_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_iqc_widgets,
|
||||
|
||||
@@ -300,13 +300,6 @@ static int tegra210_mixer_out_hw_params(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tegra210_mixer_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_mixer *mixer = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_mixer_out_dai_ops = {
|
||||
.hw_params = tegra210_mixer_out_hw_params,
|
||||
};
|
||||
@@ -530,7 +523,6 @@ static const struct snd_soc_dapm_route tegra210_mixer_routes[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_mixer_codec = {
|
||||
.probe = tegra210_mixer_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_mixer_widgets,
|
||||
|
||||
@@ -430,13 +430,6 @@ static int tegra210_mvc_hw_params(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tegra210_mvc_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_mvc *mvc = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_mvc_dai_ops = {
|
||||
.hw_params = tegra210_mvc_hw_params,
|
||||
};
|
||||
@@ -524,7 +517,6 @@ static const struct snd_soc_dapm_route tegra210_mvc_routes[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_mvc_codec = {
|
||||
.probe = tegra210_mvc_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_mvc_widgets,
|
||||
|
||||
@@ -144,8 +144,6 @@ static int tegra210_ope_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
static int tegra210_ope_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_ope *ope = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
tegra210_peq_codec_init(codec);
|
||||
tegra210_mbdrc_codec_init(codec);
|
||||
|
||||
|
||||
@@ -613,13 +613,6 @@ static int tegra210_sfc_put_mono_conv(struct snd_kcontrol *kcontrol,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_sfc_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_sfc *sfc = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_sfc_in_dai_ops = {
|
||||
.hw_params = tegra210_sfc_in_hw_params,
|
||||
.set_sysclk = tegra210_sfc_set_dai_sysclk,
|
||||
@@ -722,7 +715,6 @@ static const struct snd_kcontrol_new tegra210_sfc_controls[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_sfc_codec = {
|
||||
.probe = tegra210_sfc_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_sfc_widgets,
|
||||
|
||||
@@ -253,13 +253,6 @@ static int tegra210_spdif_set_dai_bclk_ratio(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_spdif_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra210_spdif *spdif = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_spdif_dai_ops = {
|
||||
.hw_params = tegra210_spdif_hw_params,
|
||||
.set_sysclk = tegra210_spdif_set_dai_sysclk,
|
||||
@@ -355,7 +348,6 @@ static const struct snd_soc_dapm_route tegra210_spdif_routes[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_spdif_codec = {
|
||||
.probe = tegra210_spdif_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_spdif_widgets,
|
||||
|
||||
@@ -1247,7 +1247,6 @@ static struct of_dev_auxdata tegra186_xbar_auxdata[] = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra210_xbar_codec = {
|
||||
.probe = tegra_xbar_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra210_xbar_widgets,
|
||||
@@ -1258,7 +1257,6 @@ static struct snd_soc_codec_driver tegra210_xbar_codec = {
|
||||
};
|
||||
|
||||
static struct snd_soc_codec_driver tegra186_xbar_codec = {
|
||||
.probe = tegra_xbar_codec_probe,
|
||||
.idle_bias_off = 1,
|
||||
.component_driver = {
|
||||
.dapm_widgets = tegra186_xbar_widgets,
|
||||
|
||||
@@ -311,13 +311,6 @@ int tegra_xbar_remove(struct platform_device *pdev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_xbar_remove);
|
||||
|
||||
int tegra_xbar_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_xbar_codec_probe);
|
||||
|
||||
|
||||
int tegra_xbar_probe(struct platform_device *pdev,
|
||||
struct tegra_xbar_soc_data *soc_data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user