diff --git a/sound/soc/tegra-alt/tegra210_admaif_alt.c b/sound/soc/tegra-alt/tegra210_admaif_alt.c index 4ec57208..4bf15768 100644 --- a/sound/soc/tegra-alt/tegra210_admaif_alt.c +++ b/sound/soc/tegra-alt/tegra210_admaif_alt.c @@ -1,7 +1,7 @@ /* * tegra210_admaif_alt.c - Tegra ADMAIF driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -570,7 +570,7 @@ static int tegra_admaif_put_format(struct snd_kcontrol *kcontrol, char buf[50]; if (strstr(kcontrol->id.name, "Channels")) { - if (value > 0 && value <= 16) + if (value >= 0 && value <= 16) admaif->override_channels[mc->reg] = value; else return -EINVAL; diff --git a/sound/soc/tegra-alt/tegra210_amx_alt.c b/sound/soc/tegra-alt/tegra210_amx_alt.c index e63eeadd..ab166f5a 100644 --- a/sound/soc/tegra-alt/tegra210_amx_alt.c +++ b/sound/soc/tegra-alt/tegra210_amx_alt.c @@ -1,7 +1,7 @@ /* * tegra210_amx_alt.c - Tegra210 AMX driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -574,12 +574,12 @@ static int tegra210_amx_put_channels(struct snd_kcontrol *kcontrol, snprintf(buf, 50, "Input%d Channels", reg); if (strstr(kcontrol->id.name, buf)) { - if (value > 0 && value <= 16) + if (value >= 0 && value <= 16) amx->input_channels[reg - 1] = value; else return -EINVAL; } else if (strstr(kcontrol->id.name, "Output Channels")) { - if (value > 0 && value <= 16) + if (value >= 0 && value <= 16) amx->output_channels = value; else return -EINVAL; diff --git a/sound/soc/tegra-alt/tegra210_mixer_alt.c b/sound/soc/tegra-alt/tegra210_mixer_alt.c index bbc18aab..be9069a5 100644 --- a/sound/soc/tegra-alt/tegra210_mixer_alt.c +++ b/sound/soc/tegra-alt/tegra210_mixer_alt.c @@ -1,7 +1,7 @@ /* * tegra210_mixer_alt.c - Tegra210 MIXER driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -155,7 +155,7 @@ static int tegra210_mixer_put_format(struct snd_kcontrol *kcontrol, int value = ucontrol->value.integer.value[0]; if (strstr(kcontrol->id.name, "Channels")) { - if (value > 0 && value <= 8) + if (value >= 0 && value <= 8) mixer->channels_via_control[mc->reg - 1] = value; else return -EINVAL; diff --git a/sound/soc/tegra-alt/tegra210_mvc_alt.c b/sound/soc/tegra-alt/tegra210_mvc_alt.c index 16f490d3..efb40915 100644 --- a/sound/soc/tegra-alt/tegra210_mvc_alt.c +++ b/sound/soc/tegra-alt/tegra210_mvc_alt.c @@ -1,7 +1,7 @@ /* * tegra210_mvc_alt.c - Tegra210 MVC driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -304,6 +304,8 @@ static int tegra210_mvc_put_audio_bits(struct snd_kcontrol *kcontrol, val = ucontrol->value.integer.value[0]; if ((val >= 8) && (val <= 32) && (val%4 == 0)) mvc->audio_bits = val/4 - 1; + else if (val == 0) + mvc->audio_bits = 0; else return -EINVAL; diff --git a/sound/soc/tegra-alt/tegra210_sfc_alt.c b/sound/soc/tegra-alt/tegra210_sfc_alt.c index 9724932d..51eb4130 100644 --- a/sound/soc/tegra-alt/tegra210_sfc_alt.c +++ b/sound/soc/tegra-alt/tegra210_sfc_alt.c @@ -1,7 +1,7 @@ /* * tegra210_sfc_alt.c - Tegra210 SFC driver * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -499,7 +499,7 @@ static int tegra210_sfc_put_format(struct snd_kcontrol *kcontrol, else if (strstr(kcontrol->id.name, "output")) sfc->format_out = value; else if (strstr(kcontrol->id.name, "Channels")) { - if (value > 0 && value <= 2) + if (value >= 0 && value <= 2) sfc->channels_via_control = value; else return -EINVAL;