UA-101 - UA-101, playback Pulseaudio fails to detect card

Bug #986817 reported by Michael Mess
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
PulseAudio
Fix Released
Medium
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This bug has been created with apport-bug.

After upgrade from 10.04, the UA-101 inputs and outputs seem unavailable in standard audio settings.
Sound works with VLC when UA-101 is selected via ALSA.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: pulseaudio 1:1.1-0ubuntu15
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic-pae 3.2.14
Uname: Linux 3.2.0-23-generic-pae i686
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu5
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: michael 19895 F.... pulseaudio
 /dev/snd/controlC0: michael 19895 F.... pulseaudio
 /dev/snd/pcmC0D0p: michael 19895 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf6ff8000 irq 44'
   Mixer name : 'Realtek ALC883'
   Components : 'HDA:10ec0883,1043829f,00100002'
   Controls : 46
   Simple ctrls : 22
Card1.Amixer.info:
 Card hw:1 'UA101'/'EDIROL UA-101 (serial ZT82634), 192000 Hz at usb-0000:00:1a.7-3, high speed'
   Mixer name : ''
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'MIDI Input Mode',0
   Capabilities: enum
   Items: 'High Load' 'Light Load'
   Item0: 'Light Load'
Card2.Amixer.info:
 Card hw:2 'CX8811'/'Conexant CX8811 at 0xfb000000'
   Mixer name : 'CX88'
   Components : ''
   Controls : 3
   Simple ctrls : 2
Date: Sun Apr 22 13:03:21 2012
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US
 SHELL=/bin/bash
SourcePackage: pulseaudio
Symptom: audio
Symptom_Card: CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] - Conexant CX8811
Title: [UA-101 - UA-101, playback] Pulseaudio fails to detect card
UpgradeStatus: Upgraded to precise on 2012-04-18 (3 days ago)
dmi.bios.date: 10/14/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1201
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5K
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1201:bd10/14/2008:svnSystemmanufacturer:pnP5K:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5K:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5K
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Michael Mess (michael-michaelmess) wrote :
Revision history for this message
Michael Mess (michael-michaelmess) wrote :

It is possible to load the alsa-sink device manually using the pulseaudio command line interface:

michael@quad:~$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> load-module module-alsa-sink device_id="0" rate=192000 channels=6 channel_map=left,right,aux0,aux1,aux2,aux3
>>>

Now the sound card is visible in the ubuntu sound configuration and the sound works.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Here is some information about the UA-101 audio interface:

There is a hardware switch to select the sampling rate:
 * 44,1 kHz
 * 48 kHz
 * 88,2 kHz
 * 96 kHz
 * 192 kHz
The sampling rate selected by the switch will be applied when the device is turned on and cannot be changed while the device remains powered on. When the switch is changed while the device is on power, the sampling rate will not be applied until the device gets power-cycled.
It is not possible to change sampling rate by software.

For autodetection, pulseaudio could try the sampling rates, beginning with 192 kHz, to see, if the alsa device accepts the sampling rate and then choose the one which is accepted.

When using 192kHz, 6 channels are supported, for the other frequencies, 10 channels are supported.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

michael@quad:/proc/asound$ cat cards
 0 [UA101 ]: UA-101 - UA-101
                      EDIROL UA-101 (serial ZT82634), 192000 Hz at usb-0000:00:1a.7-4, high speed
 1 [CX8811 ]: CX88x - Conexant CX8811
                      Conexant CX8811 at 0xfb000000
 2 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf6ff8000 irq 45

Advanced Linux Sound Architecture Driver Version 1.0.24.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

The version of Pulseaudion which is installed is:

Package: pulseaudio
State: installed
Automatically installed: no
Multi-Arch: foreign
Version: 1:1.1-0ubuntu15.1

