mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
ASoC: tegra: Add MVC Bypass support
- Add "MVC Bypass" kcontrol to enable MVC Bypass mode. - The change is required to verify MVC bypass mode during bring up. Bug 200683609 Change-Id: Ic0f2c947fa2e9bd6e9b429b86ff35e053775ec80 Signed-off-by: sheetal <sheetal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2546568 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Viswanath L <viswanathl@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Sharad Gupta <sharadg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -337,6 +337,8 @@ static int tegra210_mvc_get_format(struct snd_kcontrol *kcontrol,
|
||||
ucontrol->value.integer.value[0] = mvc->format_in;
|
||||
else if (strstr(kcontrol->id.name, "Audio Channels"))
|
||||
ucontrol->value.integer.value[0] = mvc->cif_channels;
|
||||
else if (strstr(kcontrol->id.name, "Bypass"))
|
||||
ucontrol->value.integer.value[0] = mvc->bypass_mode;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -353,6 +355,8 @@ static int tegra210_mvc_put_format(struct snd_kcontrol *kcontrol,
|
||||
mvc->format_in = value;
|
||||
else if (strstr(kcontrol->id.name, "Audio Channels"))
|
||||
mvc->cif_channels = value;
|
||||
else if (strstr(kcontrol->id.name, "Bypass"))
|
||||
mvc->bypass_mode = value;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -455,6 +459,11 @@ static int tegra210_mvc_hw_params(struct snd_pcm_substream *substream,
|
||||
/* program duration_inv */
|
||||
regmap_write(mvc->regmap, TEGRA210_MVC_DURATION_INV, mvc->duration_inv);
|
||||
|
||||
/* set bypass mode */
|
||||
regmap_update_bits(mvc->regmap, TEGRA210_MVC_CTRL,
|
||||
TEGRA210_MVC_BYPASS_MODE_MASK,
|
||||
mvc->bypass_mode << TEGRA210_MVC_BYPASS_MODE_SHIFT);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -517,6 +526,8 @@ static const struct snd_kcontrol_new tegra210_mvc_vol_ctrl[] = {
|
||||
tegra210_mvc_get_format, tegra210_mvc_put_format),
|
||||
SOC_ENUM_EXT("Audio Bit Format", tegra210_mvc_format_enum,
|
||||
tegra210_mvc_get_format, tegra210_mvc_put_format),
|
||||
SOC_SINGLE_EXT("Bypass", TEGRA210_MVC_CTRL, 0, 1, 0,
|
||||
tegra210_mvc_get_format, tegra210_mvc_put_format),
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver tegra210_mvc_dais[] = {
|
||||
|
||||
Reference in New Issue
Block a user