Annotation of wikisrc/tutorials/how_to_add_usb_audio_to_the_nslu2.mdwn, revision 1.1
1.1 ! mspo 1: ## Configure and build the kernel
! 3: See [[How to install NetBSD on the Linksys NSLU2 (Slug) without a serial port, using NFS and telnet]] for more instructions on building and installing kernels/NetBSD on the NSLU2.
! 6: Create the kernel configuration file:
! 8: $ echo 'include "arch/evbarm/conf/NSLU2"' >NSLU2_AUDIO
! 9: $ echo 'uaudio* at uhub? port ? configuration ?' >>NSLU2_AUDIO
! 10: $ echo 'audio* at uaudio?' >>NSLU2_AUDIO
! 11: $ echo 'config netbsd-aud-npe0 root on npe0 type nfs' >>NSLU2_AUDIO
! 12: $ echo 'config netbsd-aud-sd0 root on sd0a type ffs' >>NSLU2_AUDIO
! 13: $ echo 'config netbsd-aud-sd1 root on sd1a type ffs' >>NSLU2_AUDIO
! 16: Build as described in the above link, except change the final build command line to:
! 18: $ ./build.sh -u -U -m evbarm -a armeb -V KERNEL_SETS=NSLU2_AUDIO release
! 21: ## Boot the kernel
! 23: Use tftp to load the kernel as described in the link above. You should see the following lines (or something similar) in your dmesg or console output. The order of the lines may be slightly different. You may not see anything about "uhub3" unless you have an external hub.
! 25: uhub0 at usb1: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
! 26: uhub0: 2 ports with 2 removable, self powered
! 27: uhub1 at usb2: vendor 0x1033 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
! 28: uhub1: 5 ports with 5 removable, self powered
! 29: uhub2 at usb0: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
! 30: uhub2: 3 ports with 3 removable, self powered
! 31: ehci0: handing over full speed device on port 1 to ohci0
! 32: uaudio0 at uhub2 port 1 configuration 1 interface 0: C-Media INC. USB Sound Device, rev 1.10/0.10, addr 2
! 33: uaudio0: audio rev 1.00
! 34: audio0 at uaudio0: full duplex, independent
! 35: uhub3 at uhub1 port 2: vendor 0x0409 product 0x005a, class 9/0, rev 2.00/1.00, addr 2
! 38: Note in particular the line that says "ehci0: handing over full speed device on port 1 to ohci0." The NetBSD USB ehci driver can not handle isochronous devices (required for audio), but the ohci driver can. Unfortunately, it also appears that NetBSD can not handle an attached hub with the ohci driver, so you can't plug the USB audio device into a hub - it must be plugged directly into one of the two USB ports on the back of the device.
! 40: ## Add the device entry in /dev
! 42: As root, enter the following:
! 44: # cd /dev
! 45: # ./MAKEDEV audio
! 48: You should now be able to play music to /dev/audio. If you want to play mp3 files, I recommend using _madplay_, which can be added using packages.
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb