2009/4/14 Mark Brown broonie@sirena.org.uk
On Tue, Apr 14, 2009 at 06:17:39PM +0200, javier Martin wrote: Remove the history bit - once it's merged git will provide logs.
/* debug */ #define IMX_DEBUG 0 #if IMX_DEBUG #define dbg(format, arg...) printk(format, ## arg) #else #define dbg(format, arg...) #endif
Replace this with use of the standard pr_dbg() macro.
Do you mean that I must do:
/* debug */ #define IMX_DEBUG 0 #if IMX_DEBUG #define pr_dbg(format, arg...) printk(format, ## arg) #else #define pr_dbg(format, arg...) #endif
Or that I must use a pr_dbg macro defined elsewhere (I don't find it)?
#ifdef CONFIG_SND_SOC_MX27_SSI1
dma_request.dst_addr = (dma_addr_t) (SSI1_BASE_ADDR +
MXC_SSI1STX0); printk("dst_addr is %x\n", dma_request.dst_addr); printk("src_addr is %x\n", dma_request.src_addr); #else dma_request.dst_addr = (dma_addr_t) (SSI2_BASE_ADDR + MXC_SSI2STX0); #endif
This should be done based on the DAI used by the machine driver - look at how some of the other PCM drivers figure out which DMA parameter to use for a given stream.
Yes, you are right. I was aware of this issue. But current dai "imx-ssi.c" only exports dma data for the SDMA API used in i.mx31. So I provisionally use this trick untill I fix that in the SSI.
static int mxc_pcm_hw_free(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct mx27_runtime_data *prtd = runtime->private_data;
mxc_dma_free(prtd->dma_ch_tx); mxc_dma_free(prtd->dma_ch_rx); snd_pcm_lib_free_pages(substream); return 0;
}
This will free both TX and RX DMA channels but you only allocated one of them when the device is opened.
Man, I missed that, thanks. Do you think this could be related to the problem of not being able of having both directions working properly?