ASoC: tegra-alt: Remove I2S RX/TX controls

The I2S RX/TX mixer controls are replaced by I2S Playback/Capture,
removing the support of RX/TX as userspace support has deprecated the
usage of these controls.

Bug 2494697

Change-Id: I5ed36c1c00666381a534efc74c8d0a5f3bd5eada
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2024574
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mohan Kumar
2019-02-21 13:13:50 +05:30
committed by Sameer Pujar
parent 736ce72f4b
commit 9b9a66eba7

View File

@@ -461,22 +461,6 @@ static int tegra210_i2s_get_format(struct snd_kcontrol *kcontrol,
ucontrol->value.integer.value[0] = i2s->sample_rate_via_control;
else if (strstr(kcontrol->id.name, "Channels"))
ucontrol->value.integer.value[0] = i2s->channels_via_control;
#if defined(CONFIG_ANDROID)
else if (strstr(kcontrol->id.name, "RX stereo to mono"))
ucontrol->value.integer.value[0] =
i2s->stereo_to_mono[I2S_RX_PATH];
else if (strstr(kcontrol->id.name, "RX mono to stereo"))
ucontrol->value.integer.value[0] =
i2s->mono_to_stereo[I2S_RX_PATH];
else if (strstr(kcontrol->id.name, "TX stereo to mono"))
ucontrol->value.integer.value[0] =
i2s->stereo_to_mono[I2S_TX_PATH];
else if (strstr(kcontrol->id.name, "TX mono to stereo"))
ucontrol->value.integer.value[0] =
i2s->mono_to_stereo[I2S_TX_PATH];
else if (strstr(kcontrol->id.name, "Rx fifo threshold"))
ucontrol->value.integer.value[0] = i2s->rx_fifo_th;
#endif
else if (strstr(kcontrol->id.name, "Capture stereo to mono"))
ucontrol->value.integer.value[0] =
i2s->stereo_to_mono[I2S_TX_PATH];
@@ -511,22 +495,6 @@ static int tegra210_i2s_put_format(struct snd_kcontrol *kcontrol,
i2s->sample_rate_via_control = value;
else if (strstr(kcontrol->id.name, "Channels"))
i2s->channels_via_control = value;
#if defined(CONFIG_ANDROID)
else if (strstr(kcontrol->id.name, "RX stereo to mono"))
i2s->stereo_to_mono[I2S_RX_PATH] = value;
else if (strstr(kcontrol->id.name, "RX mono to stereo"))
i2s->mono_to_stereo[I2S_RX_PATH] = value;
else if (strstr(kcontrol->id.name, "TX stereo to mono"))
i2s->stereo_to_mono[I2S_TX_PATH] = value;
else if (strstr(kcontrol->id.name, "TX mono to stereo"))
i2s->mono_to_stereo[I2S_TX_PATH] = value;
else if (strstr(kcontrol->id.name, "Rx fifo threshold")) {
if (value >= 0 && value < TEGRA210_I2S_RX_FIFO_DEPTH)
i2s->rx_fifo_th = value;
else
return -EINVAL;
}
#endif
else if (strstr(kcontrol->id.name, "Capture stereo to mono"))
i2s->stereo_to_mono[I2S_TX_PATH] = value;
else if (strstr(kcontrol->id.name, "Capture mono to stereo"))
@@ -897,25 +865,6 @@ static const struct snd_kcontrol_new tegra210_i2s_controls[] = {
tegra210_i2s_get_format, tegra210_i2s_put_format),
SOC_SINGLE_EXT("Channels", 0, 0, 16, 0,
tegra210_i2s_get_format, tegra210_i2s_put_format),
#if defined(CONFIG_ANDROID)
/*
* FIXME: The following 'RX/TX stereo to mono', 'RX/TX mono to
* stereo' and 'Rx fifo threshold' controls have been deprecated
* and should no longer be used. Instead the below 'Capture' and
* 'Playback' versions should be used.
*/
SOC_ENUM_EXT("RX stereo to mono conv", tegra210_i2s_stereo_conv_enum,
tegra210_i2s_get_format, tegra210_i2s_put_format),
SOC_ENUM_EXT("RX mono to stereo conv", tegra210_i2s_mono_conv_enum,
tegra210_i2s_get_format, tegra210_i2s_put_format),
SOC_ENUM_EXT("TX stereo to mono conv", tegra210_i2s_stereo_conv_enum,
tegra210_i2s_get_format, tegra210_i2s_put_format),
SOC_ENUM_EXT("TX mono to stereo conv", tegra210_i2s_mono_conv_enum,
tegra210_i2s_get_format, tegra210_i2s_put_format),
NV_SOC_SINGLE_RANGE_EXT("Rx fifo threshold", 0,
TEGRA210_I2S_RX_FIFO_DEPTH - 1, tegra210_i2s_get_format,
tegra210_i2s_put_format),
#endif
SOC_ENUM_EXT("Capture stereo to mono conv",
tegra210_i2s_stereo_conv_enum, tegra210_i2s_get_format,
tegra210_i2s_put_format),