Skip to content

Commit

Permalink
ASoC: amd: acp: Add I2S TDM support for acp7.1 platform
Browse files Browse the repository at this point in the history
Add acp71 revision id to support i2s/tdm mode.

Signed-off-by: Venkata Prasad Potturu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Venkata-Prasad-Potturu authored and broonie committed Sep 3, 2024
1 parent 1150c18 commit 3f60059
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/amd/acp/acp-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id)
switch (chip->acp_rev) {
case ACP63_DEV:
case ACP70_DEV:
case ACP71_DEV:
val |= FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div);
val |= FIELD_PREP(ACP63_BCLK_DIV_FIELD, adata->bclk_div);
break;
Expand Down Expand Up @@ -136,6 +137,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
break;
case ACP63_DEV:
case ACP70_DEV:
case ACP71_DEV:
switch (slots) {
case 1 ... 31:
no_of_slots = slots;
Expand Down Expand Up @@ -169,6 +171,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
break;
case ACP63_DEV:
case ACP70_DEV:
case ACP71_DEV:
if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK)
adata->tdm_tx_fmt[stream->dai_id - 1] =
FRM_LEN | (slots << 13) | (slot_len << 18);
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/amd/acp/acp-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s

switch (adata->platform) {
case ACP70:
case ACP71:
switch (stream->dai_id) {
case I2S_SP_INSTANCE:
if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK)
Expand Down Expand Up @@ -271,6 +272,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs
switch (chip->acp_rev) {
case ACP63_DEV:
case ACP70_DEV:
case ACP71_DEV:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
runtime->hw = acp6x_pcm_hardware_playback;
else
Expand Down

0 comments on commit 3f60059

Please sign in to comment.