Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
28.  Using USB Devices (Overview/Tasks) Using USB Audio Devices How to Change the Primary USB Audio Device  Previous   Contents   Next 
   
 

How to Remove Unused USB Audio Device Links

Use this procedure if a USB audio device is removed while the system is powered off. It is possible that removing the USB audio device while the system is powered off will leave the /dev/audio device still pointing to a /dev/sound/* device that doesn't exist.

  1. Become superuser.

  2. Close all audio applications.

  3. Remove the unused audio links.

    # devfsadm -C -c audio

Troubleshooting USB Audio Device Problems

This section describes how to troubleshoot USB audio device problems.

Solving USB Speaker Problems

Sometimes USB speakers do not produce any sound even though the driver is attached and the volume is set to high. Hot-plugging the device might not change this behavior.

The workaround is to power cycle the USB speakers.

Audio Device Ownership Key Points

Keep the following audio device ownership key points in mind when working with audio devices.

  • When you plug in a USB audio device and you are logged in on the console, the console is the owner of the /dev/* entries. This means you can use the audio device as long as you are logged into the console.

  • If you are not logged into the console when you plug in a USB audio device, root becomes the owner of the device. However, if you log into the console and attempt to access the USB audio device, device ownership changes to the console. For more information, see logindevperm(4).

  • When you remotely login with the rlogin command and attempt to access the USB audio device, the ownership does not change. This means that, for example, unauthorized users cannot listen to conversations over a microphone owned by someone else.

Hot-Plugging USB Devices With the cfgadm Command (Task Map)

Task

Description

For Instructions

1. Display USB device information

Display information about USB devices and buses.

"How to Display USB Device Information"

2. Unconfigure a USB device

Logically unconfigure a USB device that is still physically connected to the system.

"How to Unconfigure a USB Device"

3. Configure a USB device

Configure a USB device that was previously unconfigured.

"How to Configure a USB Device"

4. Logically disconnect a USB device

You can logically disconnect a USB device if you are not physically near the system.

"How to Logically Disconnect a USB Device"

5. Logically connect a USB device

Logically connect a USB device that was previously logically disconnected or unconfigured.

"How to Logically Connect a USB Device"

6. Disconnect a USB device subtree

Disconnect a USB device subtree, which is the hierarchy (or tree) of devices below a hub.

"How to Logically Disconnect a USB Device Subtree"

7. Reset a USB device

Reset a USB device to logically remove and recreate the device.

"How to Reset a USB Device"

Hot-Plugging USB Devices With the cfgadm Command

You can simply add and remove a USB device from a running system without using the cfgadm command. However, a USB device can also be logically hot-plugged without physically removing the device. This scenario is convenient when you are working remotely and you need to disable or reset a non-functioning USB device. The cfgadm command also provides a way to display the USB device tree including manufacturer and product information.

The cfgadm command displays information about attachment points, which are locations in the system where dynamic reconfiguration operations can occur. An attachment point consists of:

  • An occupant, which represents a hardware resource that may be configured into the system, and

  • A receptacle, which is the location that accepts the occupant.

Attachment points are represented by logical and physical attachment point IDs (Ap_Ids). The physical Ap_Id is the physical pathname of the attachment point. The logical Ap_Id is a user-friendly alternative for the physical Ap_Id. For more information on Ap_Ids, see cfgadm_usb(1M).

The cfgadm command provides the following USB device status information.

Receptacle State

Description

empty/unconfigured

The device is not connected.

disconnected/unconfigured

The device is logically disconnected and unavailable. The devinfo node is removed even though the device could still be physically connected.

connected/unconfigured

The device is logically connected, but unavailable. The devinfo node is present.

connected/configured

The device is connected and available.

The following sections describe how to hot-plugging a USB device with the cfgadm command. All of the sample USB device information in these sections has been truncated to focus on relevant information.

How to Display USB Device Information

Use the prtconf command to display information about USB devices.

$ prtconf
        usb, instance #0
                 hub, instance #2
                     device, instance #8
                         interface (driver not attached)
                     printer (driver not attached)
                     mouse, instance #14
                     device, instance #9
                         keyboard, instance #15
                         mouse, instance #16
                     storage, instance #7
                         disk (driver not attached)
                     communications, instance #10
                         modem (driver not attached)
                         data (driver not attached)
                 storage, instance #0
                     disk (driver not attached)
                 storage, instance #1
                     disk (driver not attached)

Use the cfgadm command to display USB bus information. For example:

% cfgadm
Ap_Id                       Type         Receptacle   Occupant     Condition
usb0/4.5                    usb-hub      connected    configured   ok
usb0/4.5.1                  usb-device   connected    configured   ok
usb0/4.5.2                  usb-printer  connected    configured   ok
usb0/4.5.3                  usb-mouse    connected    configured   ok
usb0/4.5.4                  usb-device   connected    configured   ok
usb0/4.5.5                  usb-storage  connected    configured   ok
usb0/4.5.6                  usb-communi  connected    configured   ok
usb0/4.5.7                  unknown      empty        unconfigured ok
usb0/4.6                    usb-storage  connected    configured   ok
usb0/4.7                    usb-storage  connected    configured   ok

In the preceding example, usb0/4.5.1 identifies a device connected to port 1 of the second-level external hub, which is connected to port 5 of first-level external hub, which is connected to the first USB controller's root hub, port 4.

Use the following cfgadm command to display specific USB device information. For example:

% cfgadm -l -s "cols=ap_id:info"
Ap_Id       Information
usb0/4.5.1  Mfg: Inside Out Networks Product: Edgeport/421 NConfigs: 1 Config: 0  : ...
usb0/4.5.2  Mfg: <undef> Product: <undef>   NConfigs: 1 Config: 0  <no cfg str descr>
usb0/4.5.3  Mfg: Mitsumi Product: Apple USB Mouse NConfigs: 1 Config: 0 <no cfg str descr>
usb0/4.5.4  Mfg: NMB  Product: NMB USB KB/PS2 M NConfigs: 1 Config: 0  
usb0/4.5.5  Mfg: Hagiwara Sys-Com  Product: SmartMedia R/W  NConfigs: 1 Config: 0 : Default
usb0/4.5.6  Mfg: 3Com Inc.  Product: U.S.Robotics 56000 Voice USB Modem  NConfigs: 2 ...
usb0/4.5.7
usb0/4.6    Mfg: Iomega  Product: USB Zip 250  NConfigs: 1  Config: 0  : Default
usb0/4.7    Mfg: Iomega  Product: USB Zip 100  NConfigs: 1  Config: 0  : Default
# 
 
 
 
  Previous   Contents   Next