This Solaris release provides USB audio support that is implemented by a pair of cooperating drivers, usb_ac and usb_as. The audio control driver, usb_ac, is a USBA (Solaris USB Architecture) compliant client driver that provides the controlling interface to user applications. The audio streaming driver, usb_as, is provided to process audio data messages during play and record. It sets sample frequency and precision, and encodes requests from the usb_ac driver. Both drivers comply to the USB audio class 1.0 specification.
Some audio devices can set volume under software control. A STREAMS module, usb_ah, is pushed on top of the HID driver for managing this function.
Solaris supports USB audio devices that are play-only, record-only, or record and play. Hot-plugging of USB audio devices is supported.
USB audio devices are supported on SPARC Ultra and x86 platforms that have USB connectors.
USB audio devices that are supported in the Solaris 8 10/01, Solaris 8 2/02, or Solaris 9 releases must support a fixed 44100 or 48000 Hz sampling frequency to play or record.
For fully supported audio data format information, see usb_ac(7D).
The primary audio device is /dev/audio. You can verify that /dev/audio is pointing to USB audio by using the following command:
% mixerctl Device /dev/audioctl: Name = USB Audio Version = 1.0 Config = external Audio mixer for /dev/audioctl is enabled |
After you connect your USB audio devices, you access them with the audioplay and audiorecord command through the /dev/sound/N device links.
Note that the /dev/audio and /dev/sound/N devices can refer to speakers, microphones, or combo devices. If you refer to the incorrect device type, the command will fail. For example, the audioplay command will fail if you try to use it with a microphone.
You can select a specific default audio device for most Sun audio applications, such as audioplay and audiorecord, by setting the AUDIODEV shell variable or by specifying the -d option for these commands. However, setting AUDIODEV does not work for third-party applications that have /dev/audio hardcoded as the audio file.
When you plug in a USB audio device, it automatically becomes the primary audio device, /dev/audio, unless /dev/audio is in use. For instructions on changing /dev/audio from onboard audio to USB audio and vice versa, refer to How to Change the Primary USB Audio Device, and usb_ac(7D).