Skip to contentSkip to conversation

ARM: OMAP4: Audio regression fix for 3.8 kernel

PATCH New Peter Ujfalusi 4 participants 7 messages Jan 4, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: OMAP4: Audio regression fix for 3.8 kernel

Hello,

Changes since v1:
- Update the comment in cclock44xx_data.c as suggested by Jon Hunter

I have noticed that in 3.8-rc2 kernel OMAP4 audio is not working correctly. The audio playback is in 'slow motion' mode.
The following two patch fixes this regression.

We need to lock the ABE DPLL for all OMAP4 revisions not only for 446x and McPDM need to be configured to no IDLE mode during activity.

Regards,
Peter
---
Peter Ujfalusi (2):
ARM: OMAP4: clock data: Lock ABE DPLL on all revisions
ARM: OMAP4: hwmod_data: Correct IDLEMODE for McPDM

 arch/arm/mach-omap2/cclock44xx_data.c      | 13 ++++++-------
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |  2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
1.8.0.2
#1 lore raw

PATCH v2 1/2 ARM: OMAP4: clock data: Lock ABE DPLL on all revisions

To avoid issues with audio caused by non locked ABE DPLL we should make sure it is locked in all OMAP4 revisions.

asda d

---
 arch/arm/mach-omap2/cclock44xx_data.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/cclock44xx_data.c +6 -7
index 5789a5e..a2cc046 100644
@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void)
 	 * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power
 	 * state when turning the ABE clock domain. Workaround this by
 	 * locking the ABE DPLL on boot.
+	 * Lock the ABE DPLL in any case to avoid issues with audio.
 	 */
-	if (cpu_is_omap446x()) {
-		rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
-		if (!rc)
-			rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
-		if (rc)
-			pr_err("%s: failed to configure ABE DPLL!\n", __func__);
-	}
+	rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
+	if (!rc)
+		rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
+	if (rc)
+		pr_err("%s: failed to configure ABE DPLL!\n", __func__);
 
 	return 0;
 }
Signature · 1 line
1.8.0.2
#2 lore raw

PATCH v2 1/2 ARM: OMAP4: clock data: Lock ABE DPLL on all revisions

Quoted 6 lines · Peter Ujfalusi

To avoid issues with audio caused by non locked ABE DPLL we should make sure it is locked in all OMAP4 revisions.

asda d

Not sure what the above is ;-)

Quoted 19 lines
---
 arch/arm/mach-omap2/cclock44xx_data.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/cclock44xx_data.c +1 -5
index 5789a5e..a2cc046 100644
@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void)
 	 * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power
 	 * state when turning the ABE clock domain. Workaround this by
 	 * locking the ABE DPLL on boot.
+	 * Lock the ABE DPLL in any case to avoid issues with audio.
 	 */
-	if (cpu_is_omap446x()) {
-		rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
-		if (!rc)
-			rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
-		if (rc)

arch/arm/mach-omap2/cclock44xx_data.c int __init omap4xxx_clk_init(void) · line 2038

Quoted 10 lines
arch/arm/mach-omap2/cclock44xx_data.c +5 -2
-			pr_err("%s: failed to configure ABE DPLL!\n", __func__);
-	}
+	rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
+	if (!rc)
+		rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
+	if (rc)
+		pr_err("%s: failed to configure ABE DPLL!\n", __func__);
 
 	return 0;
 }

Cheers
Jon

#3 lore raw

PATCH v2 1/2 ARM: OMAP4: clock data: Lock ABE DPLL on all revisions

Quoted 10 lines · Jon Hunter
Quoted 6 lines · Peter Ujfalusi

To avoid issues with audio caused by non locked ABE DPLL we should make sure it is locked in all OMAP4 revisions.

asda d

Not sure what the above is ;-)

Argh, squashed patches without commit message cleanup...
Paul: can you fix this up, or should I resend?

Quoted 36 lines
Quoted 20 lines
---
 arch/arm/mach-omap2/cclock44xx_data.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/cclock44xx_data.c +1 -5
index 5789a5e..a2cc046 100644
@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void)
 	 * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power
 	 * state when turning the ABE clock domain. Workaround this by
 	 * locking the ABE DPLL on boot.
+	 * Lock the ABE DPLL in any case to avoid issues with audio.
 	 */
-	if (cpu_is_omap446x()) {
-		rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
-		if (!rc)
-			rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
-		if (rc)

arch/arm/mach-omap2/cclock44xx_data.c int __init omap4xxx_clk_init(void) · line 2038

Quoted 10 lines
arch/arm/mach-omap2/cclock44xx_data.c +5 -2
-			pr_err("%s: failed to configure ABE DPLL!\n", __func__);
-	}
+	rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
+	if (!rc)
+		rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
+	if (rc)
+		pr_err("%s: failed to configure ABE DPLL!\n", __func__);
 
 	return 0;
 }

Cheers
Jon

Signature · 1 line
P?ter
maintainer
#4 lore raw

PATCH v2 1/2 ARM: OMAP4: clock data: Lock ABE DPLL on all revisions

Quoted 6 lines · Peter Ujfalusi
Quoted 5 lines · Jon Hunter
Quoted 3 lines · Peter Ujfalusi

To avoid issues with audio caused by non locked ABE DPLL we should make sure it is locked in all OMAP4 revisions.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

asda d

Not sure what the above is ;-)

Argh, squashed patches without commit message cleanup...
Paul: can you fix this up, or should I resend?

No worries, I'll fix it up here :-)

- Paul

#5 lore raw

PATCH v2 1/2 ARM: OMAP4: clock data: Lock ABE DPLL on all revisions

In reply to Jon Hunter
Quoted 10 lines · Jon Hunter
Quoted 6 lines · Peter Ujfalusi

To avoid issues with audio caused by non locked ABE DPLL we should make sure it is locked in all OMAP4 revisions.

asda d

Not sure what the above is ;-)

And there I was, thinking it was referring to a chain of UK supermarkets. :)

#6 lore raw

PATCH v2 2/2 ARM: OMAP4: hwmod_data: Correct IDLEMODE for McPDM

In reply to Peter Ujfalusi

McPDM need to be configured to NO_IDLE mode when it is in used otherwise vital clocks will be gated which results 'slow motion' audio playback.

---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +1 -1
index 129d508..584acf9 100644
@@ -2133,7 +2133,7 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
 	 * available, so it doesn't seem that we have any choice in
 	 * the kernel other than to avoid resetting it.
 	 */
-	.flags		= HWMOD_EXT_OPT_MAIN_CLK,
+	.flags		= HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
 	.mpu_irqs	= omap44xx_mcpdm_irqs,
 	.sdma_reqs	= omap44xx_mcpdm_sdma_reqs,
 	.main_clk	= "mcpdm_fck",
Signature · 1 line
1.8.0.2