After manually loading the driver with the load-module command like described above, sound works perfectly. :-)

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Remaining problem is that the card is not autodetected and the driver needs to be loaded manually each time when the user logged in.
Maybe we have to add something like a card profile or card detection script for loading the alsa module correctly when the card has been detected.
Could anybody give me some links for useful documentation how cards are detected and how to write such scripts?

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

When the card is loaded, syslog shows:

Jul 18 11:37:41 quad pulseaudio[2908]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jul 18 11:37:41 quad pulseaudio[2908]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 18 11:37:43 quad pulseaudio[2908]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jul 18 11:37:43 quad pulseaudio[2908]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 18 11:37:44 quad pulseaudio[2908]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jul 18 11:37:44 quad pulseaudio[2908]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 18 11:37:45 quad pulseaudio[2908]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jul 18 11:37:45 quad pulseaudio[2908]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 18 11:37:46 quad pulseaudio[2908]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jul 18 11:37:46 quad pulseaudio[2908]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 18 11:37:47 quad pulseaudio[2908]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jul 18 11:37:47 quad pulseaudio[2908]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 18 11:37:47 quad pulseaudio[2908]: [pulseaudio] module-udev-detect.c: Tried to configure /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/sound/card2 (alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101) more often than 5 times in 10s

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Testing by manually loading the module with the arguments from the log showed me that the card_name argument may cause the failure.

>>> load-module module-alsa-sink device_id="2" rate=192000 channels=6 channel_map=left,right,aux0,aux1,aux2,aux3 name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101"
Module load failed.
>>> load-module module-alsa-sink device_id="2" rate=192000 channels=6 channel_map=left,right,aux0,aux1,aux2,aux3 name="usb-EDIROL_UA-101_ZT82634-00-UA101"

Further tests to isolate the cause of the failure will follow...

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Then I tried:

>>> load-module module-alsa-sink device_id="2"

and it was successful, but there was a surround setup for the speakers which does not fit to my current audio connections, thus I have to add the channel map arguments.

It worked, thoughout I didn't specify the rate=192000, so it seems that not specifying the rate was not the problem what I have thought before.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

From the logs:

Jul 18 12:29:24 quad pulseaudio[2932]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.

Loading module without specifying card_name and card_properties arguments works:

>>> load-module module-alsa-sink device_id="0" name="usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes

By the way, I have noticed that after rebooting, the device_id changes randomally, sometimes the UA-101 is card0, sometimes card1 and sometimes card2, but that is correctly recognized.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Loading the module alsa-source for recording can also be done manually with pacmd, for example:

>>> load-module module-alsa-source device_id="0"

Recording sound with the gnome sound recorder seems to work well.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

On the link, there is a list of valid arguments, probably the arguments card_name and card_properties should be specified correctly as sink_name and sink_properties.

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/module-alsa-sink.c

static const char* const valid_modargs[] = {
    "name",
    "sink_name",
    "sink_properties",
    "namereg_fail",
    "device",
    "device_id",
    "format",
    "rate",
    "alternate_rate",
    "channels",
    "channel_map",
    "fragments",
    "fragment_size",
    "mmap",
    "tsched",
    "tsched_buffer_size",
    "tsched_buffer_watermark",
    "ignore_dB",
    "control",
    "rewind_safeguard",
    "deferred_volume",
    "deferred_volume_safety_margin",
    "deferred_volume_extra_delay",
    "fixed_latency_range",
    NULL
};

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

That was the reason. With sink_name and sink_properties it works.

>>> load-module module-alsa-sink device_id="0" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1"
Module load failed.
>>> load-module module-alsa-sink device_id="0" name="usb-EDIROL_UA-101_ZT82634-00-UA101" sink_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes sink_properties="module-udev-detect.discovered=1"
>>>

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

In the log files, there was written: "Failed to load module "module-alsa-card"".

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/module-alsa-card.c

So the module-alsa-card takes the arguments card_name and card_properties and I used module-alsa-sink and module-alsa-source where this is different and that confused me a bit.

There must be another reason why the module-alsa-card fails:

