PASDK-477:Merge remote-tracking branch 'origin/dev_pasdk_qin_dtsx' into pasdk_frank_p...
authorFrank Livingston <frank-livingston@ti.com>
Tue, 5 Dec 2017 22:03:13 +0000 (16:03 -0600)
committerFrank Livingston <frank-livingston@ti.com>
Tue, 5 Dec 2017 22:03:13 +0000 (16:03 -0600)
1  2 
pasdk/common/aspDecOpCircBuf_common.h
pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

Simple merge
index 434bc9b11a818d9e9d88607067414731185c3a8c,3f0b688248644b2e81c1f8a7a49bff043bf1ef1c..45a59506304401b62495336cbfe04f50860ebe75
@@@ -858,18 -880,27 +892,27 @@@ Int cbWriteAf
              Cache_wb(pAfCb->pafPrivateMetadata, pAfWrt->numPrivateMetadata*sizeof(PAF_PrivateMetadata *), Cache_Type_ALLD, 0);
              Cache_wait();
              // write back PCM data
-             for (i = 0; i < pCb->maxAFChanNum; i++)
-             {
- #ifndef DTS_BUILD
-             if ((streamMask >> i) & 0x1)
- #endif
-             {//DTSX needs up to 16 channels to transfer metadata.
-                     Cache_wb(pAfCb->data.sample[i], pAfWrt->sampleCount * sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
-                 }
-             }
+                       if (pAfCb->bsMetadata_type == PAF_bsMetadata_DTS_X)
+                       {       
+                               //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
+                               for (i = 0; i < pAfWrt->data.nChannels; i++)
+                               { 
+                                       Cache_wb(pAfCb->data.sample[i], pAfWrt->sampleCount * sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
+                               }
+                       }
+                       else 
+                       {
+                               for (i = 0; i < pCb->maxAFChanNum; i++)
+                               {
+                                       if ((streamMask >> i) & 0x1)
+                                       {
+                                               Cache_wb(pAfCb->data.sample[i], pAfWrt->sampleCount * sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
+                                       }
+                               }
+                       }
              Cache_wait();
  
 -#if 0 // (***) FL: shows timing of CB write
 +#if 0 // also for CB_RW_OP_CAP_PP (***) FL: shows timing of CB write
              // debug
              {
                  static Uint8 toggleState = 0;