From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Alexander.Deucher@amd.com>, <Sunil-kumar.Dommati@amd.com>,
<krisman@collabora.com>, <wtli@nuvoton.com>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"Jaroslav Kysela" <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 5/9] ASoC: amd: vg: apply sample bits pcm constraint
Date: Wed, 23 Feb 2022 12:49:34 +0530 [thread overview]
Message-ID: <20220223071959.13539-5-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20220223071959.13539-1-Vijendar.Mukunda@amd.com>
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>
---
sound/soc/amd/vangogh/acp5x-mach.c | 10 ++++++++++
1 file changed, 10 insertions(+)
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;
}
--
2.17.1
next prev parent reply other threads:[~2022-02-23 7:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 7:19 [PATCH 1/9] ASoC: amd: vg: fix for pm resume callback sequence Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 2/9] ASoC: amd: vangogh: refactor i2s master mode clock sequence code Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 3/9] ASoC: nau8821: enable no_capture_mute flag Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 4/9] ASoC: amd: vg: update platform clock control sequence Vijendar Mukunda
2022-02-23 7:19 ` Vijendar Mukunda [this message]
2022-02-23 7:19 ` [PATCH 6/9] ASoC: amd: vg: update acp init and deinit sequence Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 7/9] ASoC: amd: vg: update DAI link name Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 8/9] ASoC: amd: vg: remove warnings and erros pointed out by checkpatch pl Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 9/9] ASoC: amd: vangogh: fix uninitialized symbol warning in machine driver Vijendar Mukunda
2022-02-23 12:48 ` [PATCH 1/9] ASoC: amd: vg: fix for pm resume callback sequence kernel test robot
2022-02-23 18:34 ` kernel test robot
2022-02-24 2:41 ` Mukunda,Vijendar
2022-02-24 12:22 ` (subset) " Mark Brown
2022-02-25 18:32 ` Mukunda,Vijendar
2022-02-25 19:03 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220223071959.13539-5-Vijendar.Mukunda@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=krisman@collabora.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=wtli@nuvoton.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®