📄 aticonfg.cpp
字号:
break;
case AUDIOSOURCE_TVAUDIO:
uchORMask |= 0x01;
break;
case AUDIOSOURCE_LINEIN:
uchORMask |= 0x00;
break;
case AUDIOSOURCE_FMAUDIO:
uchORMask |= 0x03;
default:
return( FALSE);
}
break;
case ATI_AUDIO_CONFIG_8:
switch( nAudioSource)
{
case AUDIOSOURCE_MUTE:
i2cPacket.uchChipAddress = m_uchAudioAddress;
i2cPacket.cbReadCount = 0;
i2cPacket.cbWriteCount = 5;
i2cPacket.usFlags = I2COPERATION_WRITE;
i2cPacket.puchWriteBuffer = uchWrite16Value;
//SubAddr 0x12 Reg 0x13 Val 0x3f60
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x13;
uchWrite16Value[3] = 0x3f;
uchWrite16Value[4] = 0x60;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0xD Val 0x0000
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x0d;
uchWrite16Value[3] = 0x00;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x8 Val 0x0220
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x08;
uchWrite16Value[3] = 0x02;
uchWrite16Value[4] = 0x20;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x00 Val 0x0000
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x00;
uchWrite16Value[3] = 0x00;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
break;
case AUDIOSOURCE_LINEIN:
i2cPacket.uchChipAddress = m_uchAudioAddress;
i2cPacket.cbReadCount = 0;
i2cPacket.cbWriteCount = 5;
i2cPacket.usFlags = I2COPERATION_WRITE;
i2cPacket.puchWriteBuffer = uchWrite16Value;
//SubAddr 0x10 Reg 0x30 Val 0x0000
uchWrite16Value[0] = 0x10;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x30;
uchWrite16Value[3] = 0x00;
#ifdef I2S_CAPTURE
#pragma message ("\n!!! PAY ATTENTION: Driver has been build with ITT CHIP I2S CAPTURE CONFIGURED !!!\n")
uchWrite16Value[4] = 0xe0;
#else
uchWrite16Value[4] = 0x00;
#endif
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x10 Reg 0x20 Val 0x0000
uchWrite16Value[0] = 0x10;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x20;
uchWrite16Value[3] = 0x00;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0xe Val 0x0000
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x0e;
uchWrite16Value[3] = 0x00;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x13 Val 0x3c40
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x13;
uchWrite16Value[3] = 0x3c;
uchWrite16Value[4] = 0x40;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x8 Val 0x3c40
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x08;
uchWrite16Value[3] = 0x02;
uchWrite16Value[4] = 0x20;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0xd Val 0x1900
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x0d;
uchWrite16Value[3] = 0x19;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x00 Val 0x7300
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x00;
uchWrite16Value[3] = 0x73;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
break;
case AUDIOSOURCE_TVAUDIO:
i2cPacket.uchChipAddress = m_uchAudioAddress;
i2cPacket.cbReadCount = 0;
i2cPacket.cbWriteCount = 5;
i2cPacket.usFlags = I2COPERATION_WRITE;
i2cPacket.puchWriteBuffer = uchWrite16Value;
//SubAddr 0x12 Reg 0x13 Val 0x3f60
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x13;
uchWrite16Value[3] = 0x3f;
uchWrite16Value[4] = 0x60;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0xD Val 0x0000
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x0d;
uchWrite16Value[3] = 0x00;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x10 Reg 0x30 Val 0x2003
uchWrite16Value[0] = 0x10;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x30;
uchWrite16Value[3] = 0x20;
#ifdef I2S_CAPTURE
#pragma message ("\n!!! PAY ATTENTION: Driver has been build with ITT CHIP I2S CAPTURE CONFIGURED !!!\n")
uchWrite16Value[4] = 0xe3;
#else
uchWrite16Value[4] = 0x03;
#endif
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x10 Reg 0x20 Val 0x0020
uchWrite16Value[0] = 0x10;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x20;
uchWrite16Value[3] = 0x00;
uchWrite16Value[4] = 0x20;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0xE Val 0x2403
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x0e;
uchWrite16Value[3] = 0x24;
uchWrite16Value[4] = 0x03;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x08 Val 0x0320
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x08;
uchWrite16Value[3] = 0x03;
uchWrite16Value[4] = 0x20;
bResult = pCScript->PerformI2CPacketOperation( &i2cPacket);
if(bResult)
{
if( i2cPacket.uchI2CResult != I2CSCRIPT_NOERROR)
return(FALSE);
}
else
return(FALSE);
//SubAddr 0x12 Reg 0x00 Val 0x7300
uchWrite16Value[0] = 0x12;
uchWrite16Value[1] = 0x00;
uchWrite16Value[2] = 0x00;
uchWrite16Value[3] = 0x73;
uchWrite16Value[4] = 0x00;
bResult = pCScript->PerformI2CPacketOperation( &i2cPa
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -