Commit 4d704d237159801b6eb7c9213e2d390df0ec08c7

Authored by luozhesi
1 parent 8457dfec

support 44100 sample rate

... ... @@ -219,8 +219,8 @@ lib/optek_lib_freeRTOS.a
219 219 /*lib/optek_lib_freeRTOS_Debug.a*/
220 220
221 221
222   -/*lib/optek_link_5ms.a*/
223   -lib/optek_link_5ms_for_swf.a
  222 +lib/optek_link_5ms.a
  223 +/*lib/optek_link_5ms_for_swf.a*/
224 224 /*
225 225 lib/optek_link_7p5ms.a
226 226 */
... ...
... ... @@ -133,7 +133,7 @@ typedef struct{
133 133
134 134 const APP_NAV_SOURCE source_table[] =
135 135 {
136   - {MEDIA_BT_HCI,app_nav_rmt_convert_bt_hci},
  136 + //{MEDIA_BT_HCI,app_nav_rmt_convert_bt_hci},
137 137 {MEDIA_AUX,app_nav_rmt_convert_aux},
138 138 {MEDIA_OPTICAL,app_nav_rmt_convert_spdif},
139 139
... ...
... ... @@ -1857,6 +1857,7 @@ detect_enter:
1857 1857
1858 1858
1859 1859 Spdif_rcv_enable();
  1860 + uDecSend (DECODE_INIT, 0);
1860 1861 //spdif_dec_enable ();
1861 1862 }
1862 1863 else
... ...
... ... @@ -713,7 +713,7 @@ void spdif_dec_init( void )
713 713 da_pp_channel_setting(MI2S_OUTPUT_CHANNEL_DEFAULT);
714 714 #endif
715 715
716   - spdif_data_parser_init();
  716 + //spdif_data_parser_init();
717 717
718 718 codec_malloc_init ();
719 719
... ... @@ -1500,7 +1500,20 @@ void taskDec(void *pvParameters)
1500 1500 }
1501 1501
1502 1502 #ifdef OPL_MODE_SINGLE_WAY
1503   - app_change_mode_req(BC_SF48K_PT5MS,100,6);
  1503 + //app_change_mode_req(BC_SF48K_PT5MS,100,6);
  1504 +
  1505 + if (app_main_data.playing_stream_sample_rate == 48000)
  1506 + {
  1507 + app_change_mode_req(BC_SF48K_PT5MS,100,6);
  1508 + }
  1509 + else if (app_main_data.playing_stream_sample_rate == 44100)
  1510 + {
  1511 + app_change_mode_req(BC_SF44K_PT5MS,108,6);
  1512 + }
  1513 + else
  1514 + {
  1515 + DBG_Printf("optek link not support sample rate\r\n");
  1516 + }
1504 1517 #elif defined OPL_MODE_SWF
1505 1518 if (decode_type == DECODE_SBC)
1506 1519 {
... ...
... ... @@ -130,9 +130,9 @@
130 130 #define OPL_SLAVE_ENBALE
131 131
132 132 /*********Choose one*************/
133   -//#define OPL_MODE_SINGLE_WAY // use optek link lib:optek_link_5ms.a
  133 +#define OPL_MODE_SINGLE_WAY // use optek link lib:optek_link_5ms.a
134 134 //#define OPL_MODE_TWO_WAY // use optek link lib:optek_link_5ms.a
135   -#define OPL_MODE_SWF // use optek link lib:optek_link_5ms_for_swf.a
  135 +//#define OPL_MODE_SWF // use optek link lib:optek_link_5ms_for_swf.a
136 136
137 137 #if (defined OPL_MODE_TWO_WAY || (defined OPL_MODE_SINGLE_WAY && defined OPL_MASTER_ENABLE))
138 138 #define LC3_ENCODE_ENABLE
... ...
... ... @@ -79,11 +79,14 @@ void Spdif_StreamConfig( void )
79 79 AUDIO_FIFO_STREAM_CREATE(0,STREAM_LENTH_UNKNOWN,0,0);
80 80 //fifo_create_file_stream(&audio_env.stream_fifo, 0, STREAM_LENTH_UNKNOWN, 0, 0);
81 81
  82 +
  83 + spdif_data_parser_init();
  84 +
82 85 //app_main_data.playing_stream_status = STREAM_CDDA_WAIT_DATA;
83 86 app_main_data.playing_stream_status = STREAM_SPDIF_SR_DETECT ;
84 87 uDecSend (DECODE_SET, DECODE_SPDIF);
85 88
86   - uDecSend (DECODE_INIT, 0);
  89 + //uDecSend (DECODE_INIT, 0);
87 90
88 91 //app_main_data.playback_state = PLAYING_MODE_PLAY;
89 92 }
... ...
... ... @@ -493,6 +493,7 @@ void app_optek_link_role_sw(void)
493 493
494 494 //in one group, the device can opterate together, should be generated by random
495 495 const u8 optek_link_group[3] = {0x3F,0xc5,0x67};
  496 +//const u8 optek_link_group[3] = {'S',0x01,0x01};
496 497 //const u8 optek_link_group[3] = {'P',0x00,0x01};
497 498 //const u8 optek_link_group[3] = {'A',0x00,0x00};
498 499 //const u8 optek_link_group[3] = {'C',0x02,0x02};
... ...
Please register or login to post a comment