>>> load-module module-alsa-card device_id="0" name="usb-EDIROL_UA-101_ZT82634-00-UA101" card_name="alsa_card.usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1"
Module load failed.
>>> load-module module-alsa-card device_id="0" name="usb-EDIROL_UA-101_ZT82634-00-UA101" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes
Module load failed.
>>> load-module module-alsa-card device_id="0"
Module load failed.
>>>

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Added Debug log file.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

do this usb audio device has any hardware volume control ?

does it support srereo, 16 or 32 bits !

post the output of lsusb -vvvv

Revision history for this message
Michael Mess (michael-michaelmess) wrote :
Download full text (5.3 KiB)

michael@quad:~/download$ lsusb -s 1:2 -vvvv

Bus 001 Device 002: ID 0582:007d Roland Corp. EDIROL UA-101
Couldn't open device, some information will be missing
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 0
  bDeviceProtocol 255
  bMaxPacketSize0 64
  idVendor 0x0582 Roland Corp.
  idProduct 0x007d EDIROL UA-101
  bcdDevice 1.03
  iManufacturer 1
  iProduct 2
  iSerial 3
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 155
    bNumInterfaces 3
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 0mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 0
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterface 0
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 1
      bNumEndpoints 1
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterface 0
      ** UNRECOGNIZED: 07 24 01 01 00 01 00
      ** UNRECOGNIZED: 0b 24 02 01 06 04 18 01 00 ee 02
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x02 EP 2 OUT
        bmAttributes 5
          Transfer Type Isochronous
          Synch Type Asynchronous
          Usage Type Data
        wMaxPacketSize 0x0270 1x 624 bytes
        bInterval 1
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 0
      bNumEndpoints 0
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterface 0
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 1
      bNumEndpoints 1
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterface 0
      ** UNRECOGNIZED: 07 24 01 07 00 01 00
      ** UNRECOGNIZED: 0b 24 02 01 06 04 18 01 00 ee 02
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 37
          Transfer Type Isochronous
          Synch Type Asynchronous
          Usage Type Implicit feedback Data
        wM...

Read more...

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Specifications of the UA-101 can be found at http://www.rolandus.com/products/details/703

Revision history for this message
Raymond (superquad-vortex2) wrote :

you should file a bug report at pulseaudio freedesktop.org

pa 2.0 does not support those sound card with10 outpu channels and 12 input channels anymore

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Attached workaround shell script to load the UA-101 Pulseaudio driver using pacmd in a more comfortable way.

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
echo-e (jamesrudee) wrote :
Download full text (6.4 KiB)

I'm seeing the same problem with my UA-1000 (which uses the UA-101 driver). I think the OP has covered all the bases, but I'm pasting the lsusb -vvvv for this device since it is a different model number. Let me know if you want any other info.

mint@mint ~ $ sudo lsusb -s 1:2 -vvvv

Bus 001 Device 002: ID 0582:0044 Roland Corp. EDIROL UA-1000
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 0
  bDeviceProtocol 255
  bMaxPacketSize0 64
  idVendor 0x0582 Roland Corp.
  idProduct 0x0044 EDIROL UA-1000
  bcdDevice 1.07
  iManufacturer 1 EDIROL
  iProduct 2 UA-1000
  iSerial 3 ZR30858
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 189
    bNumInterfaces 4
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 0mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 0
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 1
      iInterface 0
      ** UNRECOGNIZED: 0b 24 01 00 01 35 00 03 00 01 02
      ** UNRECOGNIZED: 0c 24 02 01 01 01 00 0a 00 00 00 00
      ** UNRECOGNIZED: 0c 24 02 02 03 06 00 0c 00 00 00 00
      ** UNRECOGNIZED: 09 24 03 03 01 01 00 02 00
      ** UNRECOGNIZED: 09 24 03 04 03 06 00 01 00
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 0
      bNumEndpoints 0
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterface 0
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 1
      bNumEndpoints 1
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterface 0
      ** UNRECOGNIZED: 0b 24 02 01 0c 04 18 01 80 bb 00
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 37
          Transfer Type Isochronous
          Synch Type Asynchronous
          Usage Type Implicit feedback Data
        wMaxPacketSize 0x02d0 1x 720 bytes
        bInterval 1
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 2
      bAlternateSetting 0
      bNumEndpoints 0
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 1
      bInterfaceProtocol 2
      iInterf...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
