新手玩家,入门教程,记录学习,qcc3056的模拟输入是有检测脚的(低电平有效),本教程让模拟输入一直处于激活状态,当然也可以硬件将检测脚接地。教程简单,实际删除两处代码即可。
测试平台大概说明下, mde2.6 adk toolkit 1.2.9.25 ADK-21.1-CS-r00073.2
1. 新建宏定义(非必须) 
2. 屏蔽aux输入刷新检测 void WiredAudioDetect_HandleMessage(Task task, MessageId id, Message message)
{
UNUSED(task);
UNUSED(message);
switch (id)
{
case MESSAGE_PIO_CHANGED:
{
/* Process PIO events from PIO monitor only when monitoring is enabled */
if(IsPioMonitorEventsAllowed())
{
#ifdef WIRED_ALWAYS
if(wiredAudioChanged((const MessagePioChanged *)message))
WiredAudioSource_UpdateClient();
#endif
}
}
break;
default:
break;
}
}

3. 默认开启aux激活状态 bool WiredAudioDetect_StartMonitoring(void)
{
bool status = FALSE;
wiredAudioSourceTaskData *sp = WiredAudioSourceGetTaskData();
if(Line_In_Ready())
{
sp->allow_pio_monitor_events = TRUE;
status = TRUE;
/* A wired device already plugged in */
#ifdef WIRED_ALWAYS
//if(IsLineInAvailable(sp))
#endif
{
/* Set the mask correctly */
wiredAudioDetect_SetMask(WIRED_AUDIO_SOURCE_LINE_IN);
/* Send a WIRED_AUDIO_CONNECT_IND message to clients */
WiredAudioSource_SendStatusMessage(TRUE,audio_source_line_in);
}
}
return status;
}

|