apologies for taking so long to follow up on this but between hand limits 
and must-do work, I only just got back to it today.
---eric


At 05:23 PM 4/19/2001 -0700, Dmitri wrote:
>Quoting Eric S. Johansson <[EMAIL PROTECTED]>:
>a) load module "audio.o"
>b) plug the microphone in
>c) point your audio software to /dev/audio.

did that and got some interesting results (see further down)


>That's it. In case of problems you always can test the thing by
>
>$ od -t x2 < /dev/audio
>
>which should print 16-bit numbers that change as you speak. IIRC,
>they are signed short integers.

when I tried this test from /dev/audio, what I saw was a bunch of ff7f/ff80 
type numbers with no audio input.  Speaking did not give me a large range 
of numbers but that's probably just an artifact of the default volume 
setting.  The first byte never changed from ff.  Doing a little snooping, I 
discovered that the OSS sound driver for my laptop soundcard is probably an 
8-bit driver.

So I try the same test on /dev/audio1 and I get very different numbers 
looking like 8080 7f80 807f and other things looking like it's just two 
samples.  Am I getting messed up by the built-in driver forcing the USB 
driver to 8-bit?

captured audio data; no audio:

0000000 8080 8080 8080 8080 8080 8080 7f80 7f7f
0000020 7f7f 7f80 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f
0000040 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f 7f7f

capture audio data; talking real loud:

0022460 7376 7576 7c72 8580 9592 9395 7d8b 6671
0022500 575a 625b 7e6e 8f88 8e92 7e85 7578 827a
0022520 988b a7a2 a8a9 859f 6b7c 594d 5754 8473
0022540 a08b 9ba6 8f9c 7a84 7374 6e6d 6d72 7a70
0022560 8177 8e8f 9b97 8b93 7281 5e67 5a59 6e5f
0022600 8477 8f8f 888e 747d 7270 8579 9d93 aca7
0022620 a9aa 83a1 6d79 5545 5152 8773 a891 a1af
0022640 8ea1 7380 6a69 6763 6e71 8476 8c82 949a
0022660 9799 7e89 6572 5a5d 625b 7b6b 8c83 8b91
0022700 7b85 6b71 766e 9283 a69d abab a8aa 7897

an unrelated problem seems to be that the built-in audio somehow seems to 
turn on the built-in microphone and I get this nice little feedback loop 
between the built-in microphone and the built-in speakers.

in another message you wrote:

>The audio stack (soundcore IIRC) allocates devices sequentially,
>in order they are requested by device drivers. If I plug my
>audio stuff into notebook with built-in sound then it appears
>as /dev/audio1 because sound starts up very early. However if
>I stop everything with /etc/rc.d/init.d/alsasound stop
>and replug my audio board it appears as /dev/audio. If then I
>will restart ALSA the internal sound chip will be /dev/audio1.

I'm wondering if I should go through the hassle of trying to build ALSA 
into the system (remember, I have limited hand use)or just going with the 
for fee OSS drivers.  I'm also having trouble with getting the mixers to 
work with the USB device.  They only want to work with the built-in device.

>By the way, /dev/audio should be a link to /dev/audio0, so you
>can simply change it to point to -any- device node. You also are
>free to rename device nodes in any way you like because drivers
>open them by device numbers (see Documentation/devices.txt) but
>programs open them by name. That's why symlinks work.

turns out it's not a soft link.  It's an actual device.  I probably could 
get away with renaming it /dev/audio0 and doing the soft link trick.

[root@ccd /root]# ls -l /dev/audio* /dev/dsp*
crw-------    1 esj      sys       14,   4 Aug 24  2000 /dev/audio
crw-------    1 esj      sys       14,  20 Aug 24  2000 /dev/audio1
crw-------    1 esj      sys       14,   7 Aug 24  2000 /dev/audioctl
crw-------    1 esj      sys       14,   3 Aug 24  2000 /dev/dsp
crw-------    1 esj      sys       14,  19 Aug 24  2000 /dev/dsp1
crw-------    1 esj      root      55,   0 Aug 24  2000 /dev/dsp56k

I also don't understand why they are owned by me instead of audio or 
something else.

here some snippets from the logs and the various USB device files.

/var/log/messages

May 12 12:54:31 ccd kernel: usb.c: registered new driver audio
May 12 12:54:31 ccd kernel: usbaudio: device 2 audiocontrol interface 0 has 
1 input and 0 output AudioStreaming interfaces
May 12 12:54:31 ccd kernel: usbaudio: device 2 interface 1 altsetting 0 
does not have an endpoint
May 12 12:54:31 ccd kernel: usbaudio: device 2 interface 1 altsetting 1: 
format 0x00000010 sratelo 8000 sratehi 48000 attributes 0x01
May 12 12:54:31 ccd kernel: usbaudio: constructing mixer for Terminal 2 
type 0x0101
May 12 12:54:31 ccd kernel: usbaudio: workaround for broken Philips Camera 
Microphone descriptor enabled
[root@ccd /root]#

[root@ccd /root]# cat /proc/bus/usb/devices
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=fce0
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0556 ProdID=0001 Rev= 0.01
S:  Manufacturer=AKM
S:  Product=AK5370
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 90mA
I:  If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=audio
I:  If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=audio
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=81(I) Atr=01(Isoc) MxPS= 100 Ivl=  1ms
[root@ccd /root]#

[root@ccd /root]# cat /proc/bus/usb/drivers
          audio
          hub
          usbdevfs

[root@ccd /root]# more /etc/modules.conf
alias parport_lowlevel parport_pc
alias usb-controller usb-uhci
alias sound-slot-0 opl3sa2
alias midi opl3
options sound dmabuf=1
options mpu401 io=0x330
options sb io=0x220 irq=9 dma=0 dma16=7 mpu_io=0x330
options opl3 io=0x388
options opl3sa2 mss_io=0x530 irq=9 dma=0 dma2=7 mpu_io=0x330 io=0x380




_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to