Managing Devices in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Using USB Audio Devices

For audio devices in Oracle Solaris, only USB 2.0, 1.1, and 1.0 are supported, not USB 3.0. Additionally, the support is for those devices that are play-only, record-only, or record and play.

Oracle Solaris USB audio support is implemented by a pair of drivers:

  • Audio control driver (usb_ac) - provides the controlling interface to user applications. For more information, see the usb_ac(7D) man page.

  • Audio streaming driver (usb_as) - processes audio data messages during play and record. It sets sample frequency and precision, and encodes requests from the usb_ac driver. For more information, see the usb_as(7D) man page.

Some audio devices can set volume under software control. A STREAMS module, usb_ah, is pushed on top of the human interface device (HID) driver for managing this function. For more information, see the usb_ah(7M) man page.

The primary audio device is /dev/audio. To verify that /dev/audio is pointing to USB audio, use the mixerctl command. For example:

%$ mixerctl
Device /dev/audioctl:
Name    = USB Audio
Version = 1.0
Config  = external

Audio mixer for /dev/audioctl is enabled

You access connected USB audio devices 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 combination devices. If you refer to the incorrect device type, the command fails. For example, the audioplay command fails if you try to use it with a microphone.

You can select a specific default audio device for most Oracle Solaris 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.

A USB plugged-in audio device automatically becomes the primary audio device, /dev/audio, provided that /dev/audio is not in use. 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.

For instructions on switching /dev/audio between on-board audio and USB, refer to Problem With Reverting to On-Board Audio Device, and usb_ac(7D).