In , Michael Mess (michael-michaelmess) wrote :

See also: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/986817

Edirol UA-101 card is not autodetected by PulseAudio and the driver is not loaded.
Therefore it cannot be used using PulseAudio without manual interaction (See workaround).
It works properly when accessed directly via ALSA.

There is a workaround to load the pulseaudio driver manually with the following script: (I have turned the frequency selector to 192kHz.)

#!/bin/bash
echo 'load-module module-alsa-sink device_id="'$[$(cat /proc/asound/cards |grep UA101| cut -d'[' -f1)]'" rate=192000 channels=6 channel_map=left,right,aux0,aux1,aux2,aux3' | pacmd

The UA-101 is an USB device that has a hardware switch to select sampling frequencies:

192000 Hz, 6 Channels
96000 Hz, 10 Channels
88200 Hz, 10 Channels
48000 Hz, 10 Channels
44100 Hz, 10 Channels

When using 192000 Hz sampling rate, only 6 channels are supported, while otherwwise the card supports 10 channels.

Specifications: See http://www.rolandus.com/products/details/703/specs/

Changed in pulseaudio:
importance: Undecided → Unknown
status: New → Unknown
Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Raymond (superquad-vortex2) wrote :

post the pulseaudio verbose log

AS your usb audio does not has any volume controls

Do your usb audio support stereo playback / capture ?

 do you load module-switch-on-port-available ?

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Upgrading to Ubuntu 14.04 fixed the issue for me. :-)
Sound is available, without the need to manually apply the workaround or changing configurations, etc.

So you should consider upgrading to Ubuntu 14.04.

