9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sape Mullender <sape@plan9.bell-labs.com>
To: sape@plan9.bell-labs.com, 9fans@cse.psu.edu
Subject: [9fans] USB audio
Date: Sat,  7 Aug 2004 10:01:21 -0400	[thread overview]
Message-ID: <e0756a6f95a61f5db7147e9338caa402@plan9.bell-labs.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9125 bytes --]

I spent two days hacking on USB and USB audio in particular and pushed the
result out to sources about a week ago.

usb/usbaudio can now drive the following audio devices (and probably more, but I haven't
tested them).  Below is the output from running usb/usbaudio -V:

Xitel AN1:
	Audio output unit 1
	Audio Feature Unit 2 for Playback
		mute control on master channel
		bass control on master channel
		treble control on master channel
		volume control on channel 1
		volume control on channel 2
	Interface 1, alt 1: mono, 8 bits, frequency variable between 4990 and 55010
	Interface 1, alt 2: stereo, 8 bits, frequency variable between 4990 and 55010
	Interface 1, alt 3: mono, 16 bits, frequency variable between 4990 and 55010
	Interface 1, alt 4: stereo, 16 bits, frequency variable between 4990 and 55010
	Interface 1, alt 5: mono, 20 bits, frequency variable between 4990 and 55010
	Interface 1, alt 6: stereo, 20 bits, frequency variable between 4990 and 55010
	Buttons on endpoint 3
	Playback on endpoint 4
	Playback speed control, min 4990, max 55010, step 1, value 44100
	Playback mute control, value 0
	Playback volume control, min -15616, max 0, step 256, values[1] -5376  [2] -5376
	Playback bass control, min 0, max 96, step 8, value 0
	Playback treble control, min 0, max 24, step 8, value 0
	Playback channels control, min 1, max 2, value 2
	Playback resolution control, min 8, max 20, value 16
Philips USB speakers, model DSS 370/17:
	Audio output unit 1
	Audio Feature Unit 2 for Playback
		mute control on master channel
		bass control on master channel
		treble control on master channel
		bassboost control on master channel
		volume control on channel 1
		volume control on channel 2
	Interface 1, alt 1: mono, 8 bits, frequency variable between 4990 and 55010
	Interface 1, alt 2: stereo, 8 bits, frequency variable between 4990 and 55010
	Interface 1, alt 3: mono, 16 bits, frequency variable between 4990 and 55010
	Interface 1, alt 4: stereo, 16 bits, frequency variable between 4990 and 55010
	Interface 1, alt 5: mono, 20 bits, frequency variable between 4990 and 55010
	Interface 1, alt 6: stereo, 20 bits, frequency variable between 4990 and 55010
	Buttons on endpoint 3
	Playback on endpoint 4
	Playback speed control, min 4990, max 55010, step 1, value 44100
	Playback mute control, value 0
	Playback volume control, min -15616, max 0, step 256, values[1] -10752  [2] -10752
	Playback bass control, min 0, max 96, step 8, value 0
	Playback treble control, min 0, max 24, step 8, value 0
	Playback bassboost control, value 0
	Playback channels control, min 1, max 2, value 2
	Playback resolution control, min 8, max 20, value 16
Edirol UA-3:
	Audio output unit 1
	Device can record from Line connector
	Audio input unit 13
	Device can play to USB Streaming
	Audio Selector Unit 11
	Audio Feature Unit 9 for Playback
		mute control on master channel
		volume control on channel 1
		volume control on channel 2
	Interface 1, alt 1: mono, 16 bits, discrete frequencies are: 44100
	Interface 1, alt 2: stereo, 16 bits, discrete frequencies are: 44100
	Interface 2, alt 1: mono, 16 bits, discrete frequencies are: 32000 44100 48000
	Interface 2, alt 2: stereo, 16 bits, discrete frequencies are: 32000 44100 48000
	Buttons on endpoint 1
	Playback on endpoint 2
	Record on endpoint 3
	Playback speed control, min 44100, max 44100, value 44100
	Playback mute control, value 0
	Playback volume control, min -5888, max 2048, step 256, values[1] -2048  [2] -2048
	Playback channels control, min 1, max 2, value 2
	Playback resolution control, min 16, max 16, value 16
	Record speed control, min 32000, max 48000, value 44100
	Record channels control, min 1, max 2, value 2
	Record resolution control, min 16, max 16, value 16
