LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASOC: amd: acp: Add TDM slots setting support for ACP I2S controller
@ 2022-10-18 12:27 Venkata Prasad Potturu
  2022-10-19 12:05 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Venkata Prasad Potturu @ 2022-10-18 12:27 UTC (permalink / raw
  To: broonie, alsa-devel
  Cc: vsujithkumar.reddy, Vijendar.Mukunda, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, ssabakar, Venkata Prasad Potturu,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	V sujith kumar Reddy, Ajit Kumar Pandey, open list

Modify set tdm slot function to set ACP I2S controller slots
in tdm mode based on number of slots.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
 sound/soc/amd/acp/acp-i2s.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c
index ac416572db0d..09b6511c0a26 100644
--- a/sound/soc/amd/acp/acp-i2s.c
+++ b/sound/soc/amd/acp/acp-i2s.c
@@ -51,7 +51,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
 	struct device *dev = dai->component->dev;
 	struct acp_dev_data *adata = snd_soc_dai_get_drvdata(dai);
 	struct acp_stream *stream;
-	int slot_len;
+	int slot_len, no_of_slots;
 
 	switch (slot_width) {
 	case SLOT_WIDTH_8:
@@ -71,6 +71,20 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
 		return -EINVAL;
 	}
 
+	switch (slots) {
+	case 1 ... 7:
+		no_of_slots = slots;
+		break;
+	case 8:
+		no_of_slots = 0;
+		break;
+	default:
+		dev_err(dev, "Unsupported slots %d\n", slots);
+		return -EINVAL;
+	}
+
+	slots = no_of_slots;
+
 	spin_lock_irq(&adata->acp_lock);
 	list_for_each_entry(stream, &adata->stream_list, list) {
 		if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASOC: amd: acp: Add TDM slots setting support for ACP I2S controller
  2022-10-18 12:27 [PATCH] ASOC: amd: acp: Add TDM slots setting support for ACP I2S controller Venkata Prasad Potturu
@ 2022-10-19 12:05 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-10-19 12:05 UTC (permalink / raw
  To: Venkata Prasad Potturu, alsa-devel
  Cc: Liam Girdwood, V sujith kumar Reddy, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, ssabakar, Vijendar.Mukunda,
	Ajit Kumar Pandey, open list, Takashi Iwai, vsujithkumar.reddy,
	Jaroslav Kysela

On Tue, 18 Oct 2022 17:57:06 +0530, Venkata Prasad Potturu wrote:
> Modify set tdm slot function to set ACP I2S controller slots
> in tdm mode based on number of slots.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASOC: amd: acp: Add TDM slots setting support for ACP I2S controller
      commit: bdde278a77d3220ba7991e6ff5e992716981ae30

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-19 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 12:27 [PATCH] ASOC: amd: acp: Add TDM slots setting support for ACP I2S controller Venkata Prasad Potturu
2022-10-19 12:05 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).