9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] /dev/audio test file
@ 2004-12-13  5:56 YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2004-12-13  5:56 UTC (permalink / raw)
  To: 9fans

> > 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
-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
  2004-12-12  8:56 YAMANASHI Takeshi
  2004-12-13  2:35 ` Kenji Okamoto
@ 2004-12-13  9:06 ` vdharani
  1 sibling, 0 replies; 11+ messages in thread
From: vdharani @ 2004-12-13  9:06 UTC (permalink / raw)
  To: 9fans

Hi,

> I will look into madplay if i can make it play 48000 Hz.
> And the other problem is that I can't change volume.
Long back Sape helped me getting Xitel Pro Hifi-Link USB audio device up
and running. But it had the same two issues you mentioned. After going
through mad player source, 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

Thanks
dharani

-------------------- Notes -------------------------------

mad player patch

In Plan 9, the output speed for some USB audio devices cannot be set to
44.1KHz. So the audio device becomes practically unusable for things like
MP3 playback. After going through mad player's code, I figured that it was
a simple (actually one-line) change to get it to run for 48KHz sampling.
With this change, mad player resamples the chunk of audio data to 48KHz
and outputs the data.

With the change in place, madplay just auto-detects (by reading
/dev/volume and finding out the speed) and enables resampling if needed.
To force resampling, use -u option.

How to build

- Download mad mp3 player from here.
- gunzip and extract the contents.
- Replace madplay.c with this version of madplay.c
- Compile and run

Here is the diff of the madplay.c file: diff.dat

I tested it with Xitel Pro Hifi-Link (to check it works) and Xitel
Hifi-Link AN1 (to check it doesnt break the code for non-48KHz devices).

Many thanks to Sape for getting the Xitel Pro Hifi-Link working on Plan 9
and helping resolve other USB issues.
...
-------------------- End -------------------------------



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
@ 2004-12-13  2:44 YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2004-12-13  2:44 UTC (permalink / raw)
  To: 9fans

On Mon Dec 13 11:33:48 JST 2004, Kenji Okamoto wrote:
> > And the other problem is that I can't change volume.
> 
> Is your USB device is only for 2 channels, means Left and Right?

Yes.  Two speakers and a usb connector.  No physical volume dial
on the spkeakers.

> By the way, Takeshi, it's good for you to use native Plan 9 machine.?

:)  I always use native p9 for servers (as, fs, cpu).
Only my terminal is running on VMware.  I need Windows
for the sake of other part of my work, though.
Naughty jobs for naughty OSes, I guess.
-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
  2004-12-12  8:56 YAMANASHI Takeshi
@ 2004-12-13  2:35 ` Kenji Okamoto
  2004-12-13  9:06 ` vdharani
  1 sibling, 0 replies; 11+ messages in thread
From: Kenji Okamoto @ 2004-12-13  2:35 UTC (permalink / raw)
  To: 9fans

> And the other problem is that I can't change volume.

Is your USB device is only for 2 channels, means Left and Right?
I now think we can devide USB audio devices into two groups,
only for stereo or for multi-channel (say 5.1 ch etc.), the former
of which may never have Master Volume, and the latter has it.
How about, Sape, to aplly this rule?

By the way, Takeshi, it's good for you to use native Plan 9 machine.☺
Howeve, yesterday was power off day here, and I experienced very
very calm my room.  Hmm, I'm living in a room filled with noisy many
PCs.

Kenji



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
@ 2004-12-12  8:56 YAMANASHI Takeshi
  2004-12-13  2:35 ` Kenji Okamoto
  2004-12-13  9:06 ` vdharani
  0 siblings, 2 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2004-12-12  8:56 UTC (permalink / raw)
  To: 9fans

I suscceeded to play the speakers but not without a few problems.
My VMware 3.2 was bad.  It doesn't support isochronous transfer.
I tried to run p9 natively on the same PC, and the usb speakers
started to play suddenly.

	cpu% usb/usbd
	cpu% usb/usbaudio -v x
	Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead

Both cat a000 and madplay 01.mp3 produced a little high pitched
music compared to the original.  That's obvious because it is
configured as 48000 Hz.

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 will plug the speakers to a tip9ug server when the above
problems are gone.  Maybe, somebody can surprise me with a
nice music. :)
-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
  2004-12-08  8:49 ` vdharani
  2004-12-08  3:46   ` Dan Cross
@ 2004-12-08 13:27   ` Sape Mullender
  1 sibling, 0 replies; 11+ messages in thread
From: Sape Mullender @ 2004-12-08 13:27 UTC (permalink / raw)
  To: 9fans

>>     % cdfs
>>     % cat /mnt/cd/a000 > /dev/audio

This should work, provided, /dev/usb?/ep?data (appropriate values for the question marks)
is bound to /dev/audio.  Make sure you run cat in the environment in which you started usbaudio



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
  2004-12-08  3:07 YAMANASHI Takeshi
  2004-12-08  6:07 ` Russ Cox
