mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
ASoC: tegra-alt: remove set_bclk_ratio() callbacks
snd_soc_dai_ops has a callback function pointer to set bclk ratio. For DMIC, DSPK and SPDIF drivers though the callback is implemented but looks redundant. Such callbacks are removed from the driver and a NULL check for set_bclk_ratio function ptr is added in machine driver. Bug 200503387 Bug 200520821 Change-Id: Ia3b96d0e0f4789f8bc54960b3a7ebaf482da1434 Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2144430 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -376,6 +376,9 @@ static int tegra_machine_set_bclk_ratio(struct tegra_machine *machine,
|
||||
unsigned int bclk_ratio;
|
||||
int err;
|
||||
|
||||
if (!rtd->cpu_dai->driver->ops->set_bclk_ratio)
|
||||
return 0;
|
||||
|
||||
if (machine->bclk_ratio_override) {
|
||||
bclk_ratio = machine->bclk_ratio_override;
|
||||
} else {
|
||||
|
||||
@@ -165,12 +165,6 @@ static int tegra186_dspk_set_audio_cif(struct tegra186_dspk *dspk,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra186_dspk_set_dai_bclk_ratio(struct snd_soc_dai *dai,
|
||||
unsigned int ratio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra186_dspk_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
@@ -266,15 +260,10 @@ static int tegra186_dspk_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
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,
|
||||
.startup = tegra186_dspk_startup,
|
||||
.shutdown = tegra186_dspk_shutdown,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_ops tegra186_dspk_dai_ops2 = {
|
||||
.set_bclk_ratio = tegra186_dspk_set_dai_bclk_ratio,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver tegra186_dspk_dais[] = {
|
||||
{
|
||||
.name = "DAP",
|
||||
@@ -314,7 +303,6 @@ static struct snd_soc_dai_driver tegra186_dspk_dais[] = {
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE |
|
||||
SNDRV_PCM_FMTBIT_S32_LE,
|
||||
},
|
||||
.ops = &tegra186_dspk_dai_ops2,
|
||||
.symmetric_rates = 1,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -102,12 +102,6 @@ static int tegra210_dmic_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_dmic_set_dai_bclk_ratio(struct snd_soc_dai *dai,
|
||||
unsigned int ratio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const int tegra210_dmic_fmt_values[] = {
|
||||
0,
|
||||
TEGRA210_AUDIOCIF_BITS_16,
|
||||
@@ -343,7 +337,6 @@ static int tegra210_dmic_put_control(struct snd_kcontrol *kcontrol,
|
||||
|
||||
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,
|
||||
.startup = tegra210_dmic_startup,
|
||||
.shutdown = tegra210_dmic_shutdown,
|
||||
};
|
||||
|
||||
@@ -247,16 +247,9 @@ static int tegra210_spdif_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra210_spdif_set_dai_bclk_ratio(struct snd_soc_dai *dai,
|
||||
unsigned int ratio)
|
||||
{
|
||||
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,
|
||||
.set_bclk_ratio = tegra210_spdif_set_dai_bclk_ratio,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver tegra210_spdif_dais[] = {
|
||||
|
||||
Reference in New Issue
Block a user