New To Ubuntu

Monday, July 30, 2007

Xbox TV Output is Black and White

My xbox's EPPROM probably was damaged, so when I boot the linux up with TV output, it will set the output to PAL-Bridage mode. To fix this, with kernel 2.6, I need following in linuxboot.cfg:

video=xboxfb:640x480, tv=NTSC

Xbox Sound Card under Linux 2.6 Kernel

My Xbox's sound card works fine under 2.4 Kernel. However, after upgrading to 2.6 kernel, (I followed this wiki), dmesg give this error when the Xbox powers up:

ALSA /var/tmp/portage/media-sound/alsa-driver-1.0.14_rc2-r1/work/alsa-driver-1.0
.14rc2/pci/ac97/ac97_codec.c:2042: AC'97 0 does not respond - RESET
Intel ICH: probe of 0000:00:06.0 failed with error -13

After some googling, this news thread provides the solution:

First you have to use kernel's alsa driver, instead of emerging alsa-driver.

Then find

sound/pci/ac97/ac97_codec.c

in your kernel source, and undo the comment for the following:
  if (!ac97_is_audio(ac97) && !ac97_is_modem(ac97)) {
- /* PATCH FOR XBOX */
- /* <--delete this!!
if (!(ac97->scaps & (AC97_SCAP_SKIP_AUDIO|AC97_SCAP_SKIP_MODEM)))
snd_printk(KERN_ERR "AC'97 %d access error (not audio or modem codec)\n", ac97->num);
snd_ac97_free(ac97);
return -EACCES;
- */ <--delete this!!
}

Labels:

Sunday, July 15, 2007

Xbox remote under Gentoo

I have a cheap after-market Xbox DVD remote, which I bought from ebay. Because it has wrong manufacture and device ID (both are ffff), the remote will be recognized as a game pad. For 2.4 Kernel, this web page provides are solution (http://www.xbox-linux.org/wiki/LIRC).

For 2.6 kernel, there is a similar work around, but you have to do some patching yourself. There's a patch for app-misc/lirc package, /usr/portage/app-misc/lirc/files/lirc-0.8.1-atiusb-xbox.diff

At line 46, change

+#define VENDOR_MS1 0x040b

To

+#define VENDOR_MS1 0xffff


At line 55, change

+ { USB_DEVICE(VENDOR_MS1, 0x6521) }, /* Gamester Xbox DVD Movie Playback$

to

+ { USB_DEVICE(VENDOR_MS1, 0xffff) }, /* Gamester Xbox DVD Movie Playback$


Then

# emerge app-misc/lirc

The remote will work.

To verify, use lirc's tool "mode2"

#mode2

And then press some buttons on your remote, there should be some hex codes output to your terminal.

At this time, the /etc/lircd.conf may not work out of box. To verify, use lirc's tool "irw"
#irw

If it can tell you correctly which button you have pressed, then you are fine. Otherwise, you have to use "irrecord" to make a lircd.con by yourself.

Labels: