Diff for /wikisrc/tutorials/how_to_add_usb_audio_to_the_nslu2.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:55:21 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 ##  Configure and build the kernel  ##  Configure and build the kernel
   
 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.  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. 
   
   
 Create the kernel configuration file:  Create the kernel configuration file: 
          
     $ echo 'include "arch/evbarm/conf/NSLU2"' >NSLU2_AUDIO      $ echo 'include "arch/evbarm/conf/NSLU2"' >NSLU2_AUDIO
     $ echo 'uaudio* at uhub? port ? configuration ?' >>NSLU2_AUDIO      $ echo 'uaudio* at uhub? port ? configuration ?' >>NSLU2_AUDIO 
     $ echo 'audio* at uaudio?' >>NSLU2_AUDIO      $ echo 'audio* at uaudio?' >>NSLU2_AUDIO 
     $ echo 'config netbsd-aud-npe0 root on npe0 type nfs' >>NSLU2_AUDIO      $ echo 'config netbsd-aud-npe0 root on npe0 type nfs' >>NSLU2_AUDIO
     $ echo 'config netbsd-aud-sd0 root on sd0a type ffs' >>NSLU2_AUDIO      $ echo 'config netbsd-aud-sd0 root on sd0a type ffs' >>NSLU2_AUDIO
     $ echo 'config netbsd-aud-sd1 root on sd1a type ffs' >>NSLU2_AUDIO      $ echo 'config netbsd-aud-sd1 root on sd1a type ffs' >>NSLU2_AUDIO
          
   
 Build as described in the above link, except change the final build command line to:  Build as described in the above link, except change the final build command line to: 
          
     $ ./build.sh -u -U -m evbarm -a armeb -V KERNEL_SETS=NSLU2_AUDIO release      $ ./build.sh -u -U -m evbarm -a armeb -V KERNEL_SETS=NSLU2_AUDIO release
          
   
 ##  Boot the kernel  ##  Boot the kernel
   
 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.  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. 
          
     uhub0 at usb1: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1          uhub0 at usb1: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1    
     uhub0: 2 ports with 2 removable, self powered                                        uhub0: 2 ports with 2 removable, self powered                                   
     uhub1 at usb2: vendor 0x1033 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1          uhub1 at usb2: vendor 0x1033 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1    
     uhub1: 5 ports with 5 removable, self powered                                        uhub1: 5 ports with 5 removable, self powered                                   
     uhub2 at usb0: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1          uhub2 at usb0: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1    
     uhub2: 3 ports with 3 removable, self powered                                        uhub2: 3 ports with 3 removable, self powered                                   
     ehci0: handing over full speed device on port 1 to ohci0                              ehci0: handing over full speed device on port 1 to ohci0                        
     uaudio0 at uhub2 port 1 configuration 1 interface 0: C-Media INC. USB Sound Device, rev 1.10/0.10, addr 2                                                            uaudio0 at uhub2 port 1 configuration 1 interface 0: C-Media INC. USB Sound Device, rev 1.10/0.10, addr 2                                                       
     uaudio0: audio rev 1.00                                                              uaudio0: audio rev 1.00                                                         
     audio0 at uaudio0: full duplex, independent                                          audio0 at uaudio0: full duplex, independent                                     
     uhub3 at uhub1 port 2: vendor 0x0409 product 0x005a, class 9/0, rev 2.00/1.00, addr 2      uhub3 at uhub1 port 2: vendor 0x0409 product 0x005a, class 9/0, rev 2.00/1.00, addr 2
          
   
 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.  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. 
   
 ##  Add the device entry in /dev  ##  Add the device entry in /dev
   
 As root, enter the following:  As root, enter the following: 
          
     # cd /dev      # cd /dev
     # ./MAKEDEV audio      # ./MAKEDEV audio
          
   
 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.  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. 
   

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb