1
0
Fork 0
forked from len0rd/rockbox

Fix the short audio dropout at disk spinup from power-off on portalplayer targets (observed on Mini G2, probably affected others as well).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17426 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2008-05-08 21:36:50 +00:00
parent 21a3733888
commit 8291cd76de

View file

@ -1022,7 +1022,15 @@ static int ata_power_on(void)
int rc;
ide_power_enable(true);
sleep(HZ/50); /* allow voltage to build up */
sleep(HZ/4); /* allow voltage to build up */
/* Accessing the PP IDE controller too early after powering up the disk
* makes the core hang for a short time, causing an audio dropout. This
* also depends on the disk; iPod Mini G2 needs at least HZ/5 to get rid
* of the dropout. Since this time isn't additive (the wait_for_bsy() in
* ata_hard_reset() will shortened by the same amount), it's a good idea
* to do this on all HDD based targets. */
if( ata_hard_reset() )
return -1;
@ -1235,7 +1243,7 @@ int ata_init(void)
if (!ide_powered()) /* somebody has switched it off */
{
ide_power_enable(true);
sleep(HZ/50); /* allow voltage to build up */
sleep(HZ/4); /* allow voltage to build up */
}
/* first try, hard reset at cold start only */