Add support for AC3 to framework
authorFrank Livingston <frank-livingston@ti.com>
Mon, 12 Sep 2016 15:18:48 +0000 (10:18 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Mon, 12 Sep 2016 15:18:48 +0000 (10:18 -0500)
processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/audioStreamDecodeProc.c
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/audio_dc_cfg.c

index 20db1fb76c982b06e1d7467e7e1d271852779ce0..301bc2e3ccc4171b08f5b973e273be72cec70e42 100644 (file)
@@ -643,7 +643,7 @@ Void taskAsdpFxn(
                         cbErrno = cbWriteAf(pCbCtl, z, pAfWrt);
                         if (cbErrno < 0)
                         {
-                            //SW_BREAKPOINT; // FL: debug
+                            SW_BREAKPOINT; // FL: debug
                             
                             if (cbErrno == ASP_DECOP_CB_WRITE_OVERFLOW)
                             {
@@ -1384,18 +1384,19 @@ Int resetAf(
     pAudioFrame->sampleCount = 0;
     pAudioFrame->data.nChannels = PAF_MAXNUMCHAN;
     
-    if (sourceSelect == PAF_SOURCE_PCM)
+    switch (sourceSelect)
     {
-        pAudioFrame->data.nSamples = FRAMELENGTH;
+        case PAF_SOURCE_PCM:
+            pAudioFrame->data.nSamples = FRAMELENGTH;
+            break;
+        case PAF_SOURCE_AC3:
+        case PAF_SOURCE_DDP:
+            pAudioFrame->data.nSamples = 1536;
+            break;
+        default:  
+            pAudioFrame->data.nSamples = FRAMELENGTH;
+            break;
     }
-    else if (sourceSelect == PAF_SOURCE_DDP)
-    {
-        pAudioFrame->data.nSamples = 1536;        
-    }
-    else
-    {
-        pAudioFrame->data.nSamples = FRAMELENGTH;
-    }   
 
     // Reset audio frame channel pointers
     for (ch=PAF_LEFT; ch < PAF_MAXNUMCHAN_AF; ch++) 
index c10f16a8971a9f0133aff818164f220848586360..42f5c5c661b30aabbbbbf16c99a13e634a1db074 100644 (file)
@@ -273,7 +273,7 @@ Int cbInitSourceSel(
             pAfCb->bsMetadata_offset   = 0;                             /* offset into audio frame for change in bsMetadata_type field */
         }
     }
-    else if (sourceSelect == PAF_SOURCE_DDP)
+    else if ((sourceSelect == PAF_SOURCE_DDP) || (sourceSelect == PAF_SOURCE_AC3))
     {
         pCb->maxNumAfCb = ASP_DECOP_CB_MAX_NUM_AF_DDP;
         // 4*256 in behind
index e1952fe9625f1bfaf6a2b95b3c02e106908a4693..58950f00c335a131af8237540f5f1dfc139318f5 100644 (file)
@@ -2418,7 +2418,7 @@ PAF_ASIT_decodeInit(
             {
                 frameLength = 256;
             }
-            else if (sourceSelect == PAF_SOURCE_DDP)
+            else if ((sourceSelect == PAF_SOURCE_DDP) || (sourceSelect == PAF_SOURCE_AC3))
             {
                 frameLength = 1536;
             }
@@ -3030,7 +3030,7 @@ PAF_ASIT_decodeDecode(
             {
                 frameLength = 256;
             }
-            else if (sourceSelect == PAF_SOURCE_DDP)
+            else if ((sourceSelect == PAF_SOURCE_DDP) || (sourceSelect == PAF_SOURCE_AC3))
             {
                 frameLength = 1536;
             }
index a23b61ef872e1d0b4896a760e4da06f873e6f157..f5c32c5bc42f721cdd5147656a1a15c105d0e724 100644 (file)
@@ -414,8 +414,8 @@ void hrptredid()
 
        set_audio_desc(0,1,2,0x7f,7);   // Stero PCM
        set_audio_desc(1,1,8,0x7f,7);   // Multi Ch PCM
-       //set_audio_desc(2,2,6,0x7,80); //AC3
-       set_audio_desc(2,0,0,0,0);          //AC3; (GJ) currently not supported
+       set_audio_desc(2,2,6,0x7,80);   //AC3
+       //set_audio_desc(2,0,0,0,0);        //AC3; (GJ) currently not supported
        set_audio_desc(3,10,8,0x07,0);  // EAC3 //DTS (3,7,6,0x1e,192)
        //set_audio_desc(4,12,8,0x7F,0);        // MLP (THD) //DTS (4,7,8,0x6,192)
        set_audio_desc(4,0,0,0,0);      // MLP (THD) //DTS (4,7,8,0x6,192) ; (GJ) currently not supported