Hi,

On Sat, Jun 05, 2010 at 02:05:50, Brian Niebuhr wrote:
> > >> >> This patch causes that the sound can not work normally 
> > on OMAP_L138.
> > >> <snip>
> > >> After revert it, the audio works fine.
> > >> 
> > >
> > > This patch works fine on DM644x which has McBSP but breaks 
> > audio on OMAP L138
> > > (as you had mentioned) which has McASP. Ideally McBSP/McASP 
> > should start after
> > > EDMA is started. If not then this patch clears the EDMA 
> > event which is actually
> > > set by McBSP/McASP. As this patch is working fine on 
> > DM644x, I think there is
> > > some issue in the audio driver which needs to be debugged.
> > 
> > In the mean time, I think it makes sense to revert $SUBJECT patch in
> > davinci git until the audio driver is debugged.
> 
> Kevin - 
> 
> What is the process or timeline for getting this patch reapplied?  I am
> working right now on resubmitting my patch for the Davinci SPI driver,
> however that driver won't work as is without this patch.  I could
> probably hack something into the SPI driver to compensate, however if
> all are agreed that drivers shouldn't rely on DMA events that occur
> before the DMA is started, then it seems better to handle the issue in
> the DMA driver as I did in the reverted patch.
> 

I debugged this further today and I noticed that the issue of audio not
playing was observed only on DA830 and DA850 but not on DM6467 which also
has McASP. The only difference between McASP present on DM6467 and DA8XX
was hardware FIFO support. So when I disabled hardware FIFO on DA8XX devices,
even with this patch, audio started working correctly. Debugging further, I
found that, after doing FIFO configurations, FIFO was being enabled in
davinci_hw_common_param() function of sound/soc/davinci/davinci-mcasp.c file.
This was causing an extra McASP EDMA event to occur which was getting cleared
during edma_start(). This resulted in a state where EDMA was waiting for an
EDMA event from McASP, but the event which was already there, had got cleared.
Following patch fixes this issue.

===
diff --git a/sound/soc/davinci/davinci-mcasp.c 
b/sound/soc/davinci/davinci-mcasp.c
index 79f0f4a..d395509 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -612,7 +612,6 @@ static void davinci_hw_common_param(struct 
davinci_audio_dev *dev, int stream)
                                                                NUMDMA_MASK);
                mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
                                ((dev->txnumevt * tx_ser) << 8), NUMEVT_MASK);
-               mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, FIFO_ENABLE);
        }

        if (dev->rxnumevt && stream == SNDRV_PCM_STREAM_CAPTURE) {
@@ -623,7 +622,6 @@ static void davinci_hw_common_param(struct 
davinci_audio_dev *dev, int stream)
                                                                NUMDMA_MASK);
                mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
                                ((dev->rxnumevt * rx_ser) << 8), NUMEVT_MASK);
-               mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, FIFO_ENABLE);
        }
 }
===

I'll be submitting this patch to the list soon.

Regards,
Sudhakar


_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to