[USB-Audio - USB Audio, playback] Playback problem Playback only at maximum level, if the volume is turned down just a little no sound is played.

Bug #1200925 reported by guenthul
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The headphones worked with 10.04 at any volume level.
Now the headphones work only at maximum volume level (tested with 11.10, 12.04 13.04) if the volume is turned down just a little no sound is played.

lsb_release -rd:
Description: Ubuntu 12.04.2 LTS
Release: 12.04

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: alsa-base 1.0.25+dfsg-0ubuntu1.1
ProcVersionSignature: Ubuntu 3.2.0-49.75-generic 3.2.46
Uname: Linux 3.2.0-49-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu17.3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: ulrich 8418 F.... pulseaudio
 /dev/snd/controlC0: ulrich 8418 F.... pulseaudio
 /dev/snd/pcmC0D0c: ulrich 8418 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfd800000 irq 50'
   Mixer name : 'Intel IbexPeak HDMI'
   Components : 'HDA:11060448,15585130,00100000 HDA:80862804,15585130,00100000'
   Controls : 38
   Simple ctrls : 20
Card1.Amixer.info:
 Card hw:1 'Audio'/'USB Audio at usb-0000:00:1a.0-1.1.1, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB0d8c:0006'
   Controls : 12
   Simple ctrls : 7
Date: Sat Jul 13 15:08:49 2013
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=de_AT:de
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
SourcePackage: alsa-driver
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:Audio failed
Symptom_Card: Storm HP-USB500 5.1 Headset - USB Audio
Symptom_Type: None of the above
Title: [USB-Audio - USB Audio, playback] Playback problem
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/27/2010
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.asset.tag: Tag 12345
dmi.board.name: B5130M
dmi.board.vendor: CLEVO CO.
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd08/27/2010:svnCLEVOCO.:pnB5130M:pvrNotApplicable:rvnCLEVOCO.:rnB5130M:rvrNotApplicable:cvnNoEnclosure:ct9:cvrN/A:
dmi.product.name: B5130M
dmi.product.version: Not Applicable
dmi.sys.vendor: CLEVO CO.

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

Simple mixer control 'Speaker',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 37
  Mono: Playback 0 [0%] [0.00dB] [on]

Default sink name: alsa_output.usb-0d8c_USB_Audio-00-Audio.analog-surround-71

   index: 0
 name: <alsa_output.usb-0d8c_USB_Audio-00-Audio.analog-surround-71.monitor>
 driver: <module-alsa-card.c>
 flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
 state: SUSPENDED
 suspend cause: IDLE
 priority: 1040
 volume: 0: 100% 1: 100% 2: 100% 3: 100% 4: 100% 5: 100% 6: 100% 7: 100%
         0: 0,00 dB 1: 0,00 dB 2: 0,00 dB 3: 0,00 dB 4: 0,00 dB 5: 0,00 dB 6: 0,00 dB 7: 0,00 dB
         balance 0,00
 base volume: 100%
              0,00 dB
 volume steps: 65537
 muted: no

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

post the output of alsa-info.sh

lsusb -vvv

and pulseaudio verbose log

Revision history for this message
guenthul (ulrich-guenther) wrote :
Download full text (25.7 KiB)

if i enter the command: lsusb -vvv > lsubvvv
this is displayed:
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing

this is the output:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 0 Full speed (or root) hub
  bMaxPacketSize0 64
  idVendor 0x1d6b Linux Foundation
  idProduct 0x0002 2.0 root hub
  bcdDevice 3.02
  iManufacturer 3
  iProduct 2
  iSerial 1
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 25
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xe0
      Self Powered
      Remote Wakeup
    MaxPower 0mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 9 Hub
      bInterfaceSubClass 0 Unused
      bInterfaceProtocol 0 Full speed (or root) hub
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0004 1x 4 bytes
        bInterval 12

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 0 Full speed (or root) hub
  bMaxPacketSize0 64
  idVendor 0x1d6b Linux Foundation
  idProduct 0x0002 2.0 root hub
  bcdDevice 3.02
  iManufacturer 3
  iProduct 2
  iSerial 1
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 25
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xe0
      Self Powered
      Remote Wakeup
    MaxPower 0mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 9 Hub
      bInterfaceSu...

Revision history for this message
guenthul (ulrich-guenther) wrote :

