Bug 88265 - Incorrect volume in sound indicator
Summary: Incorrect volume in sound indicator
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 11:20 UTC by Joshua Rogers
Modified: 2018-07-30 10:11 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Sound indicator and alsamixer in one picture (153.17 KB, text/plain)
2015-01-10 11:20 UTC, Joshua Rogers
Details
lspci verbose4 (8.50 KB, text/plain)
2015-01-11 03:31 UTC, Joshua Rogers
Details
root lspci verbose 4 (22.98 KB, text/plain)
2015-01-11 03:33 UTC, Joshua Rogers
Details
lsusb -vvvv run as root (29.48 KB, text/plain)
2015-01-11 09:22 UTC, Joshua Rogers
Details

Description Joshua Rogers 2015-01-10 11:20:44 UTC
Created attachment 112054 [details]
Sound indicator and alsamixer in one picture

Hi,

I'm using a Bose Companion 5 set of speakers, but I'm having a problem with setting the volume in pulseaudio.

In 'alsamixer', the volume indicator is correct, but in  the control center and or sound indicator, the volume is incorrect.

If I remember correctly(this has been happening for years, but I stopped using my speakers), when I was using `mocp', 90% in pulseaudio would be where the volume starts. 91% was 10%, 92% was 20%, etc. etc.


Any known workaroudns in the meantime?

Thanks,
Comment 1 Raymond 2015-01-10 14:17:09 UTC
post the output of alsa-info.sh
Comment 3 Raymond 2015-01-11 03:17:14 UTC
error messages in system log

-
[ 7723.379216] usb 1-1: 1:1: cannot get freq at ep 0x1
[ 7723.396008] usbcore: registered new interface driver snd-usb-audio
[ 7735.811657] usb 1-1: 1:1: cannot get freq at ep 0x1



control.3 {
		iface MIXER
		name 'PCM Playback Volume'
		value 100
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 100'
			dbmin -312
			dbmax 0
			dbvalue.0 0
		}
	}

dB range from -3.12 dB to 0dB


https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

you should file bug report 

and post the output of 

lspci -vvvv



state.Audio {
	control.1 {
		iface PCM
		name 'Playback Channel Map'
		value.0 3
		value.1 4
		value.2 7
		value.3 8
		value.4 9
		value.5 10
		comment {
			access read
			type INTEGER
			count 6
			range '0 - 36'
		}


do usb audio support stereo ?

aplay -Dhw:1 --dump-hw-params   any.wav
Comment 4 Raymond 2015-01-11 03:18:18 UTC
lsusb -vvvv
Comment 5 Joshua Rogers 2015-01-11 03:27:57 UTC
$ aplay -Dhw:1 --dump-hw-params   /usr/share/sounds/purple/login.wav
Playing WAVE '/usr/share/sounds/purple/login.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Stereo
HW Params of device "hw:1":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 96
CHANNELS: 6
RATE: 48000
PERIOD_TIME: [1000 910209)
PERIOD_SIZE: [48 43690]
PERIOD_BYTES: [576 524280]
PERIODS: [2 1024]
BUFFER_TIME: [2000 1820438)
BUFFER_SIZE: [96 87381]
BUFFER_BYTES: [1152 1048572]
TICK_TIME: ALL
--------------------
aplay: set_params:1239: Channels count not available
Comment 6 Joshua Rogers 2015-01-11 03:31:27 UTC
Created attachment 112083 [details]
lspci verbose4

Here is lspci -vvvv (It doesn't seem to contain anything about the speakers?)
I wasn't sure if you wanted me to also post it here, since your second comment just said lspci -vvvv.

Thanks
Comment 7 Joshua Rogers 2015-01-11 03:33:04 UTC
Created attachment 112084 [details]
root lspci verbose 4

I probably should have run that as root.
Here's the root version.
Comment 8 Raymond 2015-01-11 09:10:18 UTC
your usb audio only support 6 channel and has pcm playback volume control with very small dB range from -3.12 dB to 0dB
 
the work around is ignore dB range by specify

 ignore_dB=1

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index53h3


USB Mixer: usb_id=0x05a71020, ctrlif=0, ctlerr=0
Card: Bose Corporation Bose USB Audio at usb-0000:00:14.0-1, full speed
  Unit: 3
    Control: name="PCM Playback Volume", index=0
    Info: id=3, control=2, cmask=0x0, channels=1, type="S16"
    Volume: min=-801, max=-1, dBmin=-312, dBmax=0
  Unit: 3
    Control: name="PCM Playback Switch", index=0
    Info: id=3, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0


post output of your usb audio device



lsusb -vvvv
Comment 9 Joshua Rogers 2015-01-11 09:22:04 UTC
Created attachment 112086 [details]
lsusb -vvvv run as root

Mm. Sorry about that. I misread it as lspci.
Comment 10 Joshua Rogers 2015-01-11 09:24:18 UTC
 ignore_dB=1
works a treat. Thanks a lot! :)
Should I close the kernel.org bug report? Or is it still valid?(i.e sending the wrong dB)

Thanks
Comment 11 Raymond 2016-05-23 03:02:52 UTC
	control.3 {
		iface MIXER
		name 'PCM Playback Volume'
		value 100
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 100'
			dbmin -312
			dbmax 0
			dbvalue.0 0
		}
	}

it only aupport 6 channels and dB range need to be fixed since -3.12 seem not enough


Bus 001 Device 012: ID 05a7:1020 Bose Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x05a7 Bose Corp.
  idProduct          0x1020 
  bcdDevice            1.00
  iManufacturer           1 Bose Corporation
  iProduct                2 Bose USB Audio
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          146
    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         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           44
        bInCollection           1
        baInterfaceNr( 0)       1
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             6
        wChannelConfig     0x003f
          Left Front (L)
          Right Front (R)
          Center Front (C)
          Low Freqency Enhancement (LFE)
          Left Surround (LS)
          Right Surround (RS)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 3
        bSourceID               1
        bControlSize            1
        bmaControls( 0)      0x03
          Mute Control
          Volume Control
        bmaControls( 1)      0x00
        bmaControls( 2)      0x00
        bmaControls( 3)      0x00
        bmaControls( 4)      0x00
        bmaControls( 5)      0x00
        bmaControls( 6)      0x00
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               3
        iTerminal               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             6
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0240  1x 576 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
Comment 13 GitLab Migration User 2018-07-30 10:11:40 UTC
-- 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/258.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.