Linux-mediatek Archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm
@ 2024-05-09  7:31 Hsin-Te Yuan
  2024-05-09  8:58 ` Chen-Yu Tsai
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hsin-Te Yuan @ 2024-05-09  7:31 UTC (permalink / raw
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Matthias Brugger, AngeloGioacchino Del Regno, Jiaxin Yu
  Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek,
	Hsin-Te Yuan

For DSP_A, data is a BCK cycle behind LRCK trigger edge. For DSP_B, this
delay doesn't exist. Fix the delay configuration to match the standard.

Fixes: 52fcd65414abfc ("ASoC: mediatek: mt8192: support tdm in platform driver")
Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
---
 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
index 9ce06821c7d0f..49440db370af0 100644
--- a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
+++ b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
@@ -566,10 +566,10 @@ static int mtk_dai_tdm_hw_params(struct snd_pcm_substream *substream,
 		tdm_con |= 1 << DELAY_DATA_SFT;
 		tdm_con |= get_tdm_lrck_width(format) << LRCK_TDM_WIDTH_SFT;
 	} else if (tdm_priv->tdm_out_mode == TDM_OUT_DSP_A) {
-		tdm_con |= 0 << DELAY_DATA_SFT;
+		tdm_con |= 1 << DELAY_DATA_SFT;
 		tdm_con |= 0 << LRCK_TDM_WIDTH_SFT;
 	} else if (tdm_priv->tdm_out_mode == TDM_OUT_DSP_B) {
-		tdm_con |= 1 << DELAY_DATA_SFT;
+		tdm_con |= 0 << DELAY_DATA_SFT;
 		tdm_con |= 0 << LRCK_TDM_WIDTH_SFT;
 	}
 

---
base-commit: 45db3ab70092637967967bfd8e6144017638563c
change-id: 20240509-8192-tdm-cbf2a73c9dd3

Best regards,
-- 
Hsin-Te Yuan <yuanhsinte@chromium.org>



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

* Re: [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm
  2024-05-09  7:31 [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm Hsin-Te Yuan
@ 2024-05-09  8:58 ` Chen-Yu Tsai
  2024-05-09  9:13 ` AngeloGioacchino Del Regno
  2024-05-10  6:22 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2024-05-09  8:58 UTC (permalink / raw
  To: Hsin-Te Yuan
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Matthias Brugger, AngeloGioacchino Del Regno, Jiaxin Yu,
	linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, May 9, 2024 at 3:31 PM Hsin-Te Yuan <yuanhsinte@chromium.org> wrote:
>
> For DSP_A, data is a BCK cycle behind LRCK trigger edge. For DSP_B, this
> delay doesn't exist. Fix the delay configuration to match the standard.
>
> Fixes: 52fcd65414abfc ("ASoC: mediatek: mt8192: support tdm in platform driver")
> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>

> ---
>  sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
> index 9ce06821c7d0f..49440db370af0 100644
> --- a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
> +++ b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
> @@ -566,10 +566,10 @@ static int mtk_dai_tdm_hw_params(struct snd_pcm_substream *substream,
>                 tdm_con |= 1 << DELAY_DATA_SFT;
>                 tdm_con |= get_tdm_lrck_width(format) << LRCK_TDM_WIDTH_SFT;
>         } else if (tdm_priv->tdm_out_mode == TDM_OUT_DSP_A) {
> -               tdm_con |= 0 << DELAY_DATA_SFT;
> +               tdm_con |= 1 << DELAY_DATA_SFT;
>                 tdm_con |= 0 << LRCK_TDM_WIDTH_SFT;
>         } else if (tdm_priv->tdm_out_mode == TDM_OUT_DSP_B) {
> -               tdm_con |= 1 << DELAY_DATA_SFT;
> +               tdm_con |= 0 << DELAY_DATA_SFT;
>                 tdm_con |= 0 << LRCK_TDM_WIDTH_SFT;
>         }
>
>
> ---
> base-commit: 45db3ab70092637967967bfd8e6144017638563c
> change-id: 20240509-8192-tdm-cbf2a73c9dd3
>
> Best regards,
> --
> Hsin-Te Yuan <yuanhsinte@chromium.org>
>
>


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

* Re: [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm
  2024-05-09  7:31 [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm Hsin-Te Yuan
  2024-05-09  8:58 ` Chen-Yu Tsai
@ 2024-05-09  9:13 ` AngeloGioacchino Del Regno
  2024-05-10  6:22 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-05-09  9:13 UTC (permalink / raw
  To: Hsin-Te Yuan, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Matthias Brugger, Jiaxin Yu
  Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek

Il 09/05/24 09:31, Hsin-Te Yuan ha scritto:
> For DSP_A, data is a BCK cycle behind LRCK trigger edge. For DSP_B, this
> delay doesn't exist. Fix the delay configuration to match the standard.
> 
> Fixes: 52fcd65414abfc ("ASoC: mediatek: mt8192: support tdm in platform driver")
> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm
  2024-05-09  7:31 [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm Hsin-Te Yuan
  2024-05-09  8:58 ` Chen-Yu Tsai
  2024-05-09  9:13 ` AngeloGioacchino Del Regno
@ 2024-05-10  6:22 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-05-10  6:22 UTC (permalink / raw
  To: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Matthias Brugger,
	AngeloGioacchino Del Regno, Jiaxin Yu, Hsin-Te Yuan
  Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, 09 May 2024 07:31:29 +0000, Hsin-Te Yuan wrote:
> For DSP_A, data is a BCK cycle behind LRCK trigger edge. For DSP_B, this
> delay doesn't exist. Fix the delay configuration to match the standard.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: mediatek: mt8192: fix register configuration for tdm
      commit: a85ed162f0efcfdd664954414a05d1d560cc95dc

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] 4+ messages in thread

end of thread, other threads:[~2024-05-10  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09  7:31 [PATCH] ASoC: mediatek: mt8192: fix register configuration for tdm Hsin-Te Yuan
2024-05-09  8:58 ` Chen-Yu Tsai
2024-05-09  9:13 ` AngeloGioacchino Del Regno
2024-05-10  6:22 ` 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).