All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules
@ 2009-11-26 13:18 Peter Ujfalusi
  2009-12-07 13:38 ` Peter Ujfalusi
  2009-12-09 23:38 ` Kevin Hilman
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2009-11-26 13:18 UTC (permalink / raw)
  To: linux-omap; +Cc: khilman, tony

Wake-up from McBSP ports are needed, especially when the THRESHOLD
dma mode is in use for audio playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
 arch/arm/mach-omap2/pm34xx.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 81ed252..6b17647 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -878,12 +878,16 @@ static void __init prcm_setup_regs(void)
 	/* Enable wakeups in PER */
 	prm_write_mod_reg(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 |
-			  OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3,
+			  OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3 |
+			  OMAP3430_EN_MCBSP2 | OMAP3430_EN_MCBSP3 |
+			  OMAP3430_EN_MCBSP4,
 			  OMAP3430_PER_MOD, PM_WKEN);
 	/* and allow them to wake up MPU */
 	prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2 | OMAP3430_EN_GPIO3 |
 			  OMAP3430_GRPSEL_GPIO4 | OMAP3430_EN_GPIO5 |
-			  OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3,
+			  OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3 |
+			  OMAP3430_EN_MCBSP2 | OMAP3430_EN_MCBSP3 |
+			  OMAP3430_EN_MCBSP4,
 			  OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
 
 	/* Don't attach IVA interrupts */
-- 
1.6.5.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCHv2 0/5] FIFO caused playback delay (latency) handling in soc/omap
@ 2010-03-03 13:08 Peter Ujfalusi
  2010-03-03 13:08 ` [PATCH] OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules Peter Ujfalusi
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Ujfalusi @ 2010-03-03 13:08 UTC (permalink / raw)
  To: broonie, tony; +Cc: alsa-devel, linux-omap, lrg, jhnikula, ext-eero.nurkkala

Hello,

Changes since the RFC round on the alsa-devel list:
- core is not limiting the query for the delay to the playback stream.
  It is no the dai and platform driver's responsibility handle that
- delay interface added for platform driver
- Capture path delay calculation is added to OMAP McBSP.
- omap_mcbsp_get_tx_buffstat renamed as omap_mcbsp_get_tx_delay to reflect what
  it is actually doing.

Tony: is it still possible to get this taken for 2.6.34? It would be nice to
avoid cross tree problems during the 34 cycle...

The initial RFC patch description:

There has been discussion in alsa-devel in this subject several times,
but no actual patches has been sent (it was not soc related, but anyway it was
discussed).

Based on the available information the latency caused by the HW buffer
on some systems can be handled by updating the runtime->delay.

It has been discussed, that the runtime->delay can also be updated
dynamically to show more accurate delay.

To further complicate things, in ASoC we could have more buffer in the
chain. To handle this we need soc level support.

This series tries to do that in soc by:
- introducing a pcm_pointer wrapper
- in this wrapper we call the original pcm_pointer functions to get the
  DMA pointer
- introducing a new interface in dai_ops and for platfrom drivers to ask the
  delay
- adding the cpu_dai, codec_dai and platform driver returned delay to form
  the actual delay
- update the runtime->delay with this value.

With this approach none of the existing drivers need change, but they
can add support for specifying the FIFO caused delay.

In this series on top of the core changes the omap(3) code is updated
to take this delay reporting into use.
I have not added the support to the tlv320dac33 codec driver, since it
needs a bit more work, but along the same line it can be done, and if
the tlv320dac33 is hooked to omap McBSP than applications can know the
whole delay/latency on that path.

The series is based on linux-omap master branch (with regcache and sidetone).
However the first 3 patch for soc core applies on top of sound-2.6 topic/asoc
cleanly as well.
Obviously the last patch depends on the OMAP platform patch.

---
Peter Ujfalusi (5):
  ASoC: core: fix tailing whitespace in soc_pcm_apply_symmetry
  ASoC: core: soc level wrapper for pcm_pointer callback
  ASoC: core: Add delay operation to snd_soc_dai_ops
  OMAP3: McBSP: Add interface for FIFO caused delay query
  ASoC: OMAP3: Report delay caused by the internal FIFO

 arch/arm/plat-omap/include/plat/mcbsp.h |    6 +++
 arch/arm/plat-omap/mcbsp.c              |   55 +++++++++++++++++++++++++++++++
 include/sound/soc-dai.h                 |    6 +++
 include/sound/soc.h                     |    7 ++++
 sound/soc/omap/omap-mcbsp.c             |   26 ++++++++++++++
 sound/soc/soc-core.c                    |   39 +++++++++++++++++++++-
 6 files changed, 137 insertions(+), 2 deletions(-)


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

end of thread, other threads:[~2010-03-03 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-26 13:18 [PATCH] OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules Peter Ujfalusi
2009-12-07 13:38 ` Peter Ujfalusi
2009-12-07 21:34   ` Tony Lindgren
2009-12-09 23:38 ` Kevin Hilman
2010-03-03 13:08 [PATCHv2 0/5] FIFO caused playback delay (latency) handling in soc/omap Peter Ujfalusi
2010-03-03 13:08 ` [PATCH] OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules Peter Ujfalusi
2010-03-03 14:08   ` Peter Ujfalusi
2010-03-03 14:46   ` Jarkko Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.