ADK2.0 教程

ADK2.0教程

==========DFU功能==========

①利用Headset Configuation Tool工具,配置进入DFU模式事件;

②在烧写程序前,在工程的.psr文件中加入以下代码:

// --------MODE0--------------------------------------------------------

// BOOTMODE_KEY_LIST_0: Overwrite :

// HOST_INTRFACE (1F9)

// VM_DISABLE (25D)

// USB_VM_CONTROL (3C0)

// USB PRODUCT ID (01be)

&04B0 = 01F9 025D 03C0 02bf 03b5

//

// BOOTMODE_KEY_TABLE_0+0: PSKEY_HOST_INTERFACE = USB &04B8 = 0002

// BOOTMODE_KEY_TABLE_0+1: PSKEY_VM_DISABLE = TRUE

&04B9 = 0001

// BOOTMODE_KEY_TABLE_0+3: PSKEY_USB_VM_CONTROL = false &04BA = 0000

// BOOTMODE_KEY_TABLE_0+4: USB PID = 0xffff (DFU)

&04BB = ffff

// BOOTMODE_KEY_TABLE_0+5: Initial STate of PIO pins (LEDS on)

&04BC = 0804 0804 0804 0000

③安装蓝牙USB驱动软件InstallBlueSuite2_4.exe。

④在C盘利用dfu.bat 将image.fs 转成stack.dfu。

⑤利用DFUWizard工具升级程序。

==========AAC功能==========

①在工程中添加项目:aac_decoder.xip;

②在工程的headset.mak文件中加入以下代码:

image/aac_decoder/aac_decoder.kap :

$(mkdir) image/aac_decoder

$(copyfile) ..\..\kalimba\apps\a2dp_headset\image\aac_decoder\aac_decoder.kap $@ image.fs : image/aac_decoder/aac_decoder.kap

③利用Headset Configuation Tool工具,使能AAC功能位。

==========Aptx功能==========

①在工程中添加项目:aptx_decoder.xip;

②在工程的headset.mak文件中加入以下代码:

image/aptx_decoder/aptx_decoder.kap :

$(mkdir) image/aptx_decoder

$(copyfile) ..\..\kalimba\apps\a2dp_headset\image\aptx_decoder\aptx_decoder.kap $@ image.fs : image/aptx_decoder/aptx_decoder.kap

③利用Headset Configuation Tool工具,使能Aptx功能位。

④利用PSTool工具,在User DSP configuation data 20中填入Aptx License。该测试License对应的蓝牙地址为0002 5b 00ff01 ~ 0002 5b 00ff05。

==========CVC功能==========

①利用PSTool工具,在User DSP configuation data 48填上CVC License;

②利用Headset Configuation Tool工具,在选项Input/Output中配置Mic的正确驱动IO口;

③利用Headset Configuation Tool工具,在选项Feature中配置正确的Audio Plugin。(PSKEY_USR15 Word4 D[10:8])

==========USB Audio功能==========

①在headset.xiw工程中,将Project Properties 的Transport项目选择USB VM;

在Define symbols打开ENABLE_USB、ENABLE_USB_AUDIO、INSTALL_USB_MS_README。

②利用PSTool工具,修改Host interface的选项为USB link(默认为UART link running BCSP)。

③利用PSTool工具,修改VM application will supply USB descriptors选项为True。

④利用PSTool工具,修改USB product identifier 选项为1243;修改USB product string 选项为CSR USB HS ;修改USB serial number string 选项为ABCDEF0123456789。

Vendor id 0a12 0000

⑤在BC05蓝牙模块中,利用Headset Configuation Tool工具,修改USB Config页下的Class Of Device选项为Speaker Audio;

若所用的蓝牙模块的CSR8670,则该项可选Microphone Audio、Speaker Audio、Battery Charging、Mass Storage、Consumer Transport Control。

⑥USB vendor identifier 应设置成0000(默认为0a12)

==========Voice Prompts功能==========

①在Headset Configuation Tool工具的V oice Prompts选项中,Storage Source选择FileSystem,添加相应的事件和声音文件。

②点击Create V oice Prompts保存提示音所在位置。

③重新烧录程序。

==========RSSI功能==========

①在Headset Configuation Tool工具User Events选项中,配置进入RSSI Pairing 事件。

②在HFP Features选项中,配置RSSI参数,参考如下:

==========Siri功能==========

①在Headset Configuation Tool中使能V oice Dial事件。

\

②使能

==========Multipoint功能==========

①Headset应用程序中,在EventPowerOn事件下,使能Multipoint(configManagerEnableMultipoint(TRUE);)功能。

==========Three Way Calling功能==========

①使能下图的Three Way Calling

②使能

==========WBS功能==========

==========EQ调试==========

==========AVRCP:VLH_BI_02测试Fail ==========修改库avrcp_absolute_volume.c 如下图:

==========充电iPhone电量指示条不准确==========①配置PSKEY,禁用温度检测

②修改函数

void powerBatteryHandleVoltageReading(uint16 reading)

