From: 林辉辉 Date: Thu, 3 Jun 2010 09:20:47 +0000 (+0000) Subject: change i2s dma ch X-Git-Tag: firefly_0821_release~11415 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8f976bc2adf534fd2afe0fc48d7c301978841ae2;p=firefly-linux-kernel-4.4.55.git change i2s dma ch --- diff --git a/sound/soc/rk2818/rk2818_i2s.c b/sound/soc/rk2818/rk2818_i2s.c index cba0e83f84f0..2c49febc5319 100755 --- a/sound/soc/rk2818/rk2818_i2s.c +++ b/sound/soc/rk2818/rk2818_i2s.c @@ -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, }; diff --git a/sound/soc/rk2818/rk2818_pcm.c b/sound/soc/rk2818/rk2818_pcm.c index 5d2519cdf030..827d810aac08 100755 --- a/sound/soc/rk2818/rk2818_pcm.c +++ b/sound/soc/rk2818/rk2818_pcm.c @@ -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;