Nk's Mono -> Stereo Patch.


Status
Not open for further replies.

ks5202

Still Fresh
Joined
Nov 14, 2005
Messages
16
put the *.gpu file in sd root.

GP2X utilty menu - *.gpu file execution.

you see a black screen for 2-seconds.

and GP2X Bulit-in[?] Speaker Change Mode [ Mono -> stereo ]
gp2xspkset.zip
----------------------------------------------
Posted By http://GPain.com
IRC.hanirc.org:6664 #GP2X - Gp2X Official IRC Channel.
 
One more supposed hardware fault shown to be down to first release firmware, things are getting batter daily. :)
 
Code:
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#include <linux/fb.h>

typedef unsigned short u16;

int  memdev;
u16  *memdd;

void gp2x_reg_init(void)
{
	memdev = open("/dev/mem", O_RDWR);
	memdd = (u16 *)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, memdev, 0xc0000000);
}

void gp2x_reg_deinit(void)
{
	close(memdev);
}

#define gp2x_reg_read(addr)         memdd[addr >> 1]
#define gp2x_reg_write(addr, data)  memdd[addr >> 1]=data

#define AC97_BASE 0x0F00

int main(void)
{
	gp2x_reg_init();

	gp2x_reg_write(0x16 + AC97_BASE, 0x830a);
	usleep(1000000);
	gp2x_reg_write(0x58 + AC97_BASE, 0x100c);
	usleep(1000000);

	gp2x_reg_deinit();

	chdir("/usr/gp2x");
	execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL);

	return 0;
}

Keypoint is OUT2 Src register in WM9711.

thanks rlyeh.
 
Thats very good news, at this rate in a couple of months time all of the GP2X's problems will have been fixed. I can't wait until I have money again.
 
Probably something that pays better than GPH ever could.

It makes one want to weep.
 
I see some people who don't even know heads from tails being made Gurus of the site, yet NK isn't made one? Instead, he is left with the title of "newbie", very appropriate.
 
NK isn't posting, I believe - that's why his username isn't NK. This very nice fellow feeding us all of NK's projects is simply a friendly Korean, who admittedly probably deserves special status.
 
Status
Not open for further replies.
Back
Top