Comment 8 for bug 1068804

David Henningsson (diwic) wrote :

Some analysis on the Tegra side using a diff between the two directories:

>diff -Nur playback-notworking2/tegra30-ahub playback-working2/tegra30-ahub
>--- playback-notworking2/tegra30-ahub 2012-11-07 16:59:10.000000000 +0100
>+++ playback-working2/tegra30-ahub 2012-11-07 17:02:23.000000000 +0100
>@@ -6,7 +6,7 @@
> TEGRA30_AHUB_CHANNEL_CLEAR[1] = 00000000
> TEGRA30_AHUB_CHANNEL_CLEAR[2] = 00000000
> TEGRA30_AHUB_CHANNEL_CLEAR[3] = 00000000
>-TEGRA30_AHUB_CHANNEL_STATUS[0] = 04070000
>+TEGRA30_AHUB_CHANNEL_STATUS[0] = 05010000
> TEGRA30_AHUB_CHANNEL_STATUS[1] = 08080000
> TEGRA30_AHUB_CHANNEL_STATUS[2] = 08080000
> TEGRA30_AHUB_CHANNEL_STATUS[3] = 08080000

TEGRA30_AHUB_CHANNEL_STATUS seems to vary during playback, maybe it's an indicator of where in the ring buffer you currently are. Probably nothing

>@@ -21,7 +21,7 @@
> TEGRA30_AHUB_CONFIG_LINK_CTRL = 08008000
> TEGRA30_AHUB_MISC_CTRL = 80000000
> TEGRA30_AHUB_APBDMA_LIVE_STATUS = 01fe02fc
>-TEGRA30_AHUB_I2S_LIVE_STATUS = 000033f3
>+TEGRA30_AHUB_I2S_LIVE_STATUS = 000033fb
> TEGRA30_AHUB_DAM_LIVE_STATUS[0] = 00000083
> TEGRA30_AHUB_DAM_LIVE_STATUS[1] = 00000083
> TEGRA30_AHUB_DAM_LIVE_STATUS[2] = 00000083
>@@ -30,7 +30,7 @@
> TEGRA30_AHUB_DAM_INT_MASK = 00939393
> TEGRA30_AHUB_SPDIF_INT_MASK = 00008fff
> TEGRA30_AHUB_APBIF_INT_MASK = 0001ffff
>-TEGRA30_AHUB_I2S_INT_STATUS = 0000000c
>+TEGRA30_AHUB_I2S_INT_STATUS = 00000004
> TEGRA30_AHUB_DAM_INT_STATUS = 00808080
> TEGRA30_AHUB_SPDIF_INT_STATUS = 00000000
> TEGRA30_AHUB_APBIF_INT_STATUS = 00000002

These seem interesting - could they be indicating some error in the i2s communication? However, these two registers are not used in code (only referenced during debug code), so it's impossible to tell how to fix it.

>diff -Nur playback-notworking2/tegra30-dam.0 playback-working2/tegra30-dam.0
>--- playback-notworking2/tegra30-dam.0 2012-11-07 16:59:10.000000000 +0100
>+++ playback-working2/tegra30-dam.0 2012-11-07 17:02:23.000000000 +0100
>@@ -2,9 +2,9 @@
> TEGRA30_DAM_CLIP = 00000000
> TEGRA30_DAM_CLIP_THRESHOLD = 007fff00
> TEGRA30_DAM_AUDIOCIF_OUT_CTRL = 00001100
>-TEGRA30_DAM_CH0_CTRL = 12e20300
>-TEGRA30_DAM_CH0_CONV = 000038af
>+TEGRA30_DAM_CH0_CTRL = 52e00300
>+TEGRA30_DAM_CH0_CONV = 000034bd
> TEGRA30_DAM_AUDIOCIF_CH0_CTRL = 00001104
> TEGRA30_DAM_CH1_CTRL = 00000010
>-TEGRA30_DAM_CH1_CONV = 0000e565
>+TEGRA30_DAM_CH1_CONV = 0000e145
> TEGRA30_DAM_AUDIOCIF_CH1_CTRL = 00001104

