USB Administration Guide

Troubleshooting USB Audio Device Problems

This section describes how to troubleshoot USB audio device problems.

Audio Device Ownership Key Points

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

How to Identify Your System's Primary Audio Device

This procedure assumes that you have already connected USB audio devices.

  1. Identify the state of your current audio device links.

    For example:


    % ls -lt /dev/audio*
    lrwxrwxrwx   1 root     root         7 Jul 23 15:41 /dev/audio -> sound/0
    lrwxrwxrwx   1 root     root        10 Jul 23 15:41 /dev/audioctl -> 
    sound/0ctl
    % ls -lt /dev/sound/* 
    lrwxrwxrwx   1 root     other       66 Jul 23 14:21 /dev/sound/0 -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audio
    lrwxrwxrwx   1 root     other       69 Jul 23 14:21 /dev/sound/0ctl -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audioctl
    %

    The primary audio device, /dev/audio, is currently pointing to the onboard audio, which is /dev/sound/0.

  2. (Optional) Add a new USB audio device.

  3. Examine your system's new audio links.

    For example:


    % ls -lt /dev/audio*
    lrwxrwxrwx   1 root     root         7 Jul 23 15:46 /dev/audio -> sound/1
    lrwxrwxrwx   1 root     root        10 Jul 23 15:46 /dev/audioctl -> 
    sound/1ctl
    % ls -lt /dev/sound/*
    lrwxrwxrwx   1 root     root        74 Jul 23 15:46 /dev/sound/1 -> 
    ../../devices/pci@1f,4000/usb@5/hub@1/device@3/sound-control@0:sound,audio
    lrwxrwxrwx   1 root     root        77 Jul 23 15:46 /dev/sound/1ctl -> 
    ../../devices/pci@1f,4000/usb@5/hub@1/device@3/sound-control@0:sound,aud...
    lrwxrwxrwx   1 root     other       66 Jul 23 14:21 /dev/sound/0 -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audio
    lrwxrwxrwx   1 root     other       69 Jul 23 14:21 /dev/sound/0ctl -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audioctl
    % 

    Notice that the primary audio device, /dev/audio, is pointing to the newly plugged in USB audio device, /dev/sound/1.

    If you remove the USB audio device now, the primary audio device, /dev/audio, does not revert back to the onboard audio. See the procedure below for instructions on changing the primary audio device back to the system's onboard audio.

    You can also examine your system's USB audio devices with the prtconf command and look for the USB device information.


    % prtconf
    .
    .
    .
    usb, instance #0
       hub, instance #0
            mouse, instance #0
            keyboard, instance #1
            device, instance #0
                sound-control, instance #0
                sound, instance #0
                input (driver not attached).
    .
    .
    .

How to Change the Primary USB Audio Device

Follow the steps below if you remove or change your USB audio devices and you want to make one particular audio device the primary audio device. The procedure changes the primary audio device to the onboard audio device as an example.

  1. Become superuser.

  2. Close all audio applications.

  3. Determine whether the audio and USB drivers are loaded.


    # modinfo | grep -i audio
    124 780e6a69   bb6e   -   1  audiosup (Audio Device Support 1.12)
    # modinfo  | grep -i usb
     48  13dba67  18636 199   1  ohci (USB OpenHCI Driver 1.31)
     49 78020000  1dece   -   1  usba (USBA: USB Architecture 1.37)
     50  12e5f1f    35f 195   1  hubd (USB Hub Driver 1.4)
     51  13ef53d   5e26 194   1  hid (USB HID Client Driver 1.16)
     54  13f67f2   1b42  10   1  usbms (USB mouse streams 1.6)
     56  127bbf0   2c74  11   1  usbkbm (USB keyboard streams 1.17)
    # 
  4. Load and attach the onboard audio driver.


    # devfsadm -i audiocs
    
  5. Verify the primary audio device link is pointing to the onboard audio.


    # ls -lt /dev/audio*
    lrwxrwxrwx   1 root     other        7 Jul 23 15:49 /dev/audio -> sound/0
    lrwxrwxrwx   1 root     other       10 Jul 23 15:49 /dev/audioctl -> 
    sound/0ctl
    # ls -lt /dev/sound/*
    lrwxrwxrwx   1 root     other       66 Jul 23 14:21 /dev/sound/0 -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audio
    lrwxrwxrwx   1 root     other       69 Jul 23 14:21 /dev/sound/0ctl -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audioctl
    #
  6. Confirm the onboard audio is the primary audio device.


    % audioplay /usr/demo/SOUND/sounds/bark.au
    

    The audioplay command defaults to the onboard audio device.

  7. (Optional) Unload all the audio drivers that can be unloaded before plugging in another USB audio device.

    1. Close all the audio applications.

    2. Display the audio driver information to verify no audio drivers are currently loaded.


      # modinfo | grep -i audio
       60 78048000   bb6e   -   1  audiosup (Audio Device Support 1.12)
       61 78152000  39a97   -   1  mixer (Audio Mixer 1.49)
       62 78118000   bf9f   -   1  amsrc1 (Audio Sample Rate Conv. #1 1.3)
      128 7805e000  14968  54   1  audiocs (CS4231 mixer audio driver 1.21)
      # 
    3. Unload the audio drivers.


      # modunload -i 0
      # modinfo | grep -i audio
       60 78048000   bb6e   -   1  audiosup (Audio Device Support 1.12)
       61 78152000  39a97   -   1  mixer (Audio Mixer 1.49)
      #

      At this point, audiocs, the onboard audio driver, has been unloaded and guaranteed not to be open. However, the primary audio device, /dev/audio, does not change if it is held open by an application.

  8. (Optional) Plug in a USB audio device.

  9. (Optional) Examine the new audio links.


    % ls -lt /dev/audio*
    lrwxrwxrwx   1 root     root         7 Jul 23 16:12 /dev/audio -> sound/1
    lrwxrwxrwx   1 root     root        10 Jul 23 16:12 /dev/audioctl -> 
    sound/1ctl
    % ls -lt /dev/sound/*
    lrwxrwxrwx   1 root     root        77 Jul 23 16:12 /dev/sound/1ctl -> 
    ../../devices/pci@1f,4000/usb@5/hub@1/device@3/sound-control@0:sound,aud...
    lrwxrwxrwx   1 root     root        74 Jul 23 16:12 /dev/sound/1 -> 
    ../../devices/pci@1f,4000/usb@5/hub@1/device@3/sound-control@0:sound,aud...
    lrwxrwxrwx   1 root     root        66 Jul 23 15:59 /dev/sound/0 -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,audio
    lrwxrwxrwx   1 root     root        69 Jul 23 15:59 /dev/sound/0ctl -> 
    ../../devices/pci@1f,4000/ebus@1/SUNW,CS4231@14,200000:sound,aud...
    % 

How to Remove Unused USB Audio Device Links

Use the procedure below 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