But now I am still fighting with the proprietary NVIDIA graphics card driver in 14.04 (See #1313274, if you have an NVIDIA card) :-(

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Upgrading to Ubuntu 14.04 fixed the issue for outgoing sound only.

Inputs (Microphone, etc.) are still not available, but I didn't have time yet to test if there is a workaround how to get it working.

Revision history for this message
In , David Henningsson (diwic) wrote :

This should be fixed with the multichannel patch in git head. Please test it and reopen this bug if it isn't fixed. Thanks!

Changed in pulseaudio:
status: Confirmed → Fix Released
Revision history for this message
Joe Clifford (joeclifford) wrote :

I've done a quick compile and test of the pulseaudio git head code on Ubuntu 14.04 and it does indeed now autodetect and automatically sets up the multichannel audio outputs - running the compiled pulseaudio git binary detects the UA-101 and sets it up as a 7.1 multichannel audio output device in the gnome sound/volume control.
However, the git binary doesn't detect my motherboard's onboard HDA Intel PCH sound card (like the default pulseaudio in ubuntu does), it only detects the UA-101 and then only the audio outputs, not the audio inputs. Probably something to do with a module or conf not loading as I'm running pulseaudio from my home source directory.

Revision history for this message
David Henningsson (diwic) wrote :

Hi Joe and thanks for testing,

> However, the git binary doesn't detect my motherboard's onboard HDA Intel PCH sound card (like the default pulseaudio in ubuntu does)

This could be because we have removed extra-hdmi.conf. There might still be a udev rule referencing extra-hdmi.conf as this is taken from the system rather from the new PA you're running.

You can work around this by making a symlink from extra-hdmi.conf to default.conf in src/modules/alsa/mixer/profile-sets/

> it only detects the UA-101 and then only the audio outputs, not the audio inputs.

That it only detects the audio inputs is not expected. Could you get a PulseAudio verbose log of this (run pulseaudio with -vvvv )?

Revision history for this message
Joe Clifford (joeclifford) wrote :

Thanks David,

The symlink you mentioned fixed the detection of my onboard sound card and with pulseaudio-git it shows SPDIF and Headphones outputs and a Microphone input and they both work as expected. The installed ubuntu pulseaudio also has an Analogue audio output that isn't shown in the gnome audio mixer settings when using pulseaudio-git, though I'm guessing this is either an alias for the onboard Intel 5.1 or perhaps pulseaudio-git has jack insert/removal detection... anyway the sound works through headphones and mic as expected.

I've attached the output of pulseaudio-git when run with -vvvv.

To provide a clean log I first removed ~/.pulse, ~/.pulse-cookie and ~/.config/pulse, then did the following to ensure pulseaudio doesn't autospawn:

mkdir ~/.pulse
echo "autospawn=no" >> ~/.pulse/client.conf
pulseaudio -k
./src/pulseaudio -vvvv --log-target=newfile:pulseaudio.log

Steps taken after running pulseaudio-git are as follows:

1. Wait for pulseaudio to settle then turn on UA-101 with manual switch on the device
2. Wait for pulseaudio to settle then open gnome audio settings
3. Highlight UA-101 in gnome audio settings to make it the default output ("Play sound through")
4. There is a button on the gnome audio settings window that allows me to change from "Multichannel output" to "Multichannel input" - I change this and the UA-101 device disappears from the overview and seemingly with no way to get it back except for deleting anything pulseaudio related from my home directory and restarting pulseaudio.
5. Close gnome audio settings and turn off the UA-101 before killing pulseaudio.

The UA-101 doesn't have any alsa controls at all - nothing is picked up in alsamixer. In Windows, the 10 input and output channels are controlled by a software mixer. I'm wondering if this is why the inputs are not detected by pulseaudio?

Revision history for this message
David Henningsson (diwic) wrote :

Thanks for the log. Looking at the log, PulseAudio seems to do the right thing. It first tests input:multichannel, which succeeds, then output:multichannel, which also succeeds, but when then trying full duplex, we get an error back from the kernel:

I: [lt-pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-16)
I: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Device or resource busy

As a result, "Multichannel input" and "Multichannel output" are available, but not the combination of both. From your point 4) it sounds like the gnome audio settings react a bit strange/buggy on this. I assume you have checked both "output" and "input" tabs, right? If you change from "Multichannel output" to "Multichannel input" and it disappears on the output tab, it should start showing up on the input tab instead. Otherwise you can use the pavucontrol to change profile (on the configuration tab of pavucontrol).

But the main question is why full duplex fails here - are you getting full duplex to work with other applications (that are not using PulseAudio)?

Revision history for this message
Raymond (superquad-vortex2) wrote :

seem bug if your card support 10 channels

