Speaker output being turned off with screen blank?
Ewan Meadows
ewan.meadows at gmail.com
Wed Mar 19 01:11:06 CET 2008
After playing around with EsounD the other night I noticed that when
the framebuffer screen blank activates it causes the Speaker output to
be turned off until the screen is activated again. The headphone
output is still fine. After a quick look I noticed a few things:
from linux-2.6.x/drivers/video/ndsfb.c:469
static int ndsfb_blank(int blank_mode, struct fb_info *info)
{
if (blank_mode) {
//POWER_CR &= ~ ( POWER_2D | POWER_2D_SUB |
POWER_LCD_TOP | POWER_LCD_TOP ) ;
POWER_CR &= ~(POWER_LCD_TOP | POWER_LCD_TOP);
} else {
POWER_CR |=
(POWER_2D | POWER_2D_SUB | POWER_LCD_TOP | POWER_LCD_TOP);
}
return 0;
}
>From linux-2.6.x/include/asm/arch-nds/power.h:
#define POWER_CR (*(volatile u16*)0x04000304)
#define POWER_LCD_TOP (1<<0)
#define POWER_2D (1<<1)
#define POWER_MATRIX (1<<2)
#define POWER_3D_CORE (1<<3)
#define POWER_LCD_BOTTOM (1<<8)
#define POWER_2D_SUB (1<<9)
#define POWER_SWAP_LCDS (1<<15)
>From http://nocash.emubase.de/gbatek.htm#dspowermanagement:
4000304h - NDS9 - POWCNT1 - Graphics Power Control Register (R/W)
0 Enable Flag for both LCDs (0=Disable) (Prohibited, see notes)
1 2D Graphics Engine A (0=Disable) (Ports 008h-05Fh, Pal 5000000h)
2 3D Rendering Engine (0=Disable) (Ports 320h-3FFh)
3 3D Geometry Engine (0=Disable) (Ports 400h-6FFh)
4-8 Not used
9 2D Graphics Engine B (0=Disable) (Ports 1008h-105Fh, Pal 5000400h)
10-14 Not used
15 Display Swap (0=Send Display A to Lower Screen, 1=To Upper Screen)
4000304h - NDS7 - POWCNT2 - Sound/Wifi Power Control Register (R/W)
Bit Expl.
0 Sound Speakers (0=Disable, 1=Enable) (Initial setting = 1)
1 Wifi (0=Disable, 1=Enable) (Initial setting = 0)
2-31 Not used
Is it just me or is POWER_LCD_TOP being sent to both cpu's? I'm
pretty sure this is where the problem lies.
Cheers
Ewan
More information about the dslinux-devel
mailing list