mirror of
https://github.com/rvtr/twl_wrapsdk.git
synced 2025-10-31 06:11:10 -04:00
I2Si_InitからCDC_Initを呼ばないように変更
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/twl_wrapsdk/trunk@269 4ee2a332-4b2b-5046-8439-1ba90f034370
This commit is contained in:
parent
df35ad2d38
commit
99160420da
@ -44,18 +44,20 @@ static void I2Si_Init(void)
|
|||||||
|
|
||||||
reg_SND_POWCNT |= REG_SND_POWCNT_SPE_MASK;
|
reg_SND_POWCNT |= REG_SND_POWCNT_SPE_MASK;
|
||||||
|
|
||||||
|
/* CODEC独立運動
|
||||||
|
|
||||||
if ((reg_CFG_CLK & REG_CFG_CLK_SND_MASK) == 0)
|
if ((reg_CFG_CLK & REG_CFG_CLK_SND_MASK) == 0)
|
||||||
{
|
{
|
||||||
// initialize codec with enabling I2S
|
// initialize codec with enabling I2S
|
||||||
CDC_Init();
|
CDC_Init();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
reg_CFG_TWL_EX |= REG_CFG_TWL_EX_I2S_MASK;
|
reg_CFG_TWL_EX |= REG_CFG_TWL_EX_I2S_MASK;
|
||||||
if (reg_CFG_TWL_EX & REG_CFG_TWL_EX_I2S_MASK)
|
if (reg_CFG_TWL_EX & REG_CFG_TWL_EX_I2S_MASK)
|
||||||
{
|
{
|
||||||
isTwl = TRUE;
|
isTwl = TRUE;
|
||||||
// Set default values
|
// Set default values
|
||||||
I2S_SetSamplingRatio(TRUE);
|
// I2S_SetSamplingRatio(TRUE); 勝手に48kにされたら困る
|
||||||
I2S_SetMixingRatio(8);
|
I2S_SetMixingRatio(8);
|
||||||
I2S_Mute(FALSE);
|
I2S_Mute(FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,9 +76,13 @@ void MICi_Start( MICSampleRate smp, u32 dmaNo, void *dest, s32 size )
|
|||||||
MICi_ExDmaRecvAsync( dmaNo, dest, size );
|
MICi_ExDmaRecvAsync( dmaNo, dest, size );
|
||||||
|
|
||||||
OS_SetIrqFunction( OS_IE_DMA4 << ch, MICi_ExDmaInterruptHandler );
|
OS_SetIrqFunction( OS_IE_DMA4 << ch, MICi_ExDmaInterruptHandler );
|
||||||
|
|
||||||
reg_OS_IF = (OS_IE_DMA4 << ch);
|
reg_OS_IF = (OS_IE_DMA4 << ch);
|
||||||
reg_OS_IE |= (OS_IE_DMA4 << ch); // enable mic dma interrupt
|
reg_OS_IE |= (OS_IE_DMA4 << ch); // enable mic dma interrupt
|
||||||
|
/*
|
||||||
|
OS_SetIrqFunction( OS_IE_MIC, MICi_FifoInterruptHandler );
|
||||||
|
reg_OS_IF2 = (OS_IE_MIC >> 32);
|
||||||
|
reg_OS_IE2 |= (OS_IE_MIC >> 32); // disable mic fifo interrupt
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +195,17 @@ void MICi_ExDmaInterruptHandler( void )
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
void MICi_FifoInterruptHandler( void )
|
void MICi_FifoInterruptHandler( void )
|
||||||
{
|
{
|
||||||
// OS_TPrintf( "X" );
|
|
||||||
|
/*
|
||||||
|
// 本当はDMAを停止してからFIFOをクリアした方がいいらしい
|
||||||
|
|
||||||
|
// マイクディゼーブル
|
||||||
|
reg_SND_MICCNT &= (u16)(~REG_SND_MICCNT_E_MASK);
|
||||||
|
// FIFO & エラーフラグクリア
|
||||||
|
reg_SND_MICCNT |= REG_SND_MICCNT_FIFO_CLR_MASK;
|
||||||
|
// マイクイネーブル
|
||||||
|
reg_SND_MICCNT |= (u16)(REG_SND_MICCNT_E_MASK);
|
||||||
|
*/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
MICWork *wp = &micWork;
|
MICWork *wp = &micWork;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user