Changeset 20369


Ignore:
Timestamp:
2010-03-22T16:22:26+01:00 (8 years ago)
Author:
lars
Message:

[xburst] sound jz4740_pcm: Don't request dma channel mor then once.

It is possible that the hw_params callback is called multiple times when using
the oss emulation layer. Thus we need to check whether the dma channel has
already been requested otherwise we'll end up with all dma channels being
requested by sound driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c

    r19098 r20369  
    106106 
    107107        config = rtd->dai->cpu_dai->dma_data; 
    108         if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 
    109                 prtd->dma = jz4740_dma_request(substream, "PCM Playback"); 
    110         } else { 
    111                 prtd->dma = jz4740_dma_request(substream, "PCM Capture"); 
     108        if (!prtd->dma) { 
     109                if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 
     110                        prtd->dma = jz4740_dma_request(substream, "PCM Playback"); 
     111                else 
     112                        prtd->dma = jz4740_dma_request(substream, "PCM Capture"); 
    112113        } 
    113114 
Note: See TracChangeset for help on using the changeset viewer.