Hi, I use a CM109 headset. The device has very little volume range under Linux. When I reduce the volume below about 35%, it suddenly become inadudible. I confirmed that it has good range when used with Windows. Additionally, there is a line in dmesg: "cm109 1-1:1.3: cm109_toggle_buzzer_sync: usb_control_msg() failed -19" Not sure if this is related or not. Thanks for looking into this.
USB Mixer: usb_id=0x0d8c000e, ctrlif=0, ctlerr=0 Card: Generic USB Audio Device at usb-0000:00:1d.7-3.2, full speed Unit: 9 Control: name="Speaker Playback Volume", index=0 Info: id=9, control=2, cmask=0x3, channels=2, type="S16" Volume: min=-7264, max=-16, dBmin=-2837, dBmax=-6 https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/637066 do the patch fix the problem ?
I'm sorry I don't compile my own kernels, so I couldn't try the patch. My apologies.
are you using pulseaudio volume control ? if your USB audio is card 0 try using alsamixer -c 0 you can also set pulseaudio ignore dB scale and let pulseaudio use software volume https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=d6f598ab3e1cdb71dc3b408592d06bba23f53a71
Thanks again for the reply. I tried "alsamixer -c 1" (my headphones are plugged in later, so card 1) but it reacts the same. The volume is either loud or completely silent. As for making pulseaudio ignore the dB scale, is this what you are referring to? http://tombuntu.com/index.php/2010/05/09/fix-volume-range-issue-in-pulseaudio/ This does seem to work well for me. It would just be nice if users didn't have to muck around with the pulseaudio config files. Could this be set on a per-driver basis, and by default for CM109? Thanks again!
can you post the output of alsa-info,sh and lsusb -vvvv ? http://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Decibel/ http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=34bb514b5fd1d6f91ba9a7b3a70b0ea0c6014250 alsamixer seem use linear scale when dB range is less than 24dB dBmin=-2837, dBmax=-6 22.37
Sure, here are the logs: http://pastebin.mozilla.org/4798566 http://pastebin.mozilla.org/4798564 The "Planet UP-100, Genius G-Talk" device is the one in question. I also tried this on an Asus 4810T laptop running the 3.10 kernel, and it behaved the same way.
idVendor 0x0d8c C-Media Electronics, Inc. idProduct 0x000e Audio Adapter (Planet UP-100, Genius G-Talk) bcdDevice 1.00 iManufacturer 0 iProduct 1 Generic USB Audio Device https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=c04148f915e5ba7947752e6348e0da4cdab1329e the playback volume control with steps from 0 to 151 and -48.87dB to -0.06dB at which step do the sound volume change ? try increase the volume one step at a time where x from 0 to 151 amixer -c1 set "PCM Playback Volume" x control.3 { iface MIXER name 'PCM Playback Switch' value true comment { access 'read write' type BOOLEAN count 1 } } control.4 { iface MIXER name 'PCM Playback Volume' value.0 55 value.1 55 comment { access 'read write' type INTEGER count 2 range '0 - 151' dbmin -2837 dbmax -6 dbvalue.0 -1806 dbvalue.1 -1806 } } control.5 { iface MIXER name 'Mic Capture Switch' value true comment { access 'read write' type BOOLEAN count 1 } } control.6 { iface MIXER name 'Mic Capture Volume' value 6 comment { access 'read write' type INTEGER count 1 range '0 - 16' dbmin 0 dbmax 2381 dbvalue.0 892 }
3 is silent. 4 is audible. $ amixer -c1 set "PCM" 4 Simple mixer control 'PCM',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 151 Mono: Front Left: Playback 4 [3%] [-27.63dB] [on] Front Right: Playback 4 [3%] [-27.63dB] [on]
do you mean the volume is maximum for the ranges 4 to 151 ?
(In reply to Raymond from comment #9) > do you mean the volume is maximum for the ranges 4 to 151 ? Sorry I wasn't clear. No, there is an abrupt cut-off from audible at 4 to silent at 3. I tested from 4 to 10, and there is gradual volume increase from 4 to 10. Also, I should have mentioned that for this test I removed the "ignore_dB=1" tweak from the config file.
you have to test the volume by application which can use hw:1,0 (e.g. allay/ speaker-test) instead of pulseaudio did pulseaudio find the correct dB range of your USB audio since both min dB and max dB are negative ? http://freedesktop.org/software/pulseaudio/doxygen/volume_8h_source.html your USB audio dB range does not contain PA_VOLUME_NORM 0dB
Hi, I can confirm the similar issue on ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter (kernel: 3.13.0-29-lowlatency from Ubuntu 14.04) The sound became audible during the pulseaudio volume step 30% to 35%
Have the same issue on ubuntu 14.04 with usb sound card.
I hope I'd get it right. Tested: speaker-test -D hw:2,0 -c8 While I played with amixer -c2 set "Speaker" x x = Number 0,1,2,... For each Number except 0 i get Sound.
Sorry for the double post. I have forgotten: 1 is quite hearable and there are no jumps, just smooth increasing
you need to calibrate the dB range http://wiki.linuxaudio.org/apps/all/japa http://wiki.linuxaudio.org/apps/all/jaaa
Both tools test the input (volume). I don't understand, what should i do with them to get the range.
I'm sorry, the window of Jaaa was too small, so I oversaw the output section. Now I set the speaker volume in alsa to 100 (via alsamixer) then tested the dB-range with sinus. For the lower end I get -90.3dB NOT hearable -90.2dB hearable For the upper end I thought to test for distortion. Well the headset was lying on my desk and maybe my ears are distorted. I assume the following -2.3dB NOT distorted -2.2dB distorted Is that what you meant? By the way, where are the output options in Japa?
Looking at the datasheet page 33, announced in https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1200925 the dynamic range is 90dB. So for that the upper end may be -0.2dB. As I said I'm certain with the lower end. There was a really small jump from no sound to sound. The next +0.1dB steps were smoother. Should I test smaller step-sizes?
Any news? Or anything we/I could test to get the process along?
you need to change the formula if you want to shift dBmax to 0dB by adding new variable shift_base and set it to -6 cval->dBmin = (convert_signed_value(cval, cval->min - shift_base) * 100) / 256; cval->dBmax = (convert_signed_value(cval, cval->max - shift_base) * 100) / 256;
Put these cval->dBmin = (convert_signed_value(cval, cval->min) * 100) / 256; cval->dBmax = (convert_signed_value(cval, cval->max) * 100) / 256; //My edits starts here switch (cval->mixer->chip->usb_id) { case USB_ID(0x0d8c, 0x6): if (!strcmp(kctl->id.name, "Speaker Playback Volume")) { int shift_base = -6; cval->dBmin = (convert_signed_value(cval, cval->min - shift_base) * 100) / 256; cval->dBmax = (convert_signed_value(cval, cval->max - shift_base) * 100) / 256; } break; } //up to here if (cval->dBmin > cval->dBmax) { into kernel/sound/usb/mixer.c and compiled the kernel (Ubuntu-kernel 3.13.11). (After reboot into this kernel) the problem is still present and there is no difference whether I plug&play nor starting Linux with headset power turned on.
if the volume control does not has fixed dB per step , you need to use DECLARE_TLV_DB_RANGE with severval ranges https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/include/sound/tlv.h https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound?id=093eef416642c84265cced12335ff125f0db7313
Confirmed that this bug still exists on Ubuntu 15.04 + mainline kernel: uname -a Linux T530 4.1.3-040103-generic #201507220129 SMP Wed Jul 22 01:31:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux