This Solaris release provides USB audio support which is implemented by a pair of cooperating drivers, usb_ac and usb_as. The audio control driver, usb_ac, a USBA (Solaris USB Architecture) compliant client driver provides the controlling interface to user applications. The audio streaming driver, usb_as, is provided to process audio data messages during play and record and set sample frequency, precision, and encoding requests from the usb_ac drive.
Both drivers comply to the USB audio class 1.0 specification.
Solaris supports external USB audio devices that are play-only or record-only. Onboard USB audio devices are not supported. See the usb_ac man page for supported audio data formats.
Only USB audio devices with one volume, bass, or treble control are supported. See the USB audio class specification for more information at http://www.usb.org.
USB audio devices are supported on SPARC Ultra and Intel platforms that provide USB connectors.
Hot-plugging USB audio devices is supported.
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 following files:
/dev/sound/N |
You can select a specific audio device by setting the AUDIODEV environment variable or by specifying the -d option to the audioplay and audiorecord commands. However, setting AUDIODEV does not work for 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. Refer to How to Change the Primary USB Audio Device and usb_ac(7D) for instructions on changing /dev/audio from onboard audio to USB audio and vice versa.
If a USB audio device is plugged into a system, it becomes the primary audio device, /dev/audio. It remains the primary audio device even after the system is rebooted. If additional USB audio devices are plugged in, the last one becomes the primary audio device.
See usb_ac(7D) for additional information on troubleshooting USB audio device problems.
Use this procedure to add hot-pluggable USB audio devices.
Plug in the USB speakers and microphone.
The primary audio device, /dev/audio, usually points to the onboard audio. After you connect USB audio devices, /dev/audio points to the USB audio devices that are identified in the /dev/sound directory.
Verify that the audio device files have been created.
% ls /dev/sound 0 0ctl 1 1ctl 2 2ctl |
Test the left and right USB speakers.
% cd /usr/demo/SOUND/sounds % audioplay -d /dev/sound/1 -b 100 spacemusic.au % audioplay -d /dev/sound/1 -b -100 spacemusic.au |
Test the USB microphone.
% cd $HOME/au % audiorecord -d /dev/sound/2 -p mic -t 30 test.au |