summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohan Kumar <mkumard@nvidia.com>2019-02-21 02:43:50 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-03-01 04:42:14 -0500
commite98f4a918d32b8dfe04c6ba498b971bea1ad3e8a (patch)
tree2d0cc94478c82712d573ffcc60cb58e56233015d
parent8d01943ebc6d24931ad53fbdb6dab9d521f8481d (diff)
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 (cherry picked from commit ae00364e2c7cfa9d46faa2a858aaf5f3d9df0437) Reviewed-on: https://git-master.nvidia.com/r/2029931 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--sound/soc/tegra-alt/tegra210_i2s_alt.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/sound/soc/tegra-alt/tegra210_i2s_alt.c b/sound/soc/tegra-alt/tegra210_i2s_alt.c
index a47470594..bcd50031a 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,
461 ucontrol->value.integer.value[0] = i2s->sample_rate_via_control; 461 ucontrol->value.integer.value[0] = i2s->sample_rate_via_control;
462 else if (strstr(kcontrol->id.name, "Channels")) 462 else if (strstr(kcontrol->id.name, "Channels"))
463 ucontrol->value.integer.value[0] = i2s->channels_via_control; 463 ucontrol->value.integer.value[0] = i2s->channels_via_control;
464#if defined(CONFIG_ANDROID)
465 else if (strstr(kcontrol->id.name, "RX stereo to mono"))
466 ucontrol->value.integer.value[0] =
467 i2s->stereo_to_mono[I2S_RX_PATH];
468 else if (strstr(kcontrol->id.name, "RX mono to stereo"))
469 ucontrol->value.integer.value[0] =
470 i2s->mono_to_stereo[I2S_RX_PATH];
471 else if (strstr(kcontrol->id.name, "TX stereo to mono"))
472 ucontrol->value.integer.value[0] =
473 i2s->stereo_to_mono[I2S_TX_PATH];
474 else if (strstr(kcontrol->id.name, "TX mono to stereo"))
475 ucontrol->value.integer.value[0] =
476 i2s->mono_to_stereo[I2S_TX_PATH];
477 else if (strstr(kcontrol->id.name, "Rx fifo threshold"))
478 ucontrol->value.integer.value[0] = i2s->rx_fifo_th;
479#endif
480 else if (strstr(kcontrol->id.name, "Capture stereo to mono")) 464 else if (strstr(kcontrol->id.name, "Capture stereo to mono"))
481 ucontrol->value.integer.value[0] = 465 ucontrol->value.integer.value[0] =
482 i2s->stereo_to_mono[I2S_TX_PATH]; 466 i2s->stereo_to_mono[I2S_TX_PATH];
@@ -511,22 +495,6 @@ static int tegra210_i2s_put_format(struct snd_kcontrol *kcontrol,
511 i2s->sample_rate_via_control = value; 495 i2s->sample_rate_via_control = value;
512 else if (strstr(kcontrol->id.name, "Channels")) 496 else if (strstr(kcontrol->id.name, "Channels"))
513 i2s->channels_via_control = value; 497 i2s->channels_via_control = value;
514#if defined(CONFIG_ANDROID)
515 else if (strstr(kcontrol->id.name, "RX stereo to mono"))
516 i2s->stereo_to_mono[I2S_RX_PATH] = value;
517 else if (strstr(kcontrol->id.name, "RX mono to stereo"))
518 i2s->mono_to_stereo[I2S_RX_PATH] = value;
519 else if (strstr(kcontrol->id.name, "TX stereo to mono"))
520 i2s->stereo_to_mono[I2S_TX_PATH] = value;
521 else if (strstr(kcontrol->id.name, "TX mono to stereo"))
522 i2s->mono_to_stereo[I2S_TX_PATH] = value;
523 else if (strstr(kcontrol->id.name, "Rx fifo threshold")) {
524 if (value >= 0 && value < TEGRA210_I2S_RX_FIFO_DEPTH)
525 i2s->rx_fifo_th = value;
526 else
527 return -EINVAL;
528 }
529#endif
530 else if (strstr(kcontrol->id.name, "Capture stereo to mono")) 498 else if (strstr(kcontrol->id.name, "Capture stereo to mono"))
531 i2s->stereo_to_mono[I2S_TX_PATH] = value; 499 i2s->stereo_to_mono[I2S_TX_PATH] = value;
532 else if (strstr(kcontrol->id.name, "Capture mono to stereo")) 500 else if (strstr(kcontrol->id.name, "Capture mono to stereo"))
@@ -926,25 +894,6 @@ static const struct snd_kcontrol_new tegra210_i2s_controls[] = {
926 tegra210_i2s_get_format, tegra210_i2s_put_format), 894 tegra210_i2s_get_format, tegra210_i2s_put_format),
927 SOC_SINGLE_EXT("Channels", 0, 0, 16, 0, 895 SOC_SINGLE_EXT("Channels", 0, 0, 16, 0,
928 tegra210_i2s_get_format, tegra210_i2s_put_format), 896 tegra210_i2s_get_format, tegra210_i2s_put_format),
929#if defined(CONFIG_ANDROID)
930 /*
931 * FIXME: The following 'RX/TX stereo to mono', 'RX/TX mono to
932 * stereo' and 'Rx fifo threshold' controls have been deprecated
933 * and should no longer be used. Instead the below 'Capture' and
934 * 'Playback' versions should be used.
935 */
936 SOC_ENUM_EXT("RX stereo to mono conv", tegra210_i2s_stereo_conv_enum,
937 tegra210_i2s_get_format, tegra210_i2s_put_format),
938 SOC_ENUM_EXT("RX mono to stereo conv", tegra210_i2s_mono_conv_enum,
939 tegra210_i2s_get_format, tegra210_i2s_put_format),
940 SOC_ENUM_EXT("TX stereo to mono conv", tegra210_i2s_stereo_conv_enum,
941 tegra210_i2s_get_format, tegra210_i2s_put_format),
942 SOC_ENUM_EXT("TX mono to stereo conv", tegra210_i2s_mono_conv_enum,
943 tegra210_i2s_get_format, tegra210_i2s_put_format),
944 NV_SOC_SINGLE_RANGE_EXT("Rx fifo threshold", 0,
945 TEGRA210_I2S_RX_FIFO_DEPTH - 1, tegra210_i2s_get_format,
946 tegra210_i2s_put_format),
947#endif
948 SOC_ENUM_EXT("Capture stereo to mono conv", 897 SOC_ENUM_EXT("Capture stereo to mono conv",
949 tegra210_i2s_stereo_conv_enum, tegra210_i2s_get_format, 898 tegra210_i2s_stereo_conv_enum, tegra210_i2s_get_format,
950 tegra210_i2s_put_format), 899 tegra210_i2s_put_format),