Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using Kubuntu 10.10 and having a sound issue. I fully installed PulseAudio so that I could properly enable the 5.1 sound on my system. At some volume levels it sounds great, while at others it has a terrible metallic-sounding distortion. I have worked with the various audio tools I have installed and narrowed down the problem.
Here is what I have installed to configure sound settings: kmix (KDE equivalent of gnome-volume-manager), pavucontrol, alsamixer.
I have found that when I adjust the master volume level through kmix (either with the GUI slider or the volume control keys on my keyboard), the levels in alsamixer all change, too, not just the Master level. When PCM maxes out at 100, I get the distortion, but if it is at 99 or lower, everything sounds perfect. The weird thing is that as I adjust the master volume level, the PCM level bounces between 98 and 100. Like this:
Is there any way to lock the PCM level or cap it at 99? If I can keep the PCM from hitting 100, I can get rid of the distortion. I would greatly appreciate anyone's help.
I think that the alsa state file is read in when alsa starts. I think that comment.dbmax 0 is purely information.
But this segment of the "amixer" program output indicates that editing the "value" line will limit the lower and upper bounds of the alsa mixer:
Code:
Simple mixer control 'PCM',0
Capabilities: pvolume penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
You may need to resort to the alsa documentation to see if there is an equivalent asound.conf setting.
Using pulse, you shouldn't need to touch kmix at all. I normally listen to podcasts on my laptop, piping the audio to my desktop. Selecting the optical output on my desktop (from the laptop padevchooser applet) selects my stereo for audio.
I have been using Linux for a while, but I'm not a programmer and I've never had to hack ASLA before. So, to clarify, you think that by editing the 'value.0' and/or 'value.1' lines in the /etc/alsa.state file, I can set an upward limit? The range in the alsamixer is 0 to 100, so do you have any recommendations as to what value I should use to slightly decrease the cap? 255 looks like IP bit notation where 255 would equal 11111111 in binary.
Quote:
Originally Posted by jschiwal
Using pulse, you shouldn't need to touch kmix at all. I normally listen to podcasts on my laptop, piping the audio to my desktop. Selecting the optical output on my desktop (from the laptop padevchooser applet) selects my stereo for audio.
I'm using kmix with pulse because this is a HTPC and I control it from a multimedia keyboard. I really need the volume control keys to work and they are currently tied to the main volume channel of kmix.
I think changing the 255 to 250, for example, may change the max level. On my system, the alsa.state file is saved when alsa shuts down and I presume is reloaded then the device is detected:
I read through /etc/init.d/alsasound, where alsa is started, and the alsactl command to load the state file is commented out. I mentions that udev does it instead.
I just checked and I don't have a /etc/alsa.state file, so I'm back to square one. I'm wondering if there is some way to maybe control which level kmix adjusts. Right now my only choice of channels is "Internal Audio Analog Surround 5.1". I can't choose "master", "PCM", etc.
You could use "sudo /usr/sbin/alsactl store 0" to store the settings for card 0. Looking at the kmix settings, I saw settings for the initial value, but not a way to set a max limit.
For pulse audio, you can run "pavucontrol", and change the settings in the Output tab.
jschiwal, thank you for taking the time to look into this. I appreciate your help.
Well, in case anyone else is having this issue, I eventually found a work around on another forum (Thanks, Mandriva). If you kill kmix, then run the command
Code:
KMIX_PULSEAUDIO_DISABLE=1 kmix
you will be able to select the master channel. I selected PCM. That allows me to control the system volume with the PCM slider, preventing it from jumping to 100. I just never set the volume above 99. The change reverts if I reboot the machine, so the next step will be to set it that way at bootup, but I haven't gotten there yet. I'll update this when I figure that out, but it's not super-high on my priority list since I don't reboot this machine very often.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.