1 May
2015
1 May
'15
1:17 p.m.
On Thu, Apr 30, 2015 at 12:07:29PM +0800, Jun Nie wrote:
+static const struct snd_pcm_hardware snd_zx_hardware = {
- .info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_RESUME |
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
- .period_bytes_min = 32,
- .period_bytes_max = 16 * 1024,
- .periods_min = 2,
- .periods_max = 32,
- .buffer_bytes_max = 60 * 1024,
+};
Can the generic DMA code not work this out by querying the dmaengine driver?
+int zx_pcm_platform_register(struct device *dev) +{
- return devm_snd_dmaengine_pcm_register(dev, &zx_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME |
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);
_NO_RESIDUE has been removed in current code, the core figures it out automatically. Like I said looking at the driver code I'm not clear why this is specifying _CUSTOM_CHANNEL_NAME either, it looked like the driver just used the one standard channel name.