FYI: USB audio
TAMURA Kent <[email protected]> Mon, 12 Aug 2002 23:48:48 +0900 (JST)
| Newsgroups | gmane.os.netbsd.ports.playstation2 |
|---|---|
| Message-ID | <[email protected]> |
This is an instruction to make USB audio work on NetBSD/playstation2. 1. Apply a patch to sys/arch/playstation2/playstation2/conf.c and etc/etc.playstation2/MAKEDEV. 2. Add the following to a kernel config file. # USB audio uaudio* at uhub? port ? configuration ? audio* at uaudio? 3. Rebuild the kernel and reboot. 4. Go to /dev, and "./MAKEDEV audio" 5. Plug an USB audio device, and enjoy. The sound had little noise even for playing 16bit PCM wav. I'm not sure what caused the problem (USB driver? USB audio driver? CPU power? NFS root?). -- TAMURA Kent <[email protected]> <[email protected]> Index: conf.c =================================================================== RCS file: /cvsroot/syssrc/sys/arch/playstation2/playstation2/conf.c,v retrieving revision 1.4 diff -u -u -r1.4 conf.c --- conf.c 2002/07/19 16:38:22 1.4 +++ conf.c 2002/08/12 14:35:42 @@ -140,6 +140,9 @@ #include "clockctl.h" cdev_decl(clockctl); +#include "audio.h" +cdev_decl(audio); + struct bdevsw bdevsw[] = { bdev_swap_init(1,sw), /* 0: swap pseudo-device */ @@ -205,6 +208,7 @@ #else cdev_notdef(), /* 39: system call tracing */ #endif + cdev_audio_init(NAUDIO,audio), /* 40: /dev/audio */ }; static int chrtoblktbl[] = { @@ -250,6 +254,7 @@ /* 37 */ NODEV, /* 38 */ NODEV, /* 39 */ NODEV, + /* 40 */ NODEV, }; /* Index: MAKEDEV =================================================================== RCS file: /cvsroot/basesrc/etc/etc.playstation2/MAKEDEV,v retrieving revision 1.18 diff -u -u -r1.18 MAKEDEV --- MAKEDEV 2002/08/09 02:39:29 1.18 +++ MAKEDEV 2002/08/12 14:36:17 @@ -108,6 +108,7 @@ makedev ipl makedev tun0 tun1 makedev md0 + makedev audio makedev usbs makedev clockctl makedev systrace @@ -132,6 +133,14 @@ fi ;; +audio) + makedev audio0 audio1 audio2 audio3 + ln -fs sound0 sound + ln -fs audio0 audio + ln -fs mixer0 mixer + ln -fs audioctl0 audioctl + ;; + ramdisk) makedev md0 ;; @@ -331,6 +340,22 @@ mknod ipstate c 23 2 mknod ipauth c 23 3 chmod 600 ipl ipnat ipstate ipauth + ;; + +audio*) + unit=${i#audio} + audio=audio$unit + sound=sound$unit + mixer=mixer$unit + major=40 + audioctl=audioctl$unit + if [ "$unit" = "" ]; then unit=0; fi + rm -f $audio $sound $mixer $audioctl + mknod $sound c $major $(($unit + 0)) + mknod $audio c $major $(($unit + 128)) + mknod $mixer c $major $(($unit + 16)) + mknod $audioctl c $major $(($unit + 192)) + chmod 666 $audio $sound $mixer $audioctl ;; random)