From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <86f1ff6a327ca01c13e9e7e5268c17c9@orthanc.cc.titech.ac.jp> To: 9fans@cse.psu.edu Subject: Re: [9fans] /dev/audio test file From: YAMANASHI Takeshi <9.nashi@gmail.com> Date: Mon, 13 Dec 2004 14:56:00 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 149047d8-eace-11e9-9e20-41e7f4b1d025 > > I will look into madplay if i can make it play 48000 Hz. > > And the other problem is that I can't change volume. : > I figured how to get it to play at 48000 Hz. I > have put the changes in location given below. Hope this solves your > problem. Hope this helps. > > Here is the link: http://www.infernopark.com/plan9/mad/mad.html Thank you very much, vdharani. With your modification, my usb speakers started to play under the correct key. But I can't set volume yet. % echo volume 0 > /dev/audioctl % madplay 01.mp3 The above still plays with the loudest volume. I attached the logs for: - usbaudio -V - usbaudio -Vd-1 -v x - usbd -dv Any suggestions are appreciated. Thanks -- ++++ usbaudio -V cpu% usb/usbaudio -V Audio output unit 1 Audio Feature Unit 13 for Playback mute control on master channel volume control on master channel Device can play to Speaker Interface 1, alt 1: stereo, 16 bits, discrete frequencies are: 48000 Playback on endpoint 6 Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead Playback speed control Playback mute control master Play Mute Unit = 13 value[0] = 0 Playback volume control master Play Volume Unit = 13 master Play Volume Unit = 13 master Play Volume Unit = 13 master Play Volume Unit = 13 Playback channels control Playback resolution control Pitch control = ON setcontrol: Play Mute Unit = 13 master Play Mute value = False of Unit 13 setcontrol: PlayVolume Unit = 13 master Volume value = -2560 of Units 13 ++++ usbaudio -Vd-1 -v x term% cpu -h kremvax cpu% bind -b '#U' /dev cpu% cd /dev/usb0 cpu% ls -l d-r-xr-xr-x U 0 sauron sauron 0 Oct 28 14:35 0 d-r-xr-xr-x U 0 sauron sauron 0 Oct 28 14:35 1 --rw-rw-rw- U 0 sauron sauron 0 Oct 28 14:35 new --rw-rw-rw- U 0 sauron sauron 0 Oct 28 14:35 port cpu% cd 1 cpu% ls ctl ep6data setup status cpu% cd cpu% usb/usbaudio -Vd-1 -v x out 5 [8] 80 06 00 01 00 00 ff 03 in 5 [18] 12 01 10 01 00 00 00 08 8c 0d 01 00 10 00 01 02 00 01 pdesc 1.-1 [18] desc 1.-1 [18] 0x01: usb (bcd)0110 class 0 subclass 0 proto 0 [0.0.0] max0 8 vendor 0xd8c product 0x1 device (bcd)0010 man 1 prod 2 serial 0 nconfig 1 out 5 [8] 80 06 00 02 00 00 ff 03 in 5 [110] 09 02 6e 00 02 01 00 80 fa 09 04 00 00 00 01 01 00 00 09 24 01 00 01 28 00 01 01 0c 24 02 01 01 01 00 02 03 00 00 00 0a 24 06 0d 01 01 03 00 00 00 09 24 03 03 01 03 00 0d 00 09 04 01 00 00 01 02 00 00 09 04 01 01 01 01 02 00 00 07 24 01 01 01 01 00 0b 24 02 01 02 02 10 01 80 bb 00 09 05 06 09 c0 00 01 00 00 07 25 01 00 00 00 00 pdesc 1.0 [110] desc 1.0 [9] 0x02: config 1: tdlen 110 ninterface 2 iconfig 0 attr 0x80 power 500mA desc 1.0 [9] 0x04: interface 0: alt 0 nept 0 class 0x1 subclass 0x1 proto 0 [audio.control.0] iinterface 0 desc 1.0 [9] 0x24: 1.1: Class-Specific AC Interface Header Descriptor AudioDeviceClass release (bcd)0100, TotalLength 40, InCollection 1 aInterfaceNr 1 1 desc 1.0 [12] 0x24: 1.1: Audio Input Terminal Descriptor bTerminalId 1, wTerminalType 0x101 (USB Streaming), bAssocTerminal 0 bNrChannels 2, wChannelConfig 0x3, iChannelNames 0 iTerminal 0 Audio output unit 1 desc 1.0 [10] 0x24: 1.1: Audio Feature Unit 13 bUnitId 13, bSourceId 1, bControlSize 1 for Playback mute control on master channel volume control on master channel Number of Play Units = 1, and consists of 1, Number of Record Units = 0, and consists of Number of masterRecAGC Units = 0, and consists of Number of masterRecMute Units = 0, and consists of Number of LRRecVol Units = 0, and consists of Number of masterPlayMute Units = 1, and consists of 13, Number of masterPlayVol Units = 1, and consists of 13, Number of LRPlayVol Units = 0, and consists of desc 1.0 [9] 0x24: 1.1: Audio Output Terminal Descriptor bTerminalId 3, wTerminalType 0x301 (Speaker), bAssocTerminal 0 bSourceId 13, iTerminal 0 Device can play to Speaker desc 1.0 [9] 0x04: interface 1: alt 0 nept 0 class 0x1 subclass 0x2 proto 0 [audio.stream.0] iinterface 0 desc 1.0 [9] 0x04: interface 1: alt 1 nept 1 class 0x1 subclass 0x2 proto 0 [audio.stream.0] iinterface 0 desc 1.0 [7] 0x24: 1.2: Audio stream for TerminalID 1, delay 1, format_tag 0x1 desc 1.0 [11] 0x24: 1.2: Interface 1, alt 1: stereo, 16 bits, discrete frequencies are: 48000 desc 1.0 [9] 0x05: addr 0x06 attrib 0x09 maxpkt 192 interval 1ms [OUT] [Iso] [Adaptive]refresh 0 synchaddress 0 desc 1.0 [7] 0x25: CS_ENDPOINT for attributes 0x0, lockdelayunits 0, lockdelay 0x0, does not have sampling-frequency control, does not have pitch control Playback on endpoint 6 findalt(0, 2, 16, 44100) failed Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead setcontrol channels: Set alt 1 out 5 [8] 01 0b 01 00 01 00 00 00 setcontrol resolution: Set alt 1 out 5 [8] 01 0b 01 00 01 00 00 00 =======Start of listing default values of feature units======= Playback speed control Playback mute control out 5 [8] a1 81 00 01 00 0d 01 00 in 5 [1] 00 master Play Mute Unit = 13 value[0] = 0 Playback volume control out 5 [8] a1 82 00 02 00 0d 02 00 in 5 [2] 00 d2 master Play Volume Unit = 13 out 5 [8] a1 83 00 02 00 0d 02 00 in 5 [2] 00 1c master Play Volume Unit = 13 out 5 [8] a1 84 00 02 00 0d 02 00 in 5 [2] 00 02 master Play Volume Unit = 13 out 5 [8] a1 81 00 02 00 0d 02 00 in 5 [2] 00 00 master Play Volume Unit = 13 Record bass control not readable Record mid control not readable Record treble control not readable Record equalizer control not readable Record agc control not readable Record delay control not readable Record bassboost control not readable Record loudness control not readable Playback channels control Playback resolution control Playback speed control not readable Playback mute control not readable Playback volume control not readable Playback bass control not readable Playback mid control not readable Playback treble control not readable Playback equalizer control not readable Playback agc control not readable Playback delay control not readable Playback bassboost control not readable Playback loudness control not readable Playback channels control not readable Playback resolution control not readable =======Start of setting values of feature units======= Configuring playback endpoint for 48000 Hz sent `ep 6 1 w 4 48000' to /dev/usb/0/ctl out 5 [9] 22 01 00 02 06 00 01 00 01 out 5 [8] a2 81 00 02 06 00 01 00 in 5 [1] 01 Pitch control = ON setcontrol: Play Mute Unit = 13 out 5 [9] 21 01 00 01 00 0d 01 00 00 out 5 [8] a1 81 00 01 00 0d 01 00 in 5 [1] 00 master Play Mute value = False of Unit 13 masterplayvol.max = 7168 masterplayvol.min = -11776 master Play volume[0] = -2304 setcontrol: PlayVolume Unit = 13 out 5 [10] 21 01 00 02 00 0d 02 00 00 f7 out 5 [8] a1 81 00 02 00 0d 02 00 in 5 [2] 00 f6 master Volume value = -2560 of Units 13 cpu% io:<-Tversion tag 65535 msize 8216 version '9P2000' io:->Rversion tag 65535 msize 4120 version '9P2000' io:<-Tattach tag 4 fid 346 afid -1 uname nashi aname io:->Rattach tag 4 qid (0000000000000000 0 d) io:<-Twalk tag 4 fid 346 newfid 347 nwname 3 0:usb0 1:1 2:ep6data io:->Rerror tag 4 ename file does not exist io:<-Twalk tag 4 fid 346 newfid 350 nwname 1 0:audio io:->Rwalk tag 4 nwqid 1 0:(0000000000000004 0 ) cpu% cpu% cat /dev/audioctl io:<-Twalk tag 2 fid 346 newfid 259 nwname 1 0:audioctl io:->Rwalk tag 2 nwqid 1 0:(0000000000000002 0 ) io:<-Topen tag 2 fid 259 mode 0 io:->Ropen tag 2 qid (0000000000000002 0 ) iounit 0 io:<-Tread tag 2 fid 259 offset 0 count 4096 io:->Rread tag 2 count 121 'speed out 48000 48000 48000 mute out 0 0 0 0 volume out -2560 -1' speed out 48000 48000 48000 mute out 0 0 0 0 volume out -2560 -11776 7168 512 channels out 2 2 2 resolution out 16 16 16 io:<-Tread tag 2 fid 259 offset 121 count 4096 io:->Rread tag 2 count 0 '' io:<-Tclunk tag 2 fid 259 io:->Rclunk tag 2 cpu% echo volume -11776 > /dev/audioctl io:<-Twalk tag 2 fid 346 newfid 259 nwname 1 0:audioctl io:->Rwalk tag 2 nwqid 1 0:(0000000000000002 0 ) io:<-Topen tag 2 fid 259 mode 17 io:->Ropen tag 2 qid (0000000000000002 0 ) iounit 0 io:<-Twrite tag 2 fid 259 offset 0 count 14 'volume -11776 ' line: volume -11776 rwrite: volume playback -11776controlproc: setcontrol out volume -11776 setcontrol: PlayVolume Unit = 0 value[0] = -2e00 value[1] = -1010102 value[2] = -1010102 value[3] = -1010102 value[4] = -1010102 value[5] = -1010102 value[6] = -1010102 value[7] = -1010102 value[8] = -1010102 io:->Rwrite tag 2 count 14 io:<-Tclunk tag 2 fid 259 io:->Rclunk tag 2 cpu% cat /dev/audioctl io:<-Twalk tag 2 fid 346 newfid 259 nwname 1 0:audioctl io:->Rwalk tag 2 nwqid 1 0:(0000000000000002 0 ) io:<-Topen tag 2 fid 259 mode 0 io:->Ropen tag 2 qid (0000000000000002 0 ) iounit 0 io:<-Tread tag 2 fid 259 offset 0 count 4096 io:->Rread tag 2 count 107 'speed out 48000 48000 48000 mute out 0 0 0 0 volume out 0 0 0 0 ' speed out 48000 48000 48000 mute out 0 0 0 0 volume out 0 0 0 0 channels out 2 2 2 resolution out 16 16 16 io:<-Tread tag 2 fid 259 offset 107 count 4096 io:->Rread tag 2 count 0 '' io:<-Tclunk tag 2 fid 259 io:->Rclunk tag 2 cpu% echo volume out 0 > /dev/audioctl io:<-Twalk tag 2 fid 346 newfid 259 nwname 1 0:audioctl io:->Rwalk tag 2 nwqid 1 0:(0000000000000002 0 ) io:<-Topen tag 2 fid 259 mode 17 io:->Ropen tag 2 qid (0000000000000002 0 ) iounit 0 io:<-Twrite tag 2 fid 259 offset 0 count 13 'volume out 0 ' line: volume out 0 rwrite: volume playback 0volume playback is not settableio:->Rerror tag 2 ename volume playback is not settable echo: write error: volume playback is not settable io:<-Tclunk tag 2 fid 259 io:->Rclunk tag 2 cpu% cat /dev/volume io:<-Twalk tag 2 fid 346 newfid 360 nwname 1 0:volume io:->Rwalk tag 2 nwqid 1 0:(0000000000000001 0 ) io:<-Topen tag 2 fid 360 mode 0 io:->Ropen tag 2 qid (0000000000000001 0 ) iounit 0 io:<-Tread tag 2 fid 360 offset 0 count 4096 io:->Rread tag 2 count 16 'speed out 48000 ' speed out 48000 io:<-Tread tag 2 fid 360 offset 16 count 4096 io:->Rread tag 2 count 0 '' io:<-Tclunk tag 2 fid 360 io:->Rclunk tag 2 cpu% echo volume 0 > /dev/volume io:<-Twalk tag 2 fid 346 newfid 360 nwname 1 0:volume io:->Rwalk tag 2 nwqid 1 0:(0000000000000001 0 ) io:<-Topen tag 2 fid 360 mode 17 io:->Ropen tag 2 qid (0000000000000001 0 ) iounit 0 io:<-Twrite tag 2 fid 360 offset 0 count 9 'volume 0 ' line: volume 0 rwrite: volume playback '0' volume playback is not settableio:->Rerror tag 2 ename volume playback is not settable echo: write error: volume playback is not settable io:<-Tclunk tag 2 fid 360 io:->Rclunk tag 2 cpu% cat /dev/audioctl io:<-Twalk tag 2 fid 346 newfid 259 nwname 1 0:audioctl io:->Rwalk tag 2 nwqid 1 0:(0000000000000002 0 ) io:<-Topen tag 2 fid 259 mode 0 io:->Ropen tag 2 qid (0000000000000002 0 ) iounit 0 io:<-Tread tag 2 fid 259 offset 0 count 4096 io:->Rread tag 2 count 107 'speed out 48000 48000 48000 mute out 0 0 0 0 volume out 0 0 0 0 ' speed out 48000 48000 48000 mute out 0 0 0 0 volume out 0 0 0 0 channels out 2 2 2 resolution out 16 16 16 io:<-Tread tag 2 fid 259 offset 107 count 4096 io:->Rread tag 2 count 0 '' io:<-Tclunk tag 2 fid 259 io:->Rclunk tag 2 cpu% echo volume out 0 > /dev/audioctl io:<-Twalk tag 2 fid 346 newfid 360 nwname 1 0:audioctl io:->Rwalk tag 2 nwqid 1 0:(0000000000000002 0 ) io:<-Topen tag 2 fid 360 mode 17 io:->Ropen tag 2 qid (0000000000000002 0 ) iounit 0 io:<-Twrite tag 2 fid 360 offset 0 count 13 'volume out 0 ' line: volume out 0 rwrite: volume playback 0volume playback is not settableio:->Rerror tag 2 ename volume playback is not settable echo: write error: volume playback is not settable io:<-Tclunk tag 2 fid 360 io:->Rclunk tag 2 cpu% pwd /usr/nashi cpu% madplay 01.mp3 io:<-Twalk tag 2 fid 346 newfid 360 nwname 1 0:volume io:->Rwalk tag 2 nwqid 1 0:(0000000000000001 0 ) io:<-Topen tag 2 fid 360 mode 0 io:->Ropen tag 2 qid (0000000000000001 0 ) iounit 0 io:<-Tread tag 2 fid 360 offset 0 count 512 io:->Rread tag 2 count 16 'speed out 48000 ' MPEG Audio Decoder version 0.11.4 (beta) - Copyright (C) 2000 Robert Leslie io:<-Twalk tag 2 fid 346 newfid 365 nwname 1 0:audio io:->Rwalk tag 2 nwqid 1 0:(0000000000000004 0 ) io:<-Tclunk tag 2 fid 365 io:->Rclunk tag 2 io:<-Twalk tag 2 fid 346 newfid 365 nwname 1 0:audio io:->Rwalk tag 2 nwqid 1 0:(0000000000000004 0 ) io:<-Tclunk tag 2 fid 365 io:->Rclunk tag 2 Title: Born in Chicago Artist: The Paul Butterfield Blues Ban Album: Blues Brothers 2000 Genre: Other Year: Track: 1 Comment: ID3: version 2.3.0, flags 0x00, size 14326 bytes Length: 185965 ID3: unhandled APIC (Attached picture): flags 0x0000, 12340 bytes Title/Songname/Content description: Born in Chicago Track number/Position in set: 1 Lead performer(s)/Soloist(s): The Paul Butterfield Blues Band Content type: Soundtrack Album/Movie/Show title: Blues Brothers 2000 read9pmsg interrupted io:<-Tclunk tag 2 fid 360 io:->Rclunk tag 2 cpu% ++++ usbd -vdf term% cpu -h kremvax cpu% bind -b '#U' /dev cpu% ls -l /dev/usb0 d-r-xr-xr-x U 0 sauron sauron 0 Oct 28 14:35 /dev/usb0/0 --rw-rw-rw- U 0 sauron sauron 0 Oct 28 14:35 /dev/usb0/new --rw-rw-rw- U 0 sauron sauron 0 Oct 28 14:35 /dev/usb0/port cpu% cpu% cpu% cpu% usb/usbd -vdf enumerate port usb0/0.1 enumerate port usb0/0.2 usbd: usb0/0: port 1 attached usb0/0.1 status 0x3 enabling port usb0/0.1 usb0/0.1 status now 0x3 usbd: usb0/0: set speed high usbd: usb0/1: set speed high pdesc 1.-1 [18] desc 1.-1 [18] 0x01: usb (bcd)0110 class 0 subclass 0 proto 0 [0.0.0] max0 8 vendor 0xd8c product 0x1 device (bcd)0010 man 1 prod 2 serial 0 nconfig 1 pdesc 1.0 [110] desc 1.0 [9] 0x02: config 1: tdlen 110 ninterface 2 iconfig 0 attr 0x80 power 500mA desc 1.0 [9] 0x04: interface 0: alt 0 nept 0 class 0x1 subclass 0x1 proto 0 [audio.control.0] iinterface 0 desc 1.0 [9] 0x24: (unknown type) 24 01 00 01 28 00 01 01 desc 1.0 [12] 0x24: (unknown type) 24 02 01 01 01 00 02 03 00 00 00 desc 1.0 [10] 0x24: (unknown type) 24 06 0d 01 01 03 00 00 00 desc 1.0 [9] 0x24: (unknown type) 24 03 03 01 03 00 0d 00 desc 1.0 [9] 0x04: interface 1: alt 0 nept 0 class 0x1 subclass 0x2 proto 0 [audio.stream.0] iinterface 0 desc 1.0 [9] 0x04: interface 1: alt 1 nept 1 class 0x1 subclass 0x2 proto 0 [audio.stream.0] iinterface 0 desc 1.0 [7] 0x24: (unknown type) 24 01 01 01 01 00 desc 1.0 [11] 0x24: (unknown type) 24 02 01 02 02 10 01 80 bb 00 desc 1.0 [9] 0x05: addr 0x06 attrib 0x09 maxpkt 192 interval 1ms [OUT] [Iso] [Adaptive]refresh 0 synchaddress 0 desc 1.0 [7] 0x25: (unknown type) 25 01 00 00 00 00 class 7 0 0x000101 class 7 6 0x000201 usbd: usb0/0.1: 1: not hub, high speed usbd: usb0/0: port 2 empty --