Page 1 of 6 123 ... LastLast
Results 1 to 10 of 58

Thread: KMix, PulseAudio Streams, and Volume Levels

  1. #1
    Join Date
    Jan 2014
    Location
    United States
    Posts
    150

    Default KMix, PulseAudio Streams, and Volume Levels

    When I raise the volume in, for example, Amarok, it bumps up the master volume for the entire system. If I lower the volume for Amarok, either in Amarok's GUI or in KMix, the master volume stays at the same level post-volume adjustment. The problem with this implementation is that when a system sound plays, it's (by default) going to play at the volume that the master volume is set to, which could potentially get bumped up to a high level and cause hearing damage -- especially with people wearing headphones, or just be a plain annoyance. In KMix, you can grab a short-lived PulseAudio stream (e.g., libcanberra) for the duration that it plays to adjust the volume, which is a confusing implementation for a user to have to adjust the volume of the system sounds. Another example of grabbing a short-lived stream would be enabling "Volume Feedback" in the "Configure KMix" dialogue, raising the master volume while watching for "Unknown Application: audio-volume-change", and quickly lowering the level while the stream is still appearing. To get that level back to the same level which follows the master volume, the user has to quickly readjust the stream while it's still appearing. Isn't there a better implementation than this? Why are libcanberra and the stream for the volume feedback not using the same stream, meaning, why are they separate? Is there a way with PulseAudio and KMix to set streams to not disappear as quickly, and is there a way I can pull up the full mixer, not just the front end for PulseAudio?

    I know PulseAudio was a stopgap measure to fill in the voids where ALSA falls short, but there is still more work to be done, especially considering the less technical group of people who need something simple, functional, and not cumbersome.

  2. #2
    Join Date
    Jun 2008
    Location
    UK
    Posts
    5,500

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Quote Originally Posted by pirithous View Post
    When I raise the volume in, for example, Amarok, it bumps up the master volume for the entire system. If I lower the volume for Amarok, either in Amarok's GUI or in KMix, the master volume stays at the same level post-volume adjustment. ...

    ...Is there a way with PulseAudio and KMix to set streams to not disappear as quickly, and is there a way I can pull up the full mixer, not just the front end for PulseAudio?
    By the "full mixer" you may be referring to alsamixer (it also interfaces with P/A). I believe you would need to suspend P/A (or disable it as opposed to removing it totally) in order to get a full mixer (KMix or alsamixer), since KMix and alsamixer by default work above P/A in the audio stack. Alternatively you could look for a mixer that doesn't know about P/A and that interfaces directly to alsa. However, you then lose the features of P/A.

    Your post is interesting wrt the overall relationship between Master Volume and application volume with P/A. I always thought that altering Master Volume should override any application program's volume, either running or when it first opens. Then changing an application volume shouldn't affect other applications' individual setting or that of the Master, until Master is manually altered again. It doesn't seem to work that way on KDE, although it did once for a while but later reverted. I have found the execution of P/A's volume flexibility to be rather muddled. Is it an openSUSE implementation issue, or a DE issue, or even individual applications e.g. VLC doing their own thing? I haven't done enough testing to find the answer so far.
    Leap 42.3 (ext4, KDE Plasma 5.8.7) ~ stable
    Manjaro (ext4, Xfce) ~ rolling updates
    Tumbleweed (ext4, KDE Plasma5) ~ managed updates via "Tumbleweed Snapshots" service.

  3. #3
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Quote Originally Posted by consused View Post
    By the "full mixer" you may be referring to alsamixer (it also interfaces with P/A). I believe you would need to suspend P/A (or disable it as opposed to removing it totally) in order to get a full mixer (KMix or alsamixer), since KMix and alsamixer by default work above P/A in the audio stack. Alternatively you could look for a mixer that doesn't know about P/A and that interfaces directly to alsa. However, you then lose the features of P/A.

    Your post is interesting wrt the overall relationship between Master Volume and application volume with P/A. I always thought that altering Master Volume should override any application program's volume, either running or when it first opens. Then changing an application volume shouldn't affect other applications' individual setting or that of the Master, until Master is manually altered again. It doesn't seem to work that way on KDE, although it did once for a while but later reverted. I have found the execution of P/A's volume flexibility to be rather muddled. Is it an openSUSE implementation issue, or a DE issue, or even individual applications e.g. VLC doing their own thing? I haven't done enough testing to find the answer so far.
    I dont think its an individual application thing since the weird volume change to master is done by all applications (in my experience anyways). One thing that is interesting is that in kde, kmix does that strange volume change and this seems to occur in pavucontrol too (compare the playback tab and the output devices tab; you may have to move the mouse over the controls to see the change to the master channel).

    Strangely, I went into gnome and tried this with the gnome volume control and it does not seem to be affected by this (comparing the applications tab changes to the "Output Volume" at the top). But then I tried this again but this time with pavucontrol open and with the output devices tab open and it moved the master forward when the applications volume was higher than the master channel.

    So it is probably not a DE issue but some pulse/opensuse issue.
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

  4. #4

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Try xfce-mixer you can use it in kde
    People who do not break things first will never learn to create anything

  5. #5
    Join Date
    Jun 2008
    Location
    UK
    Posts
    5,500

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Quote Originally Posted by alanbortu View Post
    I dont think its an individual application thing since the weird volume change to master is done by all applications (in my experience anyways).
    That seems to be right. I did some more testing with both a 12.2 system (KDE 4.8.5 and P/A 1.1) and latest Tumbleweed (advanced 13.1ish KDE 4.11.4 and P/A 4.0). In both systems, VLC and Amarok could increase KDE's Master Volume, once they reached its current setting. IMO that defeats the purpose of per application Volume setting claimed by the P/A developer(s).

    One thing that is interesting is that in kde, kmix does that strange volume change and this seems to occur in pavucontrol too (compare the playback tab and the output devices tab; you may have to move the mouse over the controls to see the change to the master channel).
    To me that suggests it's a KDE issue, but then:

    Strangely, I went into gnome and tried this with the gnome volume control and it does not seem to be affected by this (comparing the applications tab changes to the "Output Volume" at the top). But then I tried this again but this time with pavucontrol open and with the output devices tab open and it moved the master forward when the applications volume was higher than the master channel.

    So it is probably not a DE issue but some pulse/opensuse issue.
    Hmmm why would P/A shoot its own feature? Makes no sense. Anyone tested this on Fedora for example?

    Then there is the mismatch between KDE/KMix reported volume percentage and those of VLC (uses a 125% scale in settings) and Amarok (uses 100% scale). Something to do with KDE/KMix and amplified volume I guess. It's not very helpful to users.
    Leap 42.3 (ext4, KDE Plasma 5.8.7) ~ stable
    Manjaro (ext4, Xfce) ~ rolling updates
    Tumbleweed (ext4, KDE Plasma5) ~ managed updates via "Tumbleweed Snapshots" service.

  6. #6
    Join Date
    Jan 2014
    Location
    United States
    Posts
    150

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Application volume should operate within the confines of what the user has set the master volume to. For example, if the master volume is set at 30% and Amarok is set to 100%, the master volume should never be raised above 30%. Like I said in my OP, raising an application's volume raises the master volume if it goes beyond the point which the master volume is set, whilst lowering an application's volume does not. Because the system sounds (by default) play at the same level as the master volume, one may be under the assumption that lowering an application's volume would make the master volume follow it, but they may be in for a surprise if a system sound plays. With the current implementation, I will raise the application volume when needed, then lower the master volume, as the master volume is the parent to the application volume. There should be an option with PulseAudio to allow streams to linger for a set time period, so a user who accidentally sets one of the system sound levels out of synch with the master volume can easily change it. As it stands now with KMix and PulseAudio, the user has only seconds or less to readjust the system sound volume stream depending on the length of the sound being played. There also should be an option to pull up the full ALSA Mixer without having to disable or uninstall PulseAudio, or install a mixer from a different desktop environment. I tried OpenSuse 13.1 without PulseAudio installed, and was getting popping noises at the beginning of songs while playing tracks in VLC. I tried every output setting possible, and it wouldn't go away. Then I tried OpenSuse 13.1 with PulseAudio installed and the problem disappeared. This leads me to believe that certain applications are relying on PulseAudio, and may incur problems if it's not installed.

    I don't know if there's a bug report on this issue yet or not, but I have not found anything yet, and can file one if need be. Thank you for reading and to those who have replied.

  7. #7
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Quote Originally Posted by pirithous View Post
    Application volume should operate within the confines of what the user has set the master volume to. For example, if the master volume is set at 30% and Amarok is set to 100%, the master volume should never be raised above 30%. Like I said in my OP, raising an application's volume raises the master volume if it goes beyond the point which the master volume is set, whilst lowering an application's volume does not. Because the system sounds (by default) play at the same level as the master volume, one may be under the assumption that lowering an application's volume would make the master volume follow it, but they may be in for a surprise if a system sound plays.

    With the current implementation, I will raise the application volume when needed, then lower the master volume, as the master volume is the parent to the application volume. There should be an option with PulseAudio to allow streams to linger for a set time period, so a user who accidentally sets one of the system sound levels out of synch with the master volume can easily change it. As it stands now with KMix and PulseAudio, the user has only seconds or less to readjust the system sound volume stream depending on the length of the sound being played. There also should be an option to pull up the full ALSA Mixer without having to disable or uninstall PulseAudio, or install a mixer from a different desktop environment.

    I tried OpenSuse 13.1 without PulseAudio installed, and was getting popping noises at the beginning of songs while playing tracks in VLC. I tried every output setting possible, and it wouldn't go away. Then I tried OpenSuse 13.1 with PulseAudio installed and the problem disappeared. This leads me to believe that certain applications are relying on PulseAudio, and may incur problems if it's not installed.

    I don't know if there's a bug report on this issue yet or not, but I have not found anything yet, and can file one if need be. Thank you for reading and to those who have replied.
    You should use paragraphs, it makes it easier to read lots of text

    As for the reliance on pulse, I think that for some applications you can force them to use alsa "properly" by editing some file (cant remember which, sorry)
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

  8. #8
    Join Date
    Jan 2014
    Location
    United States
    Posts
    150

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Quote Originally Posted by alanbortu View Post
    You should use paragraphs, it makes it easier to read lots of text
    I did, notice the subject change? If you're having trouble reading a small paragraph, I don't know what to really tell you.

  9. #9

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    Quote Originally Posted by pirithous View Post
    Application volume should operate within the confines of what the user has set the master volume to. For example, if the master volume is set at 30% and Amarok is set to 100%, the master volume should never be raised above 30%. Like I said in my OP, raising an application's volume raises the master volume if it goes beyond the point which the master volume is set, whilst lowering an application's volume does not. Because the system sounds (by default) play at the same level as the master volume, one may be under the assumption that lowering an application's volume would make the master volume follow it, but they may be in for a surprise if a system sound plays. With the current implementation, I will raise the application volume when needed, then lower the master volume, as the master volume is the parent to the application volume.
    Try to set the option "flat-volumes = no" in /etc/pulse/daemon.conf.

    There also should be an option to pull up the full ALSA Mixer without having to disable or uninstall PulseAudio, or install a mixer from a different desktop environment.
    There is: just run KMix with the environment variable KMIX_PULSEAUDIO_DISABLE set, i.e. run it like this:
    Code:
    KMIX_PULSEAUDIO_DISABLE=1 kmix
    You may have to quit a running KMix first though.

    Or set that variable in /etc/environment to do this globally and system-wide.

    I tried OpenSuse 13.1 without PulseAudio installed, and was getting popping noises at the beginning of songs while playing tracks in VLC. I tried every output setting possible, and it wouldn't go away. Then I tried OpenSuse 13.1 with PulseAudio installed and the problem disappeared. This leads me to believe that certain applications are relying on PulseAudio, and may incur problems if it's not installed.
    Well, I don't even have pulseaudio installed and everything works fine here (and always did).
    So this seems to be an audio setup problem in your case.
    But I have no idea where to look for a solution.

  10. #10
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,704
    Blog Entries
    1

    Default Re: KMix, PulseAudio Streams, and Volume Levels

    There also should be an option to pull up the full ALSA Mixer without having to disable or uninstall PulseAudio, or install a mixer from a different desktop environment.
    There is: just run KMix with the environment variable KMIX_PULSEAUDIO_DISABLE set, i.e. run it like this:
    Code:
    KMIX_PULSEAUDIO_DISABLE=1 kmix
    I had also wondered about this. Good to know.

Page 1 of 6 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •