xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Linux Device Driver For Xbox 360 Audio
xlokix
post Oct 5 2009, 02:45 AM
Post #1


X-S Enthusiast


Group: Members
Posts: 22
Joined: 24-March 05
Member No.: 208554



For those that don't already know.. The linux Audio device driver for Xbox 360 was released. Here's a C/P of JC4360 post from xboxhacker.net.

jc4360 wrote:

I am releasing the first version of linux device driver for xbox 360 audio. you can get source from here: http://www.megaupload.com/?d=SVAUYFBL. The device driver is alsa compitable, so basically you can compile mplayer and then it should play various music formats for you easily. It supports both analog stereo and digital spdif (only dobly digital by now). Thanks for tmbinc for his finding on 360 audio hardware details and his help on debuging the code. The license for the code is GPL.

In order to compile it, you will need to properly edit sound/pci/Makefile with the following statements, and also change Kconfig if needed. do not forget to enable ALSA support in your kernel.
snd-xenon-objs := xenon_snd.o
obj-$(CONFIG_SND_XENON) += snd-xenon.o

To compile mplayer, download MPlayer-1.0rc2.tar.bz2 and edit libmpcodecs/ad_hwac3.c by applying the following patch:

CODE

--- ad_hwac3.c  1969-12-31 19:15:52.000000000 -0500
+++ ad_hwac3.c.org      1969-12-31 19:15:17.000000000 -0500
@@ -144,4 +144,17 @@
}

+static inline unsigned short bswap16(unsigned short a)
+{
+      return ((a&0xff)<<8) | ((a&0xff00)>>8);
+}
+
+static inline void mem_swap16(void *buf, int line)
+{
+    int i=0;
+    uint16_t *buf16 = (uint16_t *)buf;
+    for (i=0; i<line/2; i++)
+        buf16[i]=bswap16(buf16[i]);
+}
+
static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
{
@@ -177,4 +190,6 @@
     memset(buf + 8 + len, 0, 6144 - 8 - len);

+    mem_swap16(buf, 6144);
+
     return 6144;
   }
@@ -375,4 +390,6 @@
   memset(&buf[fsize + 8], 0, nr_samples * 2 * 2 - (fsize + 8));

+  mem_swap16(buf, nr_samples * 2 * 2);
+
   return nr_samples * 2 * 2;
}


To test:
-bash-3.2# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AudioPCI [Xenon AudioPCI], device 0: Xenon Audio [Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: AudioPCI [Xenon AudioPCI], device 1: Xenon Audio [Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0

stereo music:
./mplayer -ao alsa:device=hw=0.0 music.mp3/ape/flac/wav

digital music:
./mplayer -ao alsa:device=hw=0.1 -ac hwac3 music.ac3
./mplayer -ao alsa:device=hw=0.1 -ac hwdts music.dts



Please feel free to improve this driver for the following things:
1) Interrupt: I could not get pci interrupt to work. This driver currently uses a timer interrupt.
2) DTS passthrough: my receiver could not decode the raw dts bit stream sent by mplayer, I guess one register was not set correctly for dts passthrough. If you have a jtag setup on xbox 360 motherboard, you could help on this: put a dvd movie with dts track into 360 drive and play(check if your receiver receive dts signal), read 64 bytes from address 0xea001600 with your jtag device and then post the result here.
3) Mixer such as volumn setting etc.

The driver may not be bug free. I am not responsible for any damge that the driver may cause to your hardware, so use it at your own risk.

This post has been edited by xlokix: Oct 5 2009, 02:48 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
GOVATENT
post Oct 6 2009, 04:15 AM
Post #2


X-S Member
*

Group: Members
Posts: 81
Joined: 12-February 04
Member No.: 99619



this is cool. I have already applied the update on my console so I will have to get another one. (Which won't happen rather build a HTPC at that point) but it's great to see another step toward XBMC getting started.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
geoffmac
post Oct 6 2009, 09:12 AM
Post #3


X-S Member
*

Group: Members
Posts: 84
Joined: 21-November 03
From: UK
Member No.: 75823
Xbox Version: v1.6
360 version: v1 (xenon)



Any chance someone could do a step by step install for linux noobs like me?

I did manage to install to Debian Etch.

Just need graphics acceleration now wink.gif

Cheers and well done! pop.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
iD4rK
post Oct 6 2009, 09:15 AM
Post #4


X-S Young Member
*

Group: Members
Posts: 48
Joined: 16-January 06
Member No.: 268725
Xbox Version: v1.1
360 version: v1 (xenon)



very... VERY... NICE! rolleyes.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
DuggyUK
post Oct 6 2009, 01:16 PM
Post #5


X-S X-perience
**

Group: Members
Posts: 365
Joined: 25-November 02
Member No.: 10361
Xbox Version: v1.2
360 version: v1 (xenon)



QUOTE(geoffmac @ Oct 6 2009, 09:12 AM) *

Any chance someone could do a step by step install for linux noobs like me?

I did manage to install to Debian Etch.

Just need graphics acceleration now wink.gif

Cheers and well done! pop.gif


just follow the instructions in the first post. Basically you are recompiling kernel, and then mplayer.

What you need to do in a nut shell is get the kernel sources for your box. apply the patches as above, recompile the kernel, install.

This post has been edited by DuggyUK: Oct 6 2009, 01:23 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
geoffmac
post Oct 6 2009, 06:27 PM
Post #6


X-S Member
*

Group: Members
Posts: 84
Joined: 21-November 03
From: UK
Member No.: 75823
Xbox Version: v1.6
360 version: v1 (xenon)



QUOTE(DuggyUK @ Oct 6 2009, 01:16 PM) *

just follow the instructions in the first post. Basically you are recompiling kernel, and then mplayer.

What you need to do in a nut shell is get the kernel sources for your box. apply the patches as above, recompile the kernel, install.


Sounds easy doesnt it lol but for someone who doesnt know their way around the terminal its not obvious.

Thanks
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RRoD420
post Oct 6 2009, 07:52 PM
Post #7


X-S X-perience
**

Group: Members
Posts: 433
Joined: 5-December 07
Member No.: 365263
Xbox Version: v1.0
360 version: v4.0 (jasper)



This is truly amazing, talented fuckin people. Are these kernal updates all going to be usb updated or has to be reflashed? You know in less than 24 hours someones going to release a full kernal update for xell lol
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
DuggyUK
post Oct 7 2009, 01:30 PM
Post #8


X-S X-perience
**

Group: Members
Posts: 365
Joined: 25-November 02
Member No.: 10361
Xbox Version: v1.2
360 version: v1 (xenon)



QUOTE(geoffmac @ Oct 6 2009, 06:27 PM) *

Sounds easy doesnt it lol but for someone who doesnt know their way around the terminal its not obvious.

Thanks


No worries, happy to help. Which bit are you stuck on?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
geoffmac
post Oct 8 2009, 01:20 PM
Post #9


X-S Member
*

Group: Members
Posts: 84
Joined: 21-November 03
From: UK
Member No.: 75823
Xbox Version: v1.6
360 version: v1 (xenon)



QUOTE(DuggyUK @ Oct 7 2009, 01:30 PM) *

No worries, happy to help. Which bit are you stuck on?


lol erm exactly a step by step would help rolleyes.gif
Least then I can learn from the commands and maybe attempt something similar in the future.

And why exactly we need mplayer is that not an alternative to VLC and does that not mean only sound through mplayer? or does mplayer handle all movie decoding?

Cheers
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
HotKnife420
post Nov 15 2009, 02:28 AM
Post #10


X-S Freak
*****

Group: Members
Posts: 1195
Joined: 6-October 07
Member No.: 358415



I, too, would like a 'step by step' explanation of how to install this driver. I'd love to test it, but I must admit, I'm not very familiar with linux. Running Ubuntu 7.10 on my 360, atm.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
xlokix
post Nov 18 2009, 01:07 AM
Post #11


X-S Enthusiast


Group: Members
Posts: 22
Joined: 24-March 05
Member No.: 208554



Here's a new kernel with the xenon sound modules.

http://www.megaupload.com/?d=T6C2XXD5

Replace the vmlinux from your sata2 CD with this one. Extract the 2.6.24.3 folder in the /lib/modules directory.

Then run the command:

sudo echo "snd-xenon" > /etc/modules

Reboot.

This post has been edited by xlokix: Nov 18 2009, 01:14 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Chrisoldinho
post Nov 24 2010, 11:27 AM
Post #12


X-S Young Member
*

Group: Members
Posts: 56
Joined: 15-October 09
Member No.: 420917



QUOTE(xlokix @ Nov 18 2009, 12:07 AM) *

Here's a new kernel with the xenon sound modules.

http://www.megaupload.com/?d=T6C2XXD5

Replace the vmlinux from your sata2 CD with this one. Extract the 2.6.24.3 folder in the /lib/modules directory.

Then run the command:

sudo echo "snd-xenon" > /etc/modules

Reboot.


Hi,

Picking this thread up after a long time of inactivity...

So in effect I replace the vmlinux I use to boot the regular sata2 CD (and reburn) to launch Debian (Lenny) and once in the GUI open a terminal and type the command: sudo echo "snd-xenon" > /etc/modules after extracting the contents of the /lib/modules directory from the file uploaded.

Thanks, Chris.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Chrisoldinho
post Dec 1 2010, 06:56 PM
Post #13


X-S Young Member
*

Group: Members
Posts: 56
Joined: 15-October 09
Member No.: 420917



QUOTE(Chrisoldinho @ Nov 24 2010, 10:27 AM) *

Hi,

Picking this thread up after a long time of inactivity...

So in effect I replace the vmlinux I use to boot the regular sata2 CD (and reburn) to launch Debian (Lenny) and once in the GUI open a terminal and type the command: sudo echo "snd-xenon" > /etc/modules after extracting the contents of the /lib/modules directory from the file uploaded.

Thanks, Chris.


It's ok - working perfectly now smile.gif Loving the Ubuntu sounds, lol
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 25th May 2013 - 04:07 AM