{

uint8 old_level = powerBatteryGetV oltageLevel();

uint8 new_level;

if(POWER_INIT_GET(power_init_vbat))

{

power->vbat = reading;

#if 0 /*xiaoyu*/

switch(power->chg_state)

{

case power_charger_disconnected:

case power_charger_disabled:

/*V oltage should always decrease when not charging*/

if( reading < power->vbat )

power->vbat = reading;

break;

default:

/*V oltage should always increase when charging*/

if( reading > power->vbat )

power->vbat = reading;

break;

}

#endif

new_level = powerBatteryGetV oltageLevel();

/* Send indication if the battery level changed */

if(new_level != old_level)

{

powerBatterySendV oltageInd();

}

}

这一段屏蔽掉就ok了

==========使能位NREC ==========

If your Bluetooth product using CVC or other 3rd party noise & echo cancellation, you must turn on the “NREC” option on the configuration tool. Please see the attached picture.

When you tick this “NREC” option, it means your Bluetooth product will send a command to the connected mobile for asking the mobile to turn off her own noise & echo function.

If you don’t tick the “NREC” option, some mobile, such as iPhone, will continue on it nois e & echo function. This will make both your speaker’s CVC and the noise & echo function of the mobile function at the same time. For our initial testing, it wi ll make the CVC not well!

==========ADK2.0在BC5上耗电问题==========

①打开配置工具,禁用内部充电

==========修改AAC易断开问题==========

①完善AAC补丁

②Clean Libraries from Command Line。(若命令出错则替换pauseerror.exe)

C:\ADK2.0\src\kalimba> C:\ADK2.0\tools\bin\pauseonerror.exe C:\ADK2.0\tools\bin\make.exe -R BLUELAB=C:\ADK2.0\tools clean

③Rebuild Libraries from Command Line。

C:\ADK2.0\src\kalimba> C:\ADK2.0\tools\bin\pauseonerror.exe C:\ADK2.0\tools\bin\make.exe -R BLUELAB=C:\ADK2.0\tools \"TARGET_CORES=gordon elvis\" LIB_SET=sdk all

④Rebuild Kalimba Application

==========播放音乐时连续播放VP死机==========

①在播放VP前断开Audio

if(theHeadset.sco_sink)

{

theHeadset.sco_sink=0;

AudioDisconnect();

}

②修改库csr_voice_prompts.c文件CsrV oicePromptsPluginStopPhrase

extern void audioHandleRouting ( void );

void CsrV oicePromptsPluginStopPhrase ( void )

{

Sink lSink;

Task taskdata = NULL;

if(!phrase_data)

Panic();

PRINT(("VP: Terminated\n"));

switch(phrase_data->decompression)

{

case voice_prompts_codec_ima_adpcm:

case voice_prompts_codec_none:

if(GetCurrentDspStatus())

{

lSink = StreamKalimbaSink(TONE_VP_MIXING_DSP_PORT);

/* reset the volume levels of the dsp plugin */

if(GetAudioPlugin())

MessageSend( GetAudioPlugin(), AUDIO_PLUGIN_RESET_VOLUME_MSG, 0 ) ;

}

else

{

lSink = StreamAudioSink(AUDIO_HARDW ARE_CODEC,AUDIO_INSTANCE_0, (phrase_data->stereo ? AUDIO_CHANNEL_A_AND_B : AUDIO_CHANNEL_A));

}

/* Cancel all the messages relating to VP that have been sent */

taskdata = MessageSinkTask(lSink, NULL);

PRINT(("VP: SinkTask now NULL was %x\n",(uint16)taskdata));

MessageCancelAll((TaskData*) &csr_voice_prompts_plugin, MESSAGE_STREAM_DISCONNECT);

/* Disconnect PCM source/sink */

StreamDisconnect(StreamSourceFromSink(lSink), lSink);

SinkClose(lSink);

break;

#ifdef INSTALL_DSP_VP_SUPPORT

case voice_prompts_codec_sbc:

case voice_prompts_codec_mp3:

case voice_prompts_codec_aac:

/* Cancel all the messages relating to VP that have been sent */

(void)MessageKalimbaTask(NULL);

MessageCancelAll((TaskData*) &csr_voice_prompts_plugin, MESSAGE_FROM_KALIMBA);

/* Disconnect PCM sources/sinks */

lSink = StreamAudioSink(AUDIO_HARDW ARE_CODEC,AUDIO_INSTANCE_0, AUDIO_CHANNEL_A);

StreamDisconnect(StreamSourceFromSink(lSink), lSink);

SinkClose(lSink);

if(phrase_data->stereo)

{

lSink = StreamAudioSink(AUDIO_HARDWARE_CODEC,AUDIO_INSTANCE_0, AUDIO_CHANNEL_B);

StreamDisconnect(StreamSourceFromSink(lSink), lSink);

SinkClose(lSink);

}

/* PCM connected to kalimba, make sure prompt source is disconnected */

StreamDisconnect(phrase_data->source, NULL);

KalimbaPowerOff();

break;

#endif

default:

break;

}

/* Make sure prompt source is disposed */

if(SourceIsValid(phrase_data->source))

StreamConnectDispose(phrase_data->source);

/* Tidy up */

free(phrase_data);

phrase_data = NULL;

SetAudioBusy(NULL) ;

SetVpPlaying(FALSE);

audioHandleRouting(); }

相关主题
相关文档
最新文档