From 9b9a66eba7e2f496b27b99d76f6594a9c2ab5698 Mon Sep 17 00:00:00 2001 From: Mohan Kumar Date: Thu, 21 Feb 2019 13:13:50 +0530 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/2024574 Reviewed-by: Jonathan Hunter Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions Tested-by: mobile promotions --- sound/soc/tegra-alt/tegra210_i2s_alt.c | 51 -------------------------- 1 file changed, 51 deletions(-) diff --git a/sound/soc/tegra-alt/tegra210_i2s_alt.c b/sound/soc/tegra-alt/tegra210_i2s_alt.c index 8b6df7c5..2503b033 100644 --- a/sound/soc/tegra-alt/tegra210_i2s_alt.c +++ b/sound/soc/tegra-alt/tegra210_i2s_alt.c @@ -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),