Add Govind's changes for new HSR4/interconnect boards
authorFrank Livingston <frank-livingston@ti.com>
Fri, 9 Sep 2016 17:00:15 +0000 (12:00 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Fri, 9 Sep 2016 17:00:15 +0000 (12:00 -0500)
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/mib/mib.c
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/audio_dc_cfg.c
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/sap_d10.c

index 863869978c13b1f7675df933a13344732fad5495..7b9bc6933f9615b941c7295e5ac64f796273e8ed 100644 (file)
@@ -284,7 +284,7 @@ static const MdUns iecFrameLength[23] =
 // This is used at a couple of locations to ensure the transfer
 // size is sufficiently long to be useful.
 //#define NOMINAL_XFERSIZE         128
-#define NOMINAL_XFERSIZE         512 //GJ Debug
+#define NOMINAL_XFERSIZE         128 //GJ Debug
 
 #define min(a, b)  (((a) < (b)) ? (a) : (b))
 #define max(a, b)  (((a) > (b)) ? (a) : (b))
index 9b3d1522ed4525a5900b2fce1e497c159b31f130..d77c99cc7886b4da9fa85bdad307160c50ce2f2d 100644 (file)
@@ -384,11 +384,11 @@ void set_audio_desc(unsigned char var1,unsigned char var2,unsigned char var3,uns
 {
        int ret_val=I2C_RET_OK;
        do{ret_val=alpha_i2c_write(HSDIO_EDID_AUDIO_DESC_FORMAT(var1, var2));}while (ret_val !=I2C_RET_OK);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_EDID_AUDIO_DESC_NUM_CHANNELS(var1, var3));}while (ret_val !=I2C_RET_OK);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_EDID_AUDIO_DESC_SAMPLE_RATES(var1, var4));}while (ret_val !=I2C_RET_OK);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_EDID_AUDIO_DESC_MISC(var1, var5));}while (ret_val !=I2C_RET_OK);
        platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_ALERT(HSDIO_ALERT_INPUT_AUDIO_CHANGE_msk));}while (ret_val !=I2C_RET_OK);
@@ -402,11 +402,14 @@ void hrptredid()
        int ret_val=I2C_RET_OK;
 
        do{
-               platform_delay(10000);
+               platform_delay(1000);
                ret_val=alpha_i2c_write(HSDIO_EDID_SPEAKER_ALLOCATION_BLOCK(0xFF));
+        if (ret_val !=I2C_RET_OK)
+            i2cConfig(HSR4_I2C_PORT_NUM);        
+            
        }while (ret_val !=I2C_RET_OK);
 
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_EDID_SPEAKER_ALLOCATION_BLOCK_2(0x7));}while (ret_val !=I2C_RET_OK);
 
        set_audio_desc(0,1,2,0x7f,7);   // Stero PCM
@@ -430,7 +433,7 @@ void hrptredid()
        set_audio_desc(17,0,0,0,0);
        set_audio_desc(18,0,0,0,0);
        set_audio_desc(19,0,0,0,0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_EDID_GO);}while (ret_val !=0);
        //fclose(fp1);
 }
@@ -438,39 +441,39 @@ void hrptredid()
 void  hdmi128()
 {
                int ret_val=0;
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_MCLK_TO_HOST(HSDIO_AudioMClk_128X));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_FORMAT_TO_HOST(HSDIO_AudioFmt_I2S));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_IMPLEMENT_AUDIO_TO_HOST_CMDS);}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_PRESENT(HSDIO_AudioPresent_HAS_NO_AUDIO));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_FORMAT(HSDIO_AudioFmt_I2S));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_SAMPLE_SIZE(HSDIO_AudioSampleSize_32));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_FREQ(HSDIO_AudioFreq_48K));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_LAYOUT(HSDIO_AudioLayout_2));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_MCLK(HSDIO_AudioMClk_AUTO));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_AUX_CHANNEL_CNT(1));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_AUX_SPEAKER_MAPPING(0));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_CHSTS_PCM_PREEMPHASIS(HSDIO_CSFormatInfo_PCM_NO_PRE));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_CHSTS_COPYRIGHT(HSDIO_CSCopyright_PROTECTED));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_CHSTS_WORD_LENGTH(HSDIO_CSWordLength_24));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_OUTPUT_GO);}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_AUDIO_ROUTING(HSDIO_AudioRouting_HSDIOIN_HOSTOUT));}while (ret_val !=0);
-       platform_delay(10000);
+       platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_SYS_CFG_GO);}while (ret_val !=0);
 }
 
index 7531aa93eeccc678bbb999c5cdf07c794844cd3a..c60fe1bf12343bd55bbd5fe995817a1e4b22456f 100644 (file)
@@ -153,7 +153,7 @@ static const unsigned char clkxDivHDMI[PAF_SAMPLERATE_N] =
     0x8,  //PAF_SAMPLERATE_UNKNOWN
     0x8,  //PAF_SAMPLERATE_NONE
     0x8,  //PAF_SAMPLERATE_32000HZ
-    0x8,  //PAF_SAMPLERATE_44100HZ
+    0x2,  //PAF_SAMPLERATE_44100HZ
     0x2,  //PAF_SAMPLERATE_48000HZ
     0x4,  //PAF_SAMPLERATE_88200HZ
     0x4,  //PAF_SAMPLERATE_96000HZ