[USB-Audio - USB PnP Sound Device, playback] volume slider problem: USB headset playback suddenly drops to inaudible when volume is set below a certain level

Bug #1534929 reported by Alexander Klauer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ALSA driver
Unknown
Medium
alsa-driver (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

With this headset:

[ 9922.706941] usb 1-1.4: new full-speed USB device number 4 using ehci-pci
[ 9922.805274] usb 1-1.4: New USB device found, idVendor=1ea7, idProduct=0055
[ 9922.805279] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 9922.805282] usb 1-1.4: Product: USB PnP Sound Device
[ 9922.805284] usb 1-1.4: Manufacturer: C-Media Electronics Inc.
[ 9922.806688] input: C-Media Electronics Inc. USB PnP Sound Device as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.3/input/input12
[ 9922.806802] hid-generic 0003:1EA7:0055.0002: input,hidraw1: USB HID v1.00 Device [C-Media Electronics Inc. USB PnP Sound Device] on usb-0000:00:1a.0-1.4/input3
[ 9922.872746] usbcore: registered new interface driver snd-usb-audio

called "CSL Stormrider Wired Headset", playback becomes suddenly inaudible when the volume slider in the unity sound preferences (accessed via indicator → loudspeaker icon → sound settings) is set to below circa 40 %. Setting to above ~40 % restores playback volume to what you would expect.

In alsamixer, the same problem occurs when going from volume level 02 to volume level 01. At alsamixer level 02, the volume is about what you would expect when setting a volume slider to about 40 %.

This is annoying since 40 % can already be rather loud.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: alsa-base 1.0.25+dfsg-0ubuntu4
ProcVersionSignature: Ubuntu 3.13.0-74.118-generic 3.13.11-ckt30
Uname: Linux 3.13.0-74-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Jan 16 14:25:15 2016
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_Card: Integrated Rate Matching Hub - USB PnP Sound Device
Symptom_Type: Volume slider, or mixer problems
Title: [USB-Audio - USB PnP Sound Device, playback] volume slider problem
UpgradeStatus: Upgraded to trusty on 2014-05-24 (602 days ago)
dmi.bios.date: 12/10/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P1.60
dmi.board.name: B75 Pro3
dmi.board.vendor: ASRock
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP1.60:bd12/10/2012:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnB75Pro3:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: To Be Filled By O.E.M.

Revision history for this message
Alexander Klauer (graf-zahl) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

control.6 { iface MIXER name 'Speaker Playback Volume' value.0 2 value.1 2
comment { access 'read write'
type INTEGER
count 2
range '0 - 151'
dbmin -2837
dbmax -6
dbvalue.0 -2800
dbvalue.1 -2800 } }

What do you mean when you say 40%?

Revision history for this message
Alexander Klauer (graf-zahl) wrote :

The 40 % is roughly the position of the volume slider in the sound settings, i. e., slightly left from the center position between zero volume and maximal volume.

Note that in alsamixer, the situation is different: there the drop occurs between 1 % and 2 % (but alsamixer's 2 % is equivalent to sound setting's ~40 %).

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

Try

amixer -c1 cset "Speaker Playback Volume" x

Where n =0, 1,..., 151

Do you mean pulseaudio cannot provide software atten below hardware min dB -28

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

16) [pulseaudio] protocol-native.c: Client unity-control-center changes volume of sink alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device.analog-stereo.
 Jan 16 14:26:57 erz pulseaudio[2801]: ( 41.752| 0.000) [alsa-sink-USB Audio] alsa-sink.c: Requested volume: 0: 31% 1: 31%