Edirol UA-1X (haven't tested recording, but I believe it'll work):
	Audio output unit 1
	Audio Feature Unit 3 for Playback
		mute control on master channel
		volume control on channel 1
		volume control on channel 2
	Device can record from <unnamed>
	Audio input unit 5
	Device can play to USB Streaming
	Interface 1, alt 1: stereo, 16 bits, discrete frequencies are: 32000 44100 48000
	Interface 1, alt 2: mono, 16 bits, discrete frequencies are: 32000 44100 48000
	Interface 1, alt 3: stereo, 8 bits, discrete frequencies are: 32000 44100 48000
	Interface 1, alt 4: mono, 8 bits, discrete frequencies are: 32000 44100 48000
	Interface 1, alt 5: stereo, 8 bits, discrete frequencies are: 32000 44100 48000
	Interface 1, alt 6: mono, 8 bits, discrete frequencies are: 32000 44100 48000
	Interface 2, alt 1: stereo, 16 bits, discrete frequencies are: 48000
	Interface 2, alt 2: mono, 16 bits, discrete frequencies are: 48000
	Interface 2, alt 3: stereo, 16 bits, discrete frequencies are: 44100
	Interface 2, alt 4: mono, 16 bits, discrete frequencies are: 44100
	Interface 2, alt 5: stereo, 16 bits, discrete frequencies are: 32000
	Interface 2, alt 6: mono, 16 bits, discrete frequencies are: 32000
	Interface 2, alt 7: stereo, 16 bits, discrete frequencies are: 22050
	Interface 2, alt 8: mono, 16 bits, discrete frequencies are: 22050
	Interface 2, alt 9: stereo, 16 bits, discrete frequencies are: 16000
	Interface 2, alt 10: mono, 16 bits, discrete frequencies are: 16000
	Interface 2, alt 11: stereo, 8 bits, discrete frequencies are: 16000
	Interface 2, alt 12: mono, 8 bits, discrete frequencies are: 16000
	Interface 2, alt 13: stereo, 8 bits, discrete frequencies are: 8000
	Interface 2, alt 14: mono, 8 bits, discrete frequencies are: 8000
	Interface 2, alt 15: stereo, 16 bits, discrete frequencies are: 11025
	Playback on endpoint 2
	Record on endpoint 4
	Playback speed control, min 32000, max 48000, value 44100
	Playback mute control, value 0
	Playback volume control, min -32768, max 0, step 256, values[1] 0  [2] 0
	Playback channels control, min 1, max 2, value 2
	Playback resolution control, min 8, max 16, value 16
	Record speed control, min 44100, max 44100, value 44100
	Record channels control, min 1, max 2, value 2
	Record resolution control, min 8, max 16, value 16
Xitel Pro HiFi-Link (Although I could set and read back the volume, it
didn't seem to affect the playback.  Strange):
	Audio output unit 1
	Audio Feature Unit 9 for Playback
		mute control on master channel
		volume control on channel 1
		volume control on channel 2
	Interface 1, alt 1: stereo, 16 bits, discrete frequencies are: 48000
	Playback on endpoint 1
	Buttons on endpoint 3
	Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead
	Playback speed control, min 48000, max 48000, value 48000
	Playback mute control, value 0
	Playback volume control, min -12256, max -16, step 48, values[1] -16  [2] -16
	Playback channels control, min 2, max 2, value 2
	Playback resolution control, min 16, max 16, value 16

And here's one that doesn't work yet; volume needs to be controlled
through the mixer and I haven't had time to write mixer code yet.
Volunteers should read
	www.usb.org/developers/devclass_docs/audio10.pdf
It describes how to control a mixer.  A warning, look at the
attachment to see what you're up against.

Creative SB0270
	Audio output unit 1
	Device can record from <unnamed>
	Device can record from Line connector
	Device can record from <unnamed>
	Audio input unit 7
	Device can play to USB Streaming
	Audio Selector Unit 8
	Audio Feature Unit 9, not known what for
		mute control on master channel
		volume control on channel 1
		volume control on channel 2
	Audio Feature Unit 10 for Record
		mute control on master channel
		volume control on master channel
		agc control on master channel
	Audio Feature Unit 11 for Record
	Second feature unit (10, 11) on record
		mute control on master channel
		volume control on channel 1
		volume control on channel 2
	Audio Feature Unit 12 for Record
	Second feature unit (11, 12) on record
		mute control on master channel
	Audio Feature Unit 13 for Record
	Second feature unit (12, 13) on record
		mute control on master channel
		volume control on master channel
	Audio Feature Unit 14 for Record
	Second feature unit (13, 14) on record
		mute control on master channel
		volume control on channel 1
		volume control on channel 2
	Audio Mixer Unit 15
	Interface 1, alt 1: stereo, 16 bits, discrete frequencies are: 48000
	Interface 2, alt 1: stereo, 16 bits, discrete frequencies are: 48000 44100
	Playback on endpoint 1
	Record on endpoint 2
	Warning, can't configure playout for 44100 Hz, configuring for 48000 Hz instead
	Playback speed control, min 48000, max 48000, value 48000
	Playback channels control, min 2, max 2, value 2
	Playback resolution control, min 16, max 16, value 16
	Record speed control, value -2147483648
	Record mute control, value 1
	Record volume control, min 0, max 12240, step 48, values[1] 9168  [2] 9168
	Record agc control
	Record channels control, min 2, max 2, value 2
	Record resolution control, min 16, max 16, value 16
	usb/usbaudio: Can't set record speed

[-- Attachment #2: blaster.ps --]
[-- Type: application/postscript, Size: 59152 bytes --]

             reply	other threads:[~2004-08-07 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-07 14:01 Sape Mullender [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-06  3:25 Jack Johnson
2003-02-21 18:55 [9fans] usb audio rog
2003-02-21 18:02 rog
2003-02-21 18:02 ` Russ Cox
2003-02-21 18:33 ` Fco.J.Ballesteros
2003-02-21 18:43 ` Scott Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0756a6f95a61f5db7147e9338caa402@plan9.bell-labs.com \
    --to=sape@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).