post the output of alsa-info.sh <-- where is this on my system?

lsusb -vvv <-- done

and pulseaudio verbose log <-- what is the command for this, where do i find this?

Revision history for this message
guenthul (ulrich-guenther) wrote :
Revision history for this message
Benjamin Tegge (livewirebt) wrote :

This may be of help:
https://wiki.ubuntu.com/Audio/AlsaInfo
https://wiki.ubuntu.com/PulseAudio/Log

Also please read https://wiki.ubuntu.com/DebuggingSoundProblems till the end and follow the instructions that apply to your situation.

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

you may need to report to alsa devel mailiNY list if it work on Ubuntu 10.10

      AudioControl Interface Descriptor:
        bLength 25
        bDescriptorType 36
        bDescriptorSubtype 4 (MIXER_UNIT)
        bUnitID 12
        bNrInPins 3
        baSourceID( 0) 1
        baSourceID( 1) 9
        baSourceID( 2) 11
        bNrChannels 8
        wChannelConfig 0x063f
          Left Front (L)
          Right Front (R)
          Center Front (C)
          Low Freqency Enhancement (LFE)
          Left Surround (LS)
          Right Surround (RS)
          Side Left (SL)
          Side Right (SR)
        iChannelNames 0
        bmControls 0x00
        bmControls 0x00
        bmControls 0x00
        iMixer 0
        junk at descriptor end: 00 00 00 00 00 00 00 00 00

Revision history for this message
guenthul (ulrich-guenther) wrote :
Revision history for this message
guenthul (ulrich-guenther) wrote :

PulseAudio verbose log

Revision history for this message
guenthul (ulrich-guenther) wrote :

Here is the AlsaInfo from Ubuntu 10.04LTS where there is no bug for comparison: http://www.alsa-project.org/db/?f=5824e55345c3f7128937405254485a489886b9dc

Revision history for this message
guenthul (ulrich-guenther) wrote :

Here is the PulseAudio verbose log from Ubuntu 10.04LTS for comparison.

Revision history for this message
guenthul (ulrich-guenther) wrote :

Nevermind comment #11 i misread, i tested Ubuntu 10.10 it works. Where do i find the alsa devel mailiNY list? Is it http://www.spinics.net/lists/alsa-devel/ ?

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :
Download full text (4.0 KiB)

http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

( 1.094| 0.001) I: alsa-sink.c: Using 2.0 fragments of size 524288 bytes (743.04ms), buffer size is 1048576 bytes (1486.08ms)
( 1.094| 0.000) I: alsa-sink.c: Time scheduling watermark is 20.00ms
( 1.094| 0.000) D: alsa-sink.c: hwbuf_unused=0
( 1.094| 0.000) D: alsa-sink.c: setting avail_min=64654
( 1.094| 0.000) D: alsa-mixer.c: Activating path analog-output-speaker
( 1.095| 0.000) D: alsa-mixer.c: Path analog-output-speaker (Analog Speakers), direction=1, priority=100, probed=yes, supported=yes, has_mute=yes, has_volume=no, has_dB=yes, min_volume=0, max_volume=37, min_dB=0, max_dB=0.14
( 1.095| 0.000) D: alsa-mixer.c: Element Speaker, direction=1, switch=1, volume=1, enumeration=0, required=4, required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=yes
( 1.095| 0.000) I: alsa-sink.c: Driver does not support hardware volume control, falling back to software volume control.
( 1.095| 0.000) I: alsa-sink.c: Using hardware mute control.
( 1.095| 0.000) D: alsa-util.c: snd_pcm_dump():
( 1.095| 0.000) D: alsa-util.c: Route conversion PCM
( 1.095| 0.000) D: alsa-util.c: Transformation table:
( 1.095| 0.000) D: alsa-util.c: 0 <- 0
( 1.095| 0.000) D: alsa-util.c: 1 <- 1
( 1.095| 0.000) D: alsa-util.c: 2 <- 4
( 1.095| 0.000) D: alsa-util.c: 3 <- 5
( 1.095| 0.000) D: alsa-util.c: 4 <- 2
( 1.095| 0.000) D: alsa-util.c: 5 <- 3
( 1.095| 0.000) D: alsa-util.c: 6 <- 6
( 1.095| 0.000) D: alsa-util.c: 7 <- 7
( 1.095| 0.000) D: alsa-util.c: Its setup is:
( 1.095| 0.000) D: alsa-util.c: stream : PLAYBACK
( 1.095| 0.000) D: alsa-util.c: access : MMAP_INTERLEAVED
( 1.095| 0.000) D: alsa-util.c: format : S16_LE
( 1.095| 0.000) D: alsa-util.c: subformat : STD
( 1.095| 0.000) D: alsa-util.c: channels : 8
( 1.095| 0.000) D: alsa-util.c: rate : 44100
( 1.095| 0.000) D: alsa-util.c: exact rate : 44100 (44100/1)
( 1.095| 0.000) D: alsa-util.c: msbits : 16
( 1.095| 0.000) D: alsa-util.c: buffer_size : 65536
( 1.095| 0.000) D: alsa-util.c: period_size : 32768
( 1.095| 0.000) D: alsa-util.c: period_time : 743038
( 1.095| 0.000) D: alsa-util.c: tstamp_mode : ENABLE
( 1.095| 0.000) D: alsa-util.c: period_step : 1
( 1.095| 0.000) D: alsa-util.c: avail_min : 64654
( 1.095| 0.000) D: alsa-util.c: period_event : 0
( 1.095| 0.000) D: alsa-util.c: start_threshold : -1
( 1.095| 0.000) D: alsa-util.c: stop_threshold : 1073741824
( 1.095| 0.000) D: alsa-util.c: silence_threshold: 0
( 1.095| 0.000) D: alsa-util.c: silence_size : 0
( 1.095| 0.000) D: alsa-util.c: boundary : 1073741824
( 1.095| 0.000) D: alsa-util.c: Slave: Hardware PCM card 1 'USB Audio' device 0 subdevice 0

