USB analog only devices sometimes show up with digital profile as well

Bug #940145 reported by David Henningsson
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Fix Released
Undecided
David Henningsson

Bug Description

Sometimes, (I have yet to figure out when!)
USB headsets and mics which are analog only show up with a digital profile as well. While this is probably not a 12.04 regression, with the revamp of the sound settings UI this becomes annoying, as seen in the attached screenshot.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: pulseaudio 1:1.1-0ubuntu10
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: david 10269 F.... pulseaudio
 /dev/snd/controlC0: david 10269 F.... pulseaudio
 /dev/snd/pcmC0D0c: david 10269 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xd4900000 irq 48'
   Mixer name : 'Intel IbexPeak HDMI'
   Components : 'HDA:111d7605,103c1413,00100402 HDA:80862804,80860101,00100000'
   Controls : 23
   Simple ctrls : 11
Card1.Amixer.info:
 Card hw:1 'Headset'/'Logitech Logitech USB Headset at usb-0000:00:1a.0-1.4, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB046d:0a0c'
   Controls : 6
   Simple ctrls : 2
Date: Fri Feb 24 10:06:13 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120103)
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/29/2010
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68AZZ Ver. F.08
dmi.board.name: 1413
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 57.1D
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr68AZZVer.F.08:bd06/29/2010:svnHewlett-Packard:pnHPProBook4520s:pvr:rvnHewlett-Packard:rn1413:rvrKBCVersion57.1D:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP ProBook 4520s
dmi.sys.vendor: Hewlett-Packard
modified.conffile..etc.pulse.default.pa: [modified]
mtime.conffile..etc.pulse.default.pa: 2012-02-09T11:15:19.592182

Related branches

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

The usb headset is shown twice, and the S/PDIF one shouldn't be there.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
assignee: nobody → David Henningsson (diwic)
Revision history for this message
David Henningsson (diwic) wrote :

Pulseaudio log from startup, setting the S/PDIF profile and doing a speaker-test, which worked (sound was output from headset).

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

And here is a log from where this is not happening (i e only the analog profile is showing up).

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

Alsa info from when we digital profile is showing up

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

And here's one from when the digital profile is not showing up.

It seems like a clean boot will cause the digital profile to not show up, and that maybe suspend/resume could be involved in making the device show up, but not sure...

Revision history for this message
David Henningsson (diwic) wrote :
Revision history for this message
David Henningsson (diwic) wrote : [PATCH] USB-Audio: Disable "Logitech USB Headset" iec958 device

Because Logitech USB Headsets do not have any digital devices,
prevent them from being opened. This simplifies probing the
device in PulseAudio.

BugLink: https://bugs.launchpad.net/bugs/940145
Signed-off-by: David Henningsson <email address hidden>
---

I did not get any responses to my "digital profile" mail sent to alsa-devel
Feb 24th, but it seems the easiest workaround is the below patch for alsa-lib.
Alsa-info at:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/940145/+attachment/2778111/+files/alsa-info.txt.xWdouSRV4Z

 src/conf/cards/USB-Audio.conf | 2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
index 0726c34..f488284 100644
--- a/src/conf/cards/USB-Audio.conf
+++ b/src/conf/cards/USB-Audio.conf
@@ -36,6 +36,8 @@ USB-Audio.pcm.surround40_type {
 # number for the iec958 device can be changed here.
 USB-Audio.pcm.iec958_device {
  # "NoiseBlaster 3000" 42
+ # Make sure we can't open this device digitally, because it does not exist
+ "Logitech USB Headset" 999
 }

--
1.7.9

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

Waiting for upstream response...

Changed in pulseaudio (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Clemens Ladisch (clemens-ladisch) wrote : Re: [alsa-devel] [PATCH] USB-Audio: Disable "Logitech USB Headset" iec958 device

David Henningsson wrote:
> Because Logitech USB Headsets do not have any digital devices,
> prevent them from being opened. This simplifies probing the
> device in PulseAudio.
>
> --- a/src/conf/cards/USB-Audio.conf
> +++ b/src/conf/cards/USB-Audio.conf
> @@ -36,6 +36,8 @@ USB-Audio.pcm.surround40_type {
> # number for the iec958 device can be changed here.
> USB-Audio.pcm.iec958_device {
> # "NoiseBlaster 3000" 42
> + # Make sure we can't open this device digitally, because it does not exist
> + "Logitech USB Headset" 999
> }

This introduces a blacklist of devices that do not have digital outputs.
There are lot of other such devices that need such entries to make PA
work better, but at the moment, the only alternative would be a whitelist
of devices with digital outputs, which would have exactly the same
maintenance problems.

As long as there is no mechanism for .conf files to find out whether
a USB device actually has digital outputs, there's no better way to
solve the problem.

Regards,
Clemens

Revision history for this message
David Henningsson (diwic) wrote : [PATCH v2] USB-Audio: Blacklist iec958 for some USB devices

Some common USB devices are analog only, so prevent the digital
devices from being opened. This simplifies probing the device
in PulseAudio.

I have a "Logitech USB Headset" myself, the "Logitech Web Camera"
was reported by Raymond Yau, and the "Blue Snowball" was reported by
Andy Whitcroft.

Cc: Andy Whitcroft <email address hidden>
Cc: Raymond Yau <email address hidden>
BugLink: https://bugs.launchpad.net/bugs/940145
Signed-off-by: David Henningsson <email address hidden>
---
 src/conf/cards/USB-Audio.conf | 5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
index 0726c34..d7c121e 100644
--- a/src/conf/cards/USB-Audio.conf
+++ b/src/conf/cards/USB-Audio.conf
@@ -36,6 +36,11 @@ USB-Audio.pcm.surround40_type {
 # number for the iec958 device can be changed here.
 USB-Audio.pcm.iec958_device {
  # "NoiseBlaster 3000" 42
+
+ # The below don't have digital in/out, so prevent them from being opened.
+ "Logitech USB Headset" 999
+ "Logitech Web Camera" 999
+ "Blue Snowball" 999
 }

--
1.7.9

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

Committed to 12.04 tree, and sent patch upstream.

affects: pulseaudio (Ubuntu) → alsa-lib (Ubuntu)
Changed in alsa-lib (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Achim (ach1m) wrote :

May somebody have a look at Bug #946232.
As it seems I have the same problem with an onboard sound chip.

I am not sure if this is a duplicate of this bug here.

Regards
Achim

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-lib - 1.0.25-1ubuntu9

---------------
alsa-lib (1.0.25-1ubuntu9) precise; urgency=low

  * 0001-USB-Audio-Blacklist-iec958-for-some-USB-devices.patch:
    Hide digital devices on some common, analog-only USB devices
    (LP: #940145)
 -- David Henningsson <email address hidden> Fri, 09 Mar 2012 11:50:30 +0100

Changed in alsa-lib (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lucas Magasweran (lucasrangit) wrote :

Does anyone know what the root cause of this digital in/out appearing? Is it within ALSA or is there something wrong with the USB AudioControl interface descriptor being returned by the USB audio device? I ask because I have a custom USB audio device with this issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.