X-Git-Url: https://git.ti.com/gitweb?p=processor-sdk%2Fperformance-audio-sr.git;a=blobdiff_plain;f=processor_audio_sdk_1_00_00_00%2Fpasdk%2Ftest_dsp%2Fsap%2Faudio_dc_cfg.c;h=d77c99cc7886b4da9fa85bdad307160c50ce2f2d;hp=9b3d1522ed4525a5900b2fce1e497c159b31f130;hb=8f597045efcb9648483f5268a1546471c6704166;hpb=55b4d3914981a892fe4dd0b56c1776496e2a8528;ds=sidebyside diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/audio_dc_cfg.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/audio_dc_cfg.c index 9b3d1522..d77c99cc 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/audio_dc_cfg.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/sap/audio_dc_cfg.c @@ -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); }