Ejemplo n.º 1
0
/*----------------------------------------------------------------------------*/
void aux_fun(void)
{
    flashled(3);
//	amp_abd(1);
    //work_mode++;
    //return ;
    input_number_en = 0;
    vol_change_en=1;
    main_menu = MENU_AUX;
    disp_port(MENU_AUX);
    amux_dsp_eq();
    SYSTEM_CLK_DIV4();
    encode_channel = REC_LINEIN;
	encode_vol = 3;
    key_table_sel(0);
    flush_all_msg();
    set_max_vol(MAX_ANOLOG_VOL,MAX_DIGITAL_VOL);///设置最大音量
    aux_main();
    main_vol_set(0, CHANGE_VOL_NO_MEM);

    break_encode();
}
Ejemplo n.º 2
0
/*----------------------------------------------------------------------------*/
void aux_main(void)
{
#ifdef AUX_DETECT_FUNC
    if(!aux_online){
		work_mode = MUSIC_MODE;
		return ;
    }
#endif

#ifdef UART_ENABLE
	deg_str("aux \n");
#endif
    aux_detect_protect(FALSE);

    set_delay_mute(DELAY_MUTE_1000MS);

    key_table_sel(SYS_DEFUALT_KEY_TABLE);
    sys_mute_flag=0;
    input_number_en = 0;
    vol_change_en=1;
    main_menu = MENU_AUX_MAIN;
    disp_port(MENU_AUX_MAIN);
    amux_dsp_eq();
    SYSTEM_CLK_DIV2();
    encode_channel = REC_LINEIN;
    encode_vol = 3;
    key_table_sel(0);
    flush_all_msg();
    set_max_vol(MAX_ANOLOG_VOL,MAX_DIGITAL_VOL);///设置最大音量
    aux_main_handlr();
	
    ext_amp_mute(MUTE);

    main_vol_set(0, CHANGE_VOL_NO_MEM);
    sys_mute_flag=0;
    break_encode();
}
/*----------------------------------------------------------------------------*/
void fm_radio(void)
{
//    printf("enter fm\n");
    //P05_source_select(P05_SEL_OSC1);
    amux_dsp_eq();

    sys_clk_div(2);//SYSTEM_CLK_DIV2();
    init_fm_rev();

    PT2313_Config(RADIO_CHAN,CHAN_ADJ);

    input_number_en = 1;
    vol_change_en=1;
    main_menu = MENU_FM_MAIN;
    key_table_sel(1);
    flush_all_msg();
    enter_fm_rev();
    disp_port(MENU_FM_MAIN);
    sys_clk_div(4);//SYSTEM_CLK_DIV4();
    set_max_vol(MAX_ANOLOG_VOL,MAX_DIGITAL_VOL);///设置最大音量
    dac_out_select(DAC_AMUX1, 0);
    encode_channel = REC_FM; 
#if ECHO_ENABLE
    encode_channel = REC_MIC ;
#endif 
    encode_vol = REC_AMUX_GAIN;
    fm_rev();
    main_vol_set(0, CHANGE_VOL_NO_MEM);
    amp_mute(1);
    alm_on_flag =0;

    fm_rev_powerdown();
    //P05_source_select(P05_SEL_IO);
    break_encode();

}