change i2s dma ch

This commit is contained in:
林辉辉
2010-06-03 09:20:47 +00:00
committed by 黄涛
parent 61e31cbfb9
commit 8f976bc2ad
2 changed files with 8 additions and 2 deletions

View File

@@ -69,14 +69,14 @@ static struct rockchip_dma_client rockchip_dma_client_in = {
static struct rockchip_pcm_dma_params rockchip_i2s_pcm_stereo_out = {
.client = &rockchip_dma_client_out,
.channel = RK28_DMA_CH2, ///0, //DMACH_I2S_OUT,
.channel = RK28_DMA_CH4, ///0, //DMACH_I2S_OUT,
.dma_addr = RK2818_I2S_PHYS + I2S_TXR_BUFF,
.dma_size = 4,
};
static struct rockchip_pcm_dma_params rockchip_i2s_pcm_stereo_in = {
.client = &rockchip_dma_client_in,
.channel = RK28_DMA_CH2, ///1, //DMACH_I2S_IN,
.channel = RK28_DMA_CH5, ///1, //DMACH_I2S_IN,
.dma_addr = RK2818_I2S_PHYS + I2S_RXR_BUFF,
.dma_size = 4,
};

View File

@@ -294,6 +294,12 @@ static int rockchip_pcm_hw_params(struct snd_pcm_substream *substream,
prtd->params->client, prtd->params->channel);
ret = request_dma(prtd->params->channel, "i2s"); ///prtd->params->client->name);
if(ret){
for(prtd->params->channel=5;prtd->params->channel>0;prtd->params->channel--){
ret = request_dma(prtd->params->channel, "i2s");
if(!ret)break;
}
}
if (ret) {
DBG(KERN_ERR "failed to get dma channel\n");
return ret;