All of lore.kernel.org
 help / color / mirror / Atom feed
* safe support for rewind in ALSA
@ 2010-02-01 17:20 pl bossart
  2010-02-01 18:00 ` Jaroslav Kysela
  2010-02-01 18:01 ` Mark Brown
  0 siblings, 2 replies; 40+ messages in thread
From: pl bossart @ 2010-02-01 17:20 UTC (permalink / raw)
  To: alsa-devel, Kai Vehmanen

All,
I'd like to reopen a thread on concerns with the current
implementation of rewind in ALSA. This was already discussed on the
mailing list last year without any progress.
(see  http://thread.gmane.org/gmane.linux.alsa.devel/65759/focus=65773
and http://article.gmane.org/gmane.linux.alsa.devel/66902)

The problem is that snd_pcm_rewind() allows in theory to go back to
the next sample to be rendered. This however isn't possible on any
existing hardware. DMAs do prefetch samples ahead of time, and output
interfaces have FIFOs on top of this.
This isn't too bad in the PC world with HDAudio, since the prefetching
is limited. However in the embedded space it has become a headache. To
reduce power consumption, most of the recent embedded interfaces do
embed some local internal memory (5kB for TI's McBSP3, a lot more for
others), and we should provide a means for driver developers to set a
bound on how much can be rewound safely when power-saving features are
enabled.

Note that there already are a set of definitions for FIFOs, but they
are either obsolete or no one uses them (actually HDAudio makes use of
this value internally in azx_dev but doesn't export it).

My suggestion would be to add a 'fifo' parameter to the runtime
structure (so that it's visible to the core), let the driver developer
fill the value in the .open routine, and use this parameter in rewind
to prevent rewinding too much. This parameter would include both
hardware FIFOs and DMA buffers.

Comments welcome.
- Pierre

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

end of thread, other threads:[~2010-05-04  2:38 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-01 17:20 safe support for rewind in ALSA pl bossart
2010-02-01 18:00 ` Jaroslav Kysela
2010-02-01 22:40   ` pl bossart
2010-02-03  2:20     ` Raymond Yau
2010-02-03 18:03       ` Kai Vehmanen
2010-02-03 20:52     ` Kai Vehmanen
2010-02-03 22:57       ` pl bossart
2010-02-08  1:22         ` Raymond Yau
2010-02-02  2:53   ` Raymond Yau
2010-02-06 11:59   ` Raymond Yau
2010-02-17 15:30     ` Lennart Poettering
2010-02-18  1:31       ` Raymond Yau
2010-02-18  2:33         ` Lennart Poettering
2010-02-18  3:21           ` Raymond Yau
2010-02-01 18:01 ` Mark Brown
2010-02-01 18:05   ` Jaroslav Kysela
2010-02-01 21:28     ` Kai Vehmanen
2010-02-01 21:54       ` Kai Vehmanen
2010-02-08 22:59         ` Raymond Yau
2010-02-09 20:54           ` Kai Vehmanen
2010-02-10 13:19             ` Raymond Yau
2010-02-10 13:36               ` Clemens Ladisch
2010-02-11  6:52                 ` Raymond Yau
2010-02-11  7:20                   ` Clemens Ladisch
2010-02-11  7:27                     ` Jaroslav Kysela
2010-02-15  3:03                       ` Raymond Yau
2010-02-17 15:46                         ` Lennart Poettering
2010-02-21 10:35                         ` Kai Vehmanen
2010-02-22  9:07                           ` Raymond Yau
     [not found]                           ` <20100221203500.GH31800@tango.0pointer.de>
2010-02-22 19:15                             ` semantics of SNDRV_PCM_INFO_BATCH (was: Re: safe support for rewind in ALSA) Kai Vehmanen
2010-02-23  7:02                               ` Raymond Yau
2010-02-23  2:37                           ` safe support for rewind in ALSA Raymond Yau
2010-02-23  2:44                           ` Raymond Yau
2010-02-17 15:42                       ` Lennart Poettering
2010-02-21 10:06                       ` Kai Vehmanen
     [not found]                         ` <20100221202144.GG31800@tango.0pointer.de>
2010-05-04  2:31                           ` Raymond Yau
2010-02-17 15:39                   ` Lennart Poettering
2010-02-17 15:36               ` Lennart Poettering
2010-02-17 15:35           ` Lennart Poettering
2010-02-01 22:10       ` Kai Vehmanen

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.