[alsa-devel] [PATCH] ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal
Mark Brown
broonie at kernel.org
Mon Apr 27 21:38:14 CEST 2015
On Mon, Apr 27, 2015 at 09:22:43PM +0200, Lars-Peter Clausen wrote:
> On 04/27/2015 08:28 PM, Mark Brown wrote:
> >On Mon, Apr 27, 2015 at 12:44:25PM +0200, Lars-Peter Clausen wrote:
> >>This patch makes the FLAG_NO_RESIDUE internal and no longer allows audio
> >>controller drivers to manually set the flag. If a DMA driver against
> >>expectations does not support reporting its capabilities for now the generic
> >>DMAengine PCM driver will now emit a warning and simply assume that residue
> >>reporting is not supported. In the future this might be changed to aborting
> >>with an error.
> >I'm not sure it's ever going to buy us anything to error out on stuff,
> >it's not like the no residue case doesn't need to be supported anyway
> >for controllers that just can't do it.
> I'm not too sure about it either. Since it is prone to race-conditions by
> design we'd ideally eventually drop support for the fallback period counting
> mechanism in the PCM driver altogether and instead the period counting would
> be done at the DMAengine layer. At the DMAengine layer the period counting
> can usually be implemented without any race conditions and other DMAengine
> clients will also benefit from it.
Indeed, it would be much better to handle things like this further down
the stack - if we do then probably this will take care of itself anyway
since we'll always have something reported.
> A good start might be to emit a warning when we have to do this in the PCM
> driver to at least make sure that new platforms do this properly.
Yes. It might also encourage people to update their platforms.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150427/34236f51/attachment.sig>
More information about the Alsa-devel
mailing list