( 0.121| 0.000) D: [pulseaudio] alsa-mixer.c: Removing path 'analog-output' as it is a subset of 'analog-output-speaker'.
( 0.121| 0.000) D: [pulseaudio] alsa-mixer.c: Available mixer paths (after tidying):
( 0.121| 0.000) D...

Read more...

Revision history for this message
guenthul (ulrich-guenther) wrote :

Ubuntu 13.04 with Ubuntu Krenel 3.10.1 from mainline.
Alsa-info: http://www.alsa-project.org/db/?f=da9527e74dc0a7ced7b62e54aa510f864e16ed7d .
cat /proc/asoud/cards:

 0 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf7eb8000 irq 43
 1 [Audio ]: USB-Audio - USB Audio
                      USB Audio at usb-0000:00:1d.1-1, full speed

lspci -v | grep -A7 -i "audio":

00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
 Subsystem: ASUSTeK Computer Inc. Device 831a
 Flags: bus master, fast devsel, latency 0, IRQ 43
 Memory at f7eb8000 (64-bit, non-prefetchable) [size=16K]
 Capabilities: <access denied>
 Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02) (prog-if 00 [Normal decode])

sudo aplay -l:
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Intel [HDA Intel], Gerät 0: ALC269 Analog [ALC269 Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: Audio [USB Audio], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 0/1
  Sub-Gerät #0: subdevice #0

Pulseverbose.log included.

Revision history for this message
guenthul (ulrich-guenther) wrote :

Lsusb -vvv from Ubuntu 13.04 with Kernel 3.10.1 from mainline.

Revision history for this message
guenthul (ulrich-guenther) wrote :

Could someone from Kernel have a look at this, looks like pulse audio and ALSA get incorrect/incomplete information for the device.

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

control.6 {
  comment.access 'read write'
  comment.type INTEGER
  comment.count 1
  comment.range '0 - 37'
  comment.dbmin 0
  comment.dbmax 14
  iface MIXER
  name 'Speaker Playback Volume'
  value 30
 }

dB range (0 to 0.14) is different from datasheet

Revision history for this message
guenthul (ulrich-guenther) wrote :

Datasheed for cm106l by CMEDIA which is peresnt in this headset.

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

The calculation of the dB value depends on whether you are working with amplitude values or power values. For power values, the formula is 10·log10(x), with x the relative power. For amplitude values, the formula is 20·log10(x).

for DAC

log10(0.006) = -2.2218

refer to 5. FUNCTION BLOCK DIAGRAM OF CM106-F+/L+

step 0 ~ 37
volume is 0 ~ -45dB

8.2 ADC VOLUME CONTROL

step 0 ~ 15
0 ~ 22.5 dB

8.3 MIC / LINE-IN MONITOR VOLUME CONTROL

step 0 ~ 31
-33 ~ 12 dB

USB Mixer: usb_id=0x0d8c0006, ctrlif=0, ctlerr=0
Card: USB Audio at usb-0000:00:1d.1-1, full speed
  Unit: 2
    Control: name="PCM Capture Volume", index=0
    Info: id=2, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=0, max=4095, dBmin=0, dBmax=1599
  Unit: 7
    Control: name="PCM Capture Source", index=0
    Info: id=7, control=0, cmask=0x0, channels=1, type="U8"
    Volume: min=1, max=4, dBmin=0, dBmax=0
  Unit: 8
    Control: name="Auto Gain Control", index=0
    Info: id=8, control=7, cmask=0x0, channels=1, type="BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0
  Unit: 8
    Control: name="Mic Capture Volume", index=0
    Info: id=8, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=0, max=4095, dBmin=0, dBmax=1599
  Unit: 9
    Control: name="Mic Playback Volume", index=0
    Info: id=9, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=0, max=8191, dBmin=0, dBmax=3199
  Unit: 9
    Control: name="Mic Playback Switch", index=0
    Info: id=9, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0
  Unit: 11
    Control: name="Line Playback Volume", index=0
    Info: id=11, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=0, max=8191, dBmin=0, dBmax=3199
  Unit: 11
    Control: name="Line Playback Switch", index=0
    Info: id=11, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0
  Unit: 13
    Control: name="Speaker Playback Volume", index=0
    Info: id=13, control=2, cmask=0x0, channels=1, type="S16"
    Volume: min=0, max=37, dBmin=0, dBmax=14
  Unit: 13
    Control: name="Speaker Playback Switch", index=0
    Info: id=13, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0
  Unit: 15
    Control: name="Line Capture Volume", index=0
    Info: id=15, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=0, max=4095, dBmin=0, dBmax=1599
  Unit: 16
    Control: name="IEC958 In Capture Switch", index=0
    Info: id=16, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0

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

http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/usb/mixer.c

 /* USB descriptions contain the dB scale in 1/256 dB unit
  * while ALSA TLV contains in 1/100 dB unit
  */
 cval->dBmin = (convert_signed_value(cval, cval->min) * 100) / 256;
 cval->dBmax = (convert_signed_value(cval, cval->max) * 100) / 256;

switch (cval->mixer->chip->usb_id) {
 case USB_ID(0x0d8c, 0x6):
   if (!strcmp(kctl->id.name, "Speaker Playback Volume")) {

you need to overwrite cval->dBmin and cval->dBmax for the Speaker Playback volume

  }
  break;
}

 if (cval->dBmin > cval->dBmax)

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

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

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Raymond (superquad-vortex2) wrote :

you have to ask usb audio maintainer how to add the dB table of the datasheet into the driver

so far , only emu10k1/emufx.c use a table for dB scale

Revision history for this message
Simon (silver-death) wrote :

In
http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/usb/mixer.c
I think your code-piece might be set better some lines above (807-905) in the section
/* volume control quirks */
static void volume_control_quirks(struct usb_mixer_elem_info *cval,
      struct snd_kcontrol *kctl)
{

...

case USB_ID(0x0d8c, 0x6):
   if (!strcmp(kctl->id.name, "Speaker Playback Volume")) {

  cval->min = ????
  cval->max = ????
  cval->res = ??? /* Maybe this is also needed */

  }
  break;

...

}

Where we don't need to know the dB's. I hope that's correct.

Or why did you choose this section?

Revision history for this message
Simon (silver-death) wrote :

Anything new?

Revision history for this message
guenthul (ulrich-guenther) wrote :

No, i don't know how to try out the changes and it's still the same for Ubuntu 14.04, but with $ alsamixer i am able to "control" the volume at least somewhat (so my ears don't fall off).

Revision history for this message
Simon (silver-death) wrote :

Sorry for that ambiguity. I knew that this bug still exists and i'm as helpless as you. The question was directed to the alsa-developer. In march, I tried to contact them trough their mailinglist with no success.

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

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Invalid
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.