lt-pulseaudio] alsa-util.c: Managed to open hw:2
I: [lt-pulseaudio] alsa-util.c: Disabling tsched mode since BATCH flag is set
D: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 16 bit Little Endian) failed: Invalid argument
D: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument
D: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument
D: [lt-pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument
D: [lt-pulseaudio] alsa-util.c: Maximum hw buffer size is 227 ms
D: [lt-pulseaudio] alsa-util.c: Set buffer size first (to 7680 samples), period size second (to 960 samples).
I: [lt-pulseaudio] alsa-util.c: Device hw:2 doesn't support 44100 Hz, changed to 96000 Hz.
I: [lt-pulseaudio] alsa-util.c: Device hw:2 doesn't support 4 channels, changed to 12.
I: [lt-pulseaudio] alsa-util.c: Device hw:2 doesn't support sample format s16le, changed to s32le.
D: [lt-pulseaudio] alsa-mixer.c: Channel map for mapping 'multichannel' permanently changed to 'front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right,aux0,aux1,aux2,aux3'
D: [lt-pulseaudio] alsa-mixer.c: Profile input:multichannel supported.

Revision history for this message
Joe Clifford (joeclifford) wrote :
Download full text (5.0 KiB)

Hi David, Raymond, thanks for your follow up. Here is more pertinent information:

Changing from "Multichannel output" to "Multichannel input" on the Output tab in gnome sound settings makes the UA-101 output device disappear completely and permenantly and it does not appear in the Input tab. The only way to restore it is remove pulse files from home directory or use pavucontrol.

Checking pavucontrol in this instance shows that the profile for the card has actually been set to "Off" rather than "Multichannel Input".

Changing the profile in pavucontrol for the UA-101 to "Multichannel Output" shows a 10 channel output device, set up with 10 channel output device (with 8x 7.1 surround channels and 2 auxs) in the Output Devices tab of pavucontrol and a 10 channel input device called "Monitor of EDIROL UA-101 Multichannel" set up with the same channel names as the outputs in the Input Devices tab.

Changing the configuration profile to "Multichannel Input" and the UA-101 device disappears completely and there are no devices representing the UA-101 in either the Output or Input tabs of pavucontrol.

Using Jack2 and QJackCtl works, creating 12 inputs and 10 outputs. QJackCtl log is as follows:

6:11:26.234 Patchbay deactivated.
16:11:26.236 Statistics reset.
16:11:26.239 ALSA connection change.
16:11:26.244 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
16:11:49.545 D-BUS: JACK server is starting...
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
16:11:49.550 D-BUS: JACK server was started (org.jackaudio.service aka jackdbus).
Wed Sep 10 16:11:49 2014: Starting jack server...
Wed Sep 10 16:11:49 2014: JACK server starting in non-realtime mode
Wed Sep 10 16:11:49 2014: ERROR: Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Wed Sep 10 16:11:49 2014: Acquired audio card Audio2
Wed Sep 10 16:11:49 2014: creating alsa driver ... hw:UA101|hw:UA101|1024|2|96000|0|0|nomon|swmeter|-|32bit
Wed Sep 10 16:11:49 2014: configuring for 96000Hz, period = 1024 frames (10.7 ms), buffer = 2 periods
Wed Sep 10 16:11:49 2014: ALSA: final selected sample format for capture: 32bit integer little-endian
Wed Sep 10 16:11:49 2014: ALSA: use 2 periods for capture
Wed Sep 10 16:11:49 2014: ALSA: final selected sample format for playback: 32bit integer little-endian
Wed Sep 10 16:11:49 2014: ALSA: use 2 periods for playback
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_1'
Wed Sep 10 16:11:49 2014: New client 'system' with PID 0
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_2'
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_3'
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_4'
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_5'
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_6'
Wed Sep 10 16:11:49 2014: graph reorder: new port 'system:capture_7'
Wed Sep 10 16:11:49 2014: grap...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/sound/usb/misc/ua101.c

jackd using same period size for playback and capture , playback and capture start at same time but pulseaudio won't start playback and capture at same tone

Revision history for this message
Raymond (superquad-vortex2) wrote :

*
  * Synchronizing the playback rate to the capture rate is done by using
  * the same sequence of packet sizes for both streams.
  * Submitting a playback URB therefore requires both a ready URB and
  * the size of the corresponding capture packet, i.e., both playback
  * and capture URBs must have been completed. Since the USB core does
  * not guarantee that playback and capture complete callbacks are
  * called alternately, we use two FIFOs for packet sizes and read URBs;
  * submitting playback URBs is possible as long as both FIFOs are
  * nonempty.
  */

the driver seem expect same rate for playback and capture

Revision history for this message
David Henningsson (diwic) wrote :

There was a bug with multichannel duplex where the number of output and input channels are different, which should be fixed by:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa?id=02dc6d84edde7af86e155b224b6aa98080ef2979

That fix has not been released into Ubuntu yet, though.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 12.04 (precise) reached end-of-life on April 28, 2017.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Closed due to no response.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.