So, what's the actual state of the software?

Discussion in 'Pyra OS (Debian GNU/Linux)' started by Xcl4m4t10n, Oct 21, 2015.

  1. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    Hm? And what operation would that be?

    Turn the volume down to zero, same as on the Pandora...?
     
  2. pmprog

    pmprog Advanced Member

    Joined:
    Apr 25, 2011
    Messages:
    3,859
    Well, depending on where the wheel is and the software volume level, apparently you might have to spin it all the way to max, then back to min
     
  3. comradekingu

    comradekingu Glowing ember

    Joined:
    Apr 15, 2011
    Messages:
    4,968
    If you have to bring the softvol level along, it makes more sense to draw the wheel down to 0 to re-align them.

    Nothing should ever be higher volume than the % of the wheel position.
     
    Last edited by a moderator: Oct 25, 2015
  4. PowerGod

    PowerGod Advanced Member

    Joined:
    Jun 20, 2011
    Messages:
    3,037
    For me the volume wheel is useful without software involved... if I want to use software volume I use the pen, or hotkeys...

    If it's output is controlled by software I consider the wheel a wasted space on the board... :(
     
    _jr_ likes this.
  5. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    11,213
    Location:
    Somewhere off the coast of the EU
    I always thought it a little inelegant that the Pandora has both a physical volume control and the mixer app with a volume slider, which as ED says has caused someone to be so confused they sent the unit back in the past.

    I'm not sure of the best way to combine the two options are for the Pyra.  I tend to think scrolling the wheel to 0% should always mute the device, but that would mean the software slider would end up disabled, and I'm not sure the best way to square that circle.
     
  6. WizardStan

    WizardStan Mega GP Mania

    Joined:
    May 24, 2008
    Messages:
    16,711
    PulseAudio almost has the right idea, with it's per-device and per-channel volume sliders.  What would be good is an additional "master" volume on top of that.  You could have (actual volume) = (device volume)*(master volume)/100 thus allowing you to set headphones to, for example, 10%, speakers to 100%, hdmi (when working) to 50%, and the hardware wheel drives the master volume.  That way I don't accidentally blow my eardrums out when I plug my headphones in without adjusting the volume wheel but can still get full volume from the speakers.

    Such a thing would require some custom volume daemon though, I'm not aware of any that has this approach.
     
  7. Letalis Sonus

    Letalis Sonus Advanced Member

    Joined:
    Mar 5, 2009
    Messages:
    1,054
    Being a front end of ALSA, you can get all the master volume control you need by simply creating a proper ALSA config beneath it. ALSA is quite powerful, many people easily oversee many of its more advanced features simply due to its poor documentation and rather complex configuration.

    However, I'd still recommend configuring it as an ALSA passthrough (if we use it at all) - PulseAudio's own mixer is one hell of a CPU hog.
     
    rSl and comradekingu like this.
  8. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    PulseAudio only uses a lot of CPU when it's mixing multiple streams with different bitrates into one.

    That's where ALSA also needs a lot of CPU.
     
  9. Exophase

    Exophase Nothing good will ever come of Exophase.

    Joined:
    Sep 21, 2006
    Messages:
    10,308
    Location:
    Cleveland OH
    I just tried running a single program with audio open (it was DraStic using SDL, 44.1KHz/16bit) Pulse consistently used about 2% CPU time on my i5-2500K (quad core Sandy Bridge currently @ 1.6GHz. Although not exactly a "lot" it's IMO still too much. I'd like to see what the percentage would be running on Pyra @ ~500MHz and 1.5GHz.

    EDIT: Still uses same percentage with the CPU locked at 3.6GHz vs locked at 1.6GHz. Not sure if this means that the CPU usage is frequency independent here or what.
     
    Last edited by a moderator: Oct 26, 2015
  10. slaeshjag

    slaeshjag ¯\_(ツ)_/¯

    Joined:
    Apr 8, 2010
    Messages:
    2,687
    Location:
    ~Stockholm, Sweden
    The the moment, pulseaudio is using "too much". Part of that could be that it's currently running the hardware at double the sampling rate of the input. For example:

    [12:51:44 | 2015-07-31] <@EvilDragon> Well, Pulseaudio also needs 30% CPU time while mixing... could be wrong setting though (like mixing everything to 48kHz or something like that).

    I remember seeing other percentages in other reports, but I can't find that in my logs atm.
     
  11. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    What is your Pulse output setting set to?

    If it's set to 48kHz, it also needs to downsample, even if you only run one stream.

    You can check that with:

    pacmd list-sinks
    BTW: 

    PulseAudio has 65537 different volume steps... should be accurate enough for anyone.
     
  12. Letalis Sonus

    Letalis Sonus Advanced Member

    Joined:
    Mar 5, 2009
    Messages:
    1,054
    I messed around a lot with ALSA, partly due to driver bugs that required workarounds. My current asoundrc file has over 600 lines with only a minimal amount of comments, it includes stuff like custom volume controls (software mic boost), LADSPA plugins (5.1 upmix with an elaborate lowpass filter for the subwoofer), customizable default input/output devices via environment variables , and dmix/dsnoop mixers for 12 channels at 32bit 44.1kHz. Of course I hardly use all of the 12 channels available through my hardware at the same time, but I do have quite a bunch of programs running that want to output some audio data all the time.

    Everything is like it should be, despite the float transitions required by LADSPA (LADSPA plugins only accept float samples) I can't see any noticeable CPU loads caused solely by audio. Yet PusleAudio manages to cause quite some impressive CPU usage while only using its basic 5.1 upmix settings (or even its default stereo setup), no matter what kind of remix algorithm I chose. I really like the additional features that PulseAudio offers, but whatever I did, I only ran into totally exaggerated CPU usage...
     
    rSl and _jr_ like this.
  13. Exophase

    Exophase Nothing good will ever come of Exophase.

    Joined:
    Sep 21, 2006
    Messages:
    10,308
    Location:
    Cleveland OH
    It's 44.1KHz, there shouldn't be any resampling  going on.
     
  14. bzar

    bzar A Commando

    Joined:
    Sep 22, 2008
    Messages:
    4,446
    Location:
    Finland
    I'd modify "To reenable the hardware wheel, you need to move it to the current software setting" to "To reenable the hardware wheel, you need to move it to the current software setting or zero". No sound should always be no sound. This would enable the apparently typical use case of always moving the wheel to zero before raising it to a comfortable volume I do myself as well.
     
  15. Christoph.Krn

    Christoph.Krn Very Active Member

    Joined:
    Oct 29, 2009
    Messages:
    966
    Location:
    Germany
    Possibly "To reenable the hardware wheel, you need to move it to a value <= the current software setting" for faster emergency-quieting, too.
     
  16. _jr_

    _jr_ Advanced Member

    Joined:
    May 5, 2013
    Messages:
    1,170
    Did I miss something or does this still assume without hard evidence that the software mechanism will always be capable of low latency response to wheel changes?
     
  17. EvilDragon

    EvilDragon Administrator Staff Member

    Joined:
    Mar 4, 2003
    Messages:
    19,786
    Location:
    Ingolstadt
    Well, if you're willing to help out here to get a proper ALSA configuration going that supports stuff like hot-plugging, easily directing audio streams to various outputs, etc., then I'm perfectly fine using ALSA instead of PulseAudio.

    We already had a fight to get the relatively simple Pandora audio configuration to work properly with ALSA, so for me doing this for the Pyra would be a nightmare.

    Basically, what needs to work is:

    • Only show useful volume sliders (the TWL has about 60 different volume settings, of which most are not being used by us)
    • Automatically switch to headphones or HDMI as default output when headphones/HDMI are plugged in (and do that also for already running audio streams), but let the user easily change that
    • Easy way (with sliders) to change the volumes of the different audio streams that are currently running.
    That's why I think PulseAudio is useful (as it can do all these things), but if you think ALSA can do it as well and help us do it, I'm also happy :)
     
  18. Letalis Sonus

    Letalis Sonus Advanced Member

    Joined:
    Mar 5, 2009
    Messages:
    1,054
    As I said before, you can make PulseAudio use ALSA directly: https://wiki.archlinux.org/index.php/PulseAudio#ALSA.2Fdmix_without_grabbing_hardware_device

    That should preserve the features of PusleAudio like per-application audio controls, but it lets ALSA do the mixing. (At least I think that's how you do it, got to take a closer look on what I exactly did the last time I managed to get it to work...)

    EDIT: nope, that would be using the PA mixer on top of the ALSA mixer...
     
    Last edited by a moderator: Oct 26, 2015
  19. WizardStan

    WizardStan Mega GP Mania

    Joined:
    May 24, 2008
    Messages:
    16,711
    Yes, that's the assumption being made.  Without hard evidence all we can do is make assumptions.  I'm not sure what exactly you're driving at.
     
  20. TrashyMG

    TrashyMG Sarcasm Dispenser Staff Member

    Joined:
    Jan 18, 2010
    Messages:
    10,550
    We'll have to see how everything works when the prototypes are done for any kind of judgement to be made.
     
    Last edited by a moderator: Oct 26, 2015

Share This Page

Loading...