Jan 16 14:26:57 erz pulseaudio[2801]: ( 41.752| 0.000) [alsa-sink-USB Audio] alsa-sink.c: in dB: 0: -30,56 dB 1: -30,56 dB
Jan 16 14:26:57 erz pulseaudio[2801]: ( 41.752| 0.000) [alsa-sink-USB Audio] alsa-sink.c: Got hardware volume: 0: 34% 1: 34%
Jan 16 14:26:57 erz pulseaudio[2801]: ( 41.752| 0.000) [alsa-sink-USB Audio] alsa-sink.c: in dB: 0: -28,31 dB 1: -28,31 dB
Jan 16 14:26:57 erz pulseaudio[2801]: ( 41.752| 0.000) [alsa-sink-USB Audio] alsa-sink.c: Calculated software volume: 0: 92% 1: 92% (accurate-enough=no)
Jan 16 14:26:57 erz pulseaudio[2801]: ( 41.752| 0.000) [alsa-sink-USB Audio] alsa-sink.c: in dB: 0: -2,25 dB 1: -2,25 dB

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

Hardware min is -28.73 and user request -31, this mean pulseaudio need to provide -2.27 atten

Revision history for this message
Alexander Klauer (graf-zahl) wrote :

When I do:

$ amixer -c1 cset iface=MIXER,name='Speaker Playback Volume',index=0 3
numid=6,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=151,step=0
  : values=3,3
  | dBminmax-min=-28.37dB,max=-0.06dB

playback becomes inaudible. When I do:

$ amixer -c1 cset iface=MIXER,name='Speaker Playback Volume',index=0 4
numid=6,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=151,step=0
  : values=4,4
  | dBminmax-min=-28.37dB,max=-0.06dB

playback becomes loudly audible again.

Is the pulseaudio attenuation something I can set up myself?

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

You need pulseaudio ignore hardware volume control by specify ignore_DB=1 when pulseaudio load module-udev-detect

Revision history for this message
Raymond (superquad-vortex2) wrote :
Changed in alsa-driver (Ubuntu):
status: New → Incomplete
Revision history for this message
In , Yanpas (yanpaso) wrote :

Without pulseaudio volume level is detected correctly. (I 've changed default card in /etc/asound.conf, then ran `speaker-test -c6 -twav` and set volume in alsamixer to 3 per centages)
With pulseaudio:
1) Headset is loud, even on lowest possible volume level
2) If I set volume below 35 per centages (below -27 db) the output becomes silent immediately.
3) On some computers, there is possibility to change analog mode to digital (S/PDIF). With digital mode it becomes calmer: the loudest volume level produces low volume, it is the same as 35% of analog mode, and the lowest volume level may be still determined.

Tested with latest versions (ubuntu xenial):
Version 7.1
kernel 4.4

cat /proc/asound/card3/pcm0p/info
card: 3
device: 0
subdevice: 0
stream: PLAYBACK
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

Revision history for this message
In , Yanpas (yanpaso) wrote :

from lshw
            *-usbhost
                product: OHCI PCI host controller
                vendor: Linux 4.4.0-2-generic ohci_hcd
                physical id: 1
                bus info: usb@7
                logical name: usb7
                version: 4.04
                capabilities: usb-1.10
                configuration: driver=hub slots=4 speed=12Mbit/s
              *-usb
                   description: Audio device
                   product: Creative HS-720 Headset
                   vendor: Creative Technology Ltd.
                   physical id: 1
                   bus info: usb@7:1
                   version: 1.00
                   capabilities: usb-1.10 audio-control
                   configuration: driver=usbhid maxpower=100mA speed=12Mbit/s

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

You can use ignore_db=1 If pulseaudio don't. Like dB range -28.37 dB to 0dB

