aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/amd/vangogh
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2022-02-23 12:49:34 +0530
committerMark Brown <broonie@kernel.org>2022-02-24 02:04:29 +0000
commit0c38cc1dd17e766eada0aa44be4c1a47bcbb7bc3 (patch)
tree29c57baa80e66d0cc490e51d405008d176a13957 /sound/soc/amd/vangogh
parentASoC: amd: vg: update platform clock control sequence (diff)
downloadlinux-dev-0c38cc1dd17e766eada0aa44be4c1a47bcbb7bc3.tar.xz
linux-dev-0c38cc1dd17e766eada0aa44be4c1a47bcbb7bc3.zip
ASoC: amd: vg: apply sample bits pcm constraint
ACP I2S controller has limitation to program different BCLK for TX and RX paths. Headset path uses I2S SP controller instance. As per requirement, Restricted 32 bits as sample bits by applying pcm constraint in startup calabck for Headset path. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220223071959.13539-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/vangogh')
-rw-r--r--sound/soc/amd/vangogh/acp5x-mach.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index e610616d796c..18b2fdc8dc9e 100644
--- a/sound/soc/amd/vangogh/acp5x-mach.c
+++ b/sound/soc/amd/vangogh/acp5x-mach.c
@@ -100,6 +100,13 @@ static const struct snd_pcm_hw_constraint_list constraints_channels = {
.mask = 0,
};
+static const unsigned int acp5x_nau8821_format[] = {32};
+
+static struct snd_pcm_hw_constraint_list constraints_sample_bits = {
+ .list = acp5x_nau8821_format,
+ .count = ARRAY_SIZE(acp5x_nau8821_format),
+};
+
static int acp5x_8821_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -115,6 +122,9 @@ static int acp5x_8821_startup(struct snd_pcm_substream *substream)
&constraints_channels);
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&constraints_rates);
+ snd_pcm_hw_constraint_list(substream->runtime, 0,
+ SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
+ &constraints_sample_bits);
return 0;
}