Fixed bugs in Circular buffer.
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Wed, 5 Apr 2017 11:16:04 +0000 (16:46 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Wed, 5 Apr 2017 11:16:04 +0000 (16:46 +0530)
pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

index 7c5d0e664503fddba5c5f67cbd94f5883605d418..adf5fcfa906dcc93f7edd5bbf618efd2fd802e97 100644 (file)
@@ -282,7 +282,7 @@ Int cbWriteAf(
         }
 
         pAfCbNextAf = &pCb->afCb[nextWrtIdx]; // +1 or last AF if overflow
-        pAfCbNextAf->data.sample[0] = &pAfCb->data.sample[PAF_MAX_NUM_PRIVATE_MD - 1][pAfWrt->sampleCount];// pAfCb->data.sample[15] + (pAfCb->sampleCount * sizeof(PAF_AudioData));
+        pAfCbNextAf->data.sample[0] = &pAfCb->data.sample[pCb->maxAFChanNum - 1][pAfWrt->sampleCount];// pAfCb->data.sample[15] + (pAfCb->sampleCount * sizeof(PAF_AudioData));
 
         // write audio frame information updated by decoder
         pAfCb->sampleDecode = pAfWrt->sampleDecode;
index fe61bee72a9d3cf803019f8671dc97398fc39ab0..682536eecd403223dd420c2918a02be9d0a28586 100644 (file)
@@ -653,6 +653,10 @@ Int cbReadAf(
         // compute stream mask
         streamMask = pAfRd->fxns->channelMask(pAfRd, pAfCb->channelConfigurationStream);
 
+        // Invalidate channel pointers
+        Cache_inv(pAfCb->data.sample, pCb->maxAFChanNum*sizeof(PAF_AudioData *), Cache_Type_ALLD, 0);
+        Cache_wait();
+
         // Invalidate PCM data
         for (i = 0; i < pCb->maxAFChanNum; i++)
         {