state.Headset {
control.1 { iface MIXER name 'PCM Playback Switch'
 value true comment { access 'read write'
type BOOLEAN
 count 1 } }
control.2 { iface MIXER name 'PCM Playback Volume'
value.0 12 value.1 12 comment { access 'read write'
 type INTEGER
count 2
range '0 - 38' dbmin -2837 dbmax -6
dbvalue.0 -1943 dbvalue.1 -1943 } }

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

Can you provide the log when you change the volume slider?

Do the volume change when you change from step 0 to step 38 using alsa mixer

-28.37 to -0.06 dB

Revision history for this message
In , Raymond (superquad-vortex2) wrote :
Revision history for this message
In , Yanpas (yanpaso) wrote :

Created attachment 121624
vvvvlog

I've made log according to this guide https://wiki.ubuntu.com/PulseAudio/Log :
`LANG=C pulseaudio -vvvv --log-time=1 > ~/pulseverbose.log 2>&1`

Revision history for this message
In , Yanpas (yanpaso) wrote :

1)I've searched over the internet and have found the same issue as mine (35% too), but with another usb audio card :
https://chrisjean.com/fix-for-usb-audio-is-too-loud-and-mutes-at-low-volume-in-ubuntu/
Some notes from this guide helped me: I 've changed "volume = merge" to "volume = ignore" in /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

Situation now is much much better: headset behave as they should be (the same like in digital mode), but the maximum volume is not loud enough imho (120-130% would be fine). Setting volume over 100% causes overdrive (headset may play louder without overdrives according to my past expirience).

Maybe making such config default is good idea? (replace merge with ignore)

2) I 'm using windows-dualboot and I have noticed that 100% volume on windows is always louder that 100% on linux (with PA)

3) In which file should I place "ignore_db=1"?

4) Is it dangerous to recalibrate my headsets? Should I use any program (I don't know which) to provide range which I consider correct? And which units should I use ? (dB, volts, some virtual usb units etc.) I guess such patches should be sent to alsa project or kernel, not PA.

Revision history for this message
In , Yanpas (yanpaso) wrote :

Nevermind point 3. "load-module module-udev-detect use_ucm=0 ignore_dB=1" in /etc/pulse/default.pa is far better solution. The volume may be still extreme loud, but I won't set it over 45%.
From all above I conclude:
1) It's not PA fault, but some default configurations may be altered in pulseaudio. Why not to make ignore_dB=1 default?
2) According to latest comment here: https://chrisjean.com/fix-for-usb-audio-is-too-loud-and-mutes-at-low-volume-in-ubuntu/
On some architectures (amd64) or most motherboards creative and some other cards are too loud, and I should have talks with kernel devs with this problem

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

