Commit 3f600592 authored by Venkata Prasad Potturu's avatar Venkata Prasad Potturu Committed by Mark Brown

ASoC: amd: acp: Add I2S TDM support for acp7.1 platform

Add acp71 revision id to support i2s/tdm mode.
Signed-off-by: default avatarVenkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20240903113427.182997-13-venkataprasad.potturu@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1150c18b
...@@ -61,6 +61,7 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id) ...@@ -61,6 +61,7 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id)
switch (chip->acp_rev) { switch (chip->acp_rev) {
case ACP63_DEV: case ACP63_DEV:
case ACP70_DEV: case ACP70_DEV:
case ACP71_DEV:
val |= FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div); val |= FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div);
val |= FIELD_PREP(ACP63_BCLK_DIV_FIELD, adata->bclk_div); val |= FIELD_PREP(ACP63_BCLK_DIV_FIELD, adata->bclk_div);
break; break;
...@@ -136,6 +137,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas ...@@ -136,6 +137,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
break; break;
case ACP63_DEV: case ACP63_DEV:
case ACP70_DEV: case ACP70_DEV:
case ACP71_DEV:
switch (slots) { switch (slots) {
case 1 ... 31: case 1 ... 31:
no_of_slots = slots; no_of_slots = slots;
...@@ -169,6 +171,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas ...@@ -169,6 +171,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
break; break;
case ACP63_DEV: case ACP63_DEV:
case ACP70_DEV: case ACP70_DEV:
case ACP71_DEV:
if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK) if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK)
adata->tdm_tx_fmt[stream->dai_id - 1] = adata->tdm_tx_fmt[stream->dai_id - 1] =
FRM_LEN | (slots << 13) | (slot_len << 18); FRM_LEN | (slots << 13) | (slot_len << 18);
......
...@@ -206,6 +206,7 @@ void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s ...@@ -206,6 +206,7 @@ void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s
switch (adata->platform) { switch (adata->platform) {
case ACP70: case ACP70:
case ACP71:
switch (stream->dai_id) { switch (stream->dai_id) {
case I2S_SP_INSTANCE: case I2S_SP_INSTANCE:
if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK) if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK)
...@@ -271,6 +272,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs ...@@ -271,6 +272,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs
switch (chip->acp_rev) { switch (chip->acp_rev) {
case ACP63_DEV: case ACP63_DEV:
case ACP70_DEV: case ACP70_DEV:
case ACP71_DEV:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
runtime->hw = acp6x_pcm_hardware_playback; runtime->hw = acp6x_pcm_hardware_playback;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment