Re: [RFC 1/2] ASoC: dmaengine-pcm: Add support for querying DMA capabilities
From: Lars-Peter Clausen
Date: Mon Jul 15 2013 - 14:20:38 EST
On 07/15/2013 07:57 PM, Mark Brown wrote:
On Mon, Jul 15, 2013 at 10:27:21PM +0530, Vinod Koul wrote:
On Mon, Jul 15, 2013 at 06:26:43PM +0100, Mark Brown wrote:
On Mon, Jul 15, 2013 at 06:42:10PM +0200, Lars-Peter Clausen wrote:
+ hw.period_bytes_min = 16;
+ hw.period_bytes_max = dma_caps.max_sg_len;
We can't read the minimum period size from dmaengine? Seems like
something might have a restriction other than 16 bytes here.
max would be how many list items the engine supports so queried therotical min
would be 1 byte, not sure how 16 bytes is assumed above but my guess is that if
engine is able to push min burst lengths which would be 1 and give you
interrupt. But seriously, that would not be practical. So this should be a
realistic limit which system can cope with.
Right, we probably want to set an artificial floor here but it still
seems like we should be checking that the device actually supports this.
If the hardware can only support 64 bytes then the above code won't work
properly.
It shouldn't be to hard to extend the dma_caps API with a min_sg_len. But is
this something you've actually seen in existing hardware for that the driver
would make use of the dmaengine PCM framework? If it is more of theoretical
nature we can still easily add it later if it becomes necessary.
That said it is not uncommon that the segment size needs to be a multiple of
the burst size. Adding support for that is still on my TODO list but will
require some changes to some of the existing users, since implementing this
will be a lot easier if all users use the snd_dmaengine_dai_dma_data struct for
their DAI DMA data.
- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/