1.814| 0.000) I: [pulseaudio] alsa-sink.c: Hardware volume ranges from -28,37 dB to -0,06 dB. ( 1.814| 0.000) I: [pulseaudio] alsa-sink.c: Fixing base volume to 0,06 dB ( 1.814| 0.000) I: [pulseaudio] alsa-sink.c: Using hardware volume control. Hardware dB scale supported. ( 1.814| 0.000) I: [pulseaudio] alsa-sink.c: Using hardware mute control. ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_dump(): ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: Hardware PCM card 2 'Creative HS-720 Headset' device 0 subdevice 0 ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: Its setup is: ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: stream : PLAYBACK ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: access : MMAP_INTERLEAVED ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: format : S16_LE ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: subformat : STD ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: channels : 2 ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: rate : 44100
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: exact rate : 44100 (44100/1)
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: msbits : 16
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: buffer_size : 88200
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: period_size : 44100
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: period_time : 1000000
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: tstamp_mode : ENABLE
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: period_step : 1
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: avail_min : 87319
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: period_event : 0
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: start_threshold : -1
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: stop_threshold : 6206523236469964800
 ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: silence_threshold: 0
 ( 1.814| 0.000) D: [pulseaudio] alsa-util.c: silence_size : 0
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: boundary : 6206523236469964800
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: appl_ptr : 0
( 1.814| 0.000) D: [pulseaudio] alsa-util.c: hw_ptr : 0
( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: Requested volume: 0: 35% 1: 35%
( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: in dB: 0: -27,14 dB 1: -27,14 dB
 ( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: Got hardware volume: 0: 36% 1: 36%
 ( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: in dB: 0: -26,82 dB 1: -26,82 dB ( 1.815| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Thread starting up
( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: Calculated software volume: 0: 99% 1: 99% (accurate-enough=no)
( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: in dB: 0: -0,32 dB 1: -0,32 dB
( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: Written HW volume did not match with the request: 0: 35% 1: 35% (request) != 0: 36% 1: 36%
 ( 1.815| 0.000) D: [pulseaudio] alsa-sink.

Revision history for this message
In , Yanpas (yanpaso) wrote :

Created attachment 121649
alsainfo

That's my alsainfo.sh output.
BTW, the log, which was uploaded before was made under these circumstances: I've changed volume from about 25 to 40 per cents. I didn't understand what am I exactly to do, particalrly which interpreter to use for the script you wrote in comment 2

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

dB per step = (28.37-0.06)/38 = 0.745 dB per step

 min dB -28.37, -27.625 , -26.88

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

(In reply to Yan Pashkovsky from comment #6)
> 1)I've searched over the internet and have found the same issue as mine (35%
> too), but with another usb audio card :
> https://chrisjean.com/fix-for-usb-audio-is-too-loud-and-mutes-at-low-volume-
> in-ubuntu/
> Some notes from this guide helped me: I 've changed "volume = merge" to
> "volume = ignore" in
> /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common
>
> Situation now is much much better: headset behave as they should be (the
> same like in digital mode), but the maximum volume is not loud enough imho
> (120-130% would be fine). Setting volume over 100% causes overdrive (headset
> may play louder without overdrives according to my past expirience).
>
> Maybe making such config default is good idea? (replace merge with ignore)

>
687| 0.000) I: [pulseaudio] alsa-sink.c: Hardware volume ranges from -179,00 dB to 0,00 dB.
 ( 1.687| 0.000) I: [pulseaudio] alsa-sink.c: Fixing base volume to 0,00 dB
 ( 1.687| 0.000) I: [pulseaudio] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
( 1.687| 0.000) I: [pulseaudio] alsa-sink.c: Using hardware mute control.
( 1.687| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_dump():
( 1.687| 0.000) D: [pulseaudio] alsa-util.c: Soft volume PCM
( 1.687| 0.000) D: [pulseaudio] alsa-util.c: Control: PCM Playback Volume
( 1.687| 0.000) D: [pulseaudio] alsa-util.c: min_dB: -51
 ( 1.687| 0.000) D: [pulseaudio] alsa-util.c: max_dB: 0
( 1.687| 0.000) D: [pulseaudio] alsa-util.c: resolution: 256

Pulseaudio seem ignore softvol plugin PCM as realtek alc892 dB range is obly 9x

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

state.IntelHDA { control.1 { comment.access 'read write' comment.type INTEGER comment.count 2 comment.range '0 - 64' comment.dbmin -6400 comment.dbmax 0 iface MIXER name 'Front Playback Volume' value.0 64 value.1 64 }

Alc892 only have 64 steps and each step is 1dB

How do pulseaudio calculate -179dB?

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

Front + virtual Master + PCM softvol = -64 -64 -51 = -179

do the volume range correct?

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

1.815| 0.000) D: [pulseaudio] alsa-sink.c: in dB: 0: -27,14 dB 1: -27,14 dB ( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: Got hardware volume: 0: 36% 1: 36% ( 1.815| 0.000) D: [pulseaudio] alsa-sink.c: in dB: 0: -26,82 dB 1: -26,82 dB ( 1

There is no hardware volume at -26.82 dB

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

why pulseaudio adjust dB by -0.06

-26.88 = -26.82 - 0.06

Revision history for this message
Alexander Klauer (graf-zahl) wrote :

Forget my previous comment. The correct option name is "ignore_dB", not "ignore_DB". With that, the bug is gone. Thanks!

Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/446.

Changed in alsa-driver:
importance: Unknown → Medium
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.