From what I can tell from code, the CH0 and CH1 registers seem to be used for input (and this was a playback test only), so probably these differences are irrelevant.

>diff -Nur playback-notworking2/tegra30-dam.1 playback-working2/tegra30-dam.1
>--- playback-notworking2/tegra30-dam.1 2012-11-07 16:59:10.000000000 +0100
>+++ playback-working2/tegra30-dam.1 2012-11-07 17:02:23.000000000 +0100
>@@ -1,10 +1,10 @@
>-TEGRA30_DAM_CTRL = 00000060
>+TEGRA30_DAM_CTRL = 00000040

The TEGRA30_DAM_CTRL difference here corresponds to sample rate, I believe - but my guess is that we use dam.0 only, so probably irrelevant too?

> TEGRA30_DAM_CLIP = 00000000
> TEGRA30_DAM_CLIP_THRESHOLD = 007fff00
> TEGRA30_DAM_AUDIOCIF_OUT_CTRL = 00001100
>-TEGRA30_DAM_CH0_CTRL = 55cd0800
>-TEGRA30_DAM_CH0_CONV = 0000c038
>+TEGRA30_DAM_CH0_CTRL = 53cd0000
>+TEGRA30_DAM_CH0_CONV = 00008238
> TEGRA30_DAM_AUDIOCIF_CH0_CTRL = 00001104
> TEGRA30_DAM_CH1_CTRL = 00000010
>-TEGRA30_DAM_CH1_CONV = 0000102e
>+TEGRA30_DAM_CH1_CONV = 0000f314
> TEGRA30_DAM_AUDIOCIF_CH1_CTRL = 00001104
>diff -Nur playback-notworking2/tegra30-dam.2 playback-working2/tegra30-dam.2
>--- playback-notworking2/tegra30-dam.2 2012-11-07 16:59:10.000000000 +0100
>+++ playback-working2/tegra30-dam.2 2012-11-07 17:02:23.000000000 +0100
>@@ -2,9 +2,9 @@
> TEGRA30_DAM_CLIP = 00000000
> TEGRA30_DAM_CLIP_THRESHOLD = 007fff00
> TEGRA30_DAM_AUDIOCIF_OUT_CTRL = 00001100
>-TEGRA30_DAM_CH0_CTRL = a6c80400
>-TEGRA30_DAM_CH0_CONV = 0000df57
>+TEGRA30_DAM_CH0_CTRL = 4c080000
>+TEGRA30_DAM_CH0_CONV = 0000d845
> TEGRA30_DAM_AUDIOCIF_CH0_CTRL = 00001104
> TEGRA30_DAM_CH1_CTRL = 00000010
>-TEGRA30_DAM_CH1_CONV = 0000809a
>+TEGRA30_DAM_CH1_CONV = 00000000
> TEGRA30_DAM_AUDIOCIF_CH1_CTRL = 00001104

Again, from what I can tell from code, the CH0 and CH1 registers seem to be used for input (and this was a playback test only), so probably these differences are irrelevant.

>diff -Nur playback-notworking2/tegra30-spdif playback-working2/tegra30-spdif
>--- playback-notworking2/tegra30-spdif 2012-11-07 16:59:10.000000000 +0100
>+++ playback-working2/tegra30-spdif 2012-11-07 17:02:23.000000000 +0100
>@@ -1,6 +1,6 @@
> TEGRA30_SPDIF_CTRL = 00000000
> TEGRA30_SPDIF_STROBE_CTRL = 007f0000
>-TEGRA30_SPDIF_CIF_TXD_CTRL = 31013304
>+TEGRA30_SPDIF_CIF_TXD_CTRL = 00001104
> TEGRA30_SPDIF_CIF_RXD_CTRL = 00001100
> TEGRA30_SPDIF_CIF_TXU_CTRL = 00001104
> TEGRA30_SPDIF_CIF_RXU_CTRL = 00001100

We're using I2S rather than SPDIF so likely this is also irrelevant?