@ 2004-12-08  8:49 ` vdharani
  2004-12-08  3:46   ` Dan Cross
  2004-12-08 13:27   ` Sape Mullender
  1 sibling, 2 replies; 11+ messages in thread
From: vdharani @ 2004-12-08  8:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Hi.  I bought a USB audio.  I think usbd and usbaudio is working
> because cat /dev/audioctl works ;).
>
>     % nashi@valinore usb/usbd
>     % nashi@valinore usb/usbaudio -v 100
>     warning: Can't set play speed
>     % nashi@valinore cat /dev/audioctl
>     speed out 48000 48000 48000
>     mute out 0 0 0 0
>     volume out 100 -11776 7168 512
>     channels out 2 2 2
>     resolution out 16 16 16
>
> Yet, I don't have any good test file to feed to /dev/audio.
> Giving /mnt/cd/a000 didn't produce any sound on usb speakers.
>
>     % cdfs
>     % cat /mnt/cd/a000 > /dev/audio
>
> Could somebody give me a tiny file to feed to /dev/audio so that
> I can make sure that my speakers are configured correctly.
> Or is there a way to convert a??? files to /dev/audio format?
>

one way to try it is to download plan 9 port of mad mp3 player and run it
with an mp3 file. also, with madplay command you can convert an mp3 file
to raw format which can be directly passed to /dev/audio. here is where
you can find mad port: http://plan9.escet.urjc.es/plan9.html

thanks
dharani



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
@ 2004-12-08  6:43 YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2004-12-08  6:43 UTC (permalink / raw)
  To: 9fans

> my bet is on the volume.  a000 is already in "/dev/audio format"
> though you might want to turn the speed down to 44100 in audioctl.

Thanks all.
I see.  I should have had the speakers giving noises at least...
madplayer was the same: speakers were silent at all.
My usb configuration should be the problem, then.
As I have tested this on rather old 4th ed, I will try it with
the modern 4th ed.
-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
  2004-12-08  3:07 YAMANASHI Takeshi
@ 2004-12-08  6:07 ` Russ Cox
  2004-12-08  8:49 ` vdharani
  1 sibling, 0 replies; 11+ messages in thread
From: Russ Cox @ 2004-12-08  6:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Giving /mnt/cd/a000 didn't produce any sound on usb speakers.

my bet is on the volume.  a000 is already in "/dev/audio format"
though you might want to turn the speed down to 44100 in audioctl.

russ


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] /dev/audio test file
  2004-12-08  8:49 ` vdharani
@ 2004-12-08  3:46   ` Dan Cross
  2004-12-08 13:27   ` Sape Mullender
  1 sibling, 0 replies; 11+ messages in thread
From: Dan Cross @ 2004-12-08  3:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

vdharani@infernopark.com writes:
> one way to try it is to download plan 9 port of mad mp3 player and run it
> with an mp3 file. also, with madplay command you can convert an mp3 file
> to raw format which can be directly passed to /dev/audio. here is where
> you can find mad port: http://plan9.escet.urjc.es/plan9.html

I usually just cat'ed the audio tracks off of an audio CD....  I used
to have a file with the Marine's Hymn in it, but I have no idea where
it is anymore.  :-)

	- Dan C.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] /dev/audio test file
@ 2004-12-08  3:07 YAMANASHI Takeshi
  2004-12-08  6:07 ` Russ Cox
  2004-12-08  8:49 ` vdharani
  0 siblings, 2 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2004-12-08  3:07 UTC (permalink / raw)
  To: 9fans

Hi.  I bought a USB audio.  I think usbd and usbaudio is working
because cat /dev/audioctl works ;).

    % nashi@valinore usb/usbd
    % nashi@valinore usb/usbaudio -v 100
    warning: Can't set play speed
    % nashi@valinore cat /dev/audioctl
    speed out 48000 48000 48000
    mute out 0 0 0 0
    volume out 100 -11776 7168 512
    channels out 2 2 2
    resolution out 16 16 16

Yet, I don't have any good test file to feed to /dev/audio.
Giving /mnt/cd/a000 didn't produce any sound on usb speakers.

    % cdfs
    % cat /mnt/cd/a000 > /dev/audio

Could somebody give me a tiny file to feed to /dev/audio so that
I can make sure that my speakers are configured correctly.
Or is there a way to convert a??? files to /dev/audio format?

Thanks in advance,
-- 
Sincerely,
YAMANASHI Takeshi




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-12-13  9:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-13  5:56 [9fans] /dev/audio test file YAMANASHI Takeshi
  -- strict thread matches above, loose matches on Subject: below --
2004-12-13  2:44 YAMANASHI Takeshi
2004-12-12  8:56 YAMANASHI Takeshi
2004-12-13  2:35 ` Kenji Okamoto
2004-12-13  9:06 ` vdharani
2004-12-08  6:43 YAMANASHI Takeshi
2004-12-08  3:07 YAMANASHI Takeshi
2004-12-08  6:07 ` Russ Cox
2004-12-08  8:49 ` vdharani
2004-12-08  3:46   ` Dan Cross
2004-12-08 13:27   ` Sape Mullender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).