added TVout DPMS function: at this time only completely disables output when non-TVout mode is selected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14391 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2e2bd87511
commit
d6d450e124
@ -1211,6 +1211,48 @@ static uint8 BT_read_monstat(uint8* monstat)
|
||||
return stat;
|
||||
}//end BT_read_monstat.
|
||||
|
||||
static uint8 BT_dpms(bool display)
|
||||
{
|
||||
uint8 stat;
|
||||
|
||||
uint8 buffer[3];
|
||||
|
||||
LOG(4,("Brooktree: setting DPMS: "));
|
||||
|
||||
/* reset status */
|
||||
i2c_flag_error (-1);
|
||||
|
||||
/* shutdown all analog electronics... */
|
||||
buffer[0] = si->ps.tv_encoder.adress + WR;
|
||||
/* select first TV config register to write */
|
||||
buffer[1] = 0xba;
|
||||
if (display)
|
||||
{
|
||||
/* enable all DACs */
|
||||
buffer[2] = 0x00;
|
||||
LOG(4,("display on\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* shutdown all DACs */
|
||||
buffer[2] = 0x10;
|
||||
LOG(4,("display off\n"));
|
||||
}
|
||||
|
||||
i2c_bstart(si->ps.tv_encoder.bus);
|
||||
i2c_writebuffer(si->ps.tv_encoder.bus, buffer, 3);
|
||||
i2c_bstop(si->ps.tv_encoder.bus);
|
||||
/* log on errors */
|
||||
stat = i2c_flag_error(0);
|
||||
if (stat)
|
||||
{
|
||||
LOG(4,("Brooktree: I2C errors occurred while setting DPMS\n"));
|
||||
return stat;
|
||||
}
|
||||
|
||||
return stat;
|
||||
}//end BT_dpms.
|
||||
|
||||
static uint8 BT_killclk_blackout(void)
|
||||
{
|
||||
uint8 stat;
|
||||
@ -1291,6 +1333,9 @@ static uint8 BT_killclk_blackout(void)
|
||||
return stat;
|
||||
}
|
||||
|
||||
/* shutdown all analog electronics */
|
||||
stat = BT_dpms(false);
|
||||
|
||||
return stat;
|
||||
}//end BT_killclk_blackout.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user