1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Pandora [Solved] Audio players + NEON / DSP ?

Discussion in 'NEON / DSP' started by Magic Sam, Dec 6, 2016.

  1. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    1,874
    Location:
    Ankh-Morpork
    Hi all :)

    I bought a new music album some days ago, which is encoded in 96 KHz FLAC. I just tried to listen to it with @canseco 's QMMP, and CPU usage immediately went up to ~85%, leaving very little resources available for anything else. Music started to stutter a lot when I tried to browse the web with @ptitSeb 's Otter or read my emails with @canseco 's (again ;)) Claws Mail, so I stopped doing that and focused on listening to the music, which is not the definition I have of a multi-tasking system :p

    I know this is a rather silly question, and that's always easier said than done, but couldn't audio players take advantage of NEON and / or DSP in order to off-load part of their burden from the CPU ?

    Cheers, Magic Sam
    --- Double Post Merged, Dec 6, 2016, Original Post Date: Dec 6, 2016 ---
    Hi again,

    From FLAC webpage:
    Is it worth a look ?

    Cheers, Magic Sam
     
    Tags:
  2. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,636
    Location:
    France, near Lyon
    Try to profile a bit at least first. Launching a "sudo perf top" on a ssh terminal while some music is playing can gives a few hint...
     
  3. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,886
    Location:
    Lithuania
    If it's that slow it's probably using floating point for samples, where both Cortex-A8 and the DSP aren't that great.
    You could 'nice' the other processes (can be done with top) to give the audio player priority.

    Edit: I've downloaded random 96kHz sample from http://www.2l.no/hires/index.html and mplayer uses ~8% CPU while QMMP ~18%.
     
    Last edited: Dec 6, 2016
    _jr_ likes this.
  4. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    1,874
    Location:
    Ankh-Morpork
    Hi @ptitSeb :)
    Yes, that's what I'm planning to do ASAP. I created this thread in a hurry yesterday, and didn't have time to perform any tests yet.

    Cheers, Magic Sam
     
  5. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    1,874
    Location:
    Ankh-Morpork
    Hi all :)

    @ptitSeb : sorry for the late reply...

    Cheers, Magic Sam
     
  6. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,636
    Location:
    France, near Lyon
    Well, as you can see, QMMP itself take 50% of the CPU, with the "iir" function alone. Do you have an active Equalizer or something like that?
     
  7. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    1,874
    Location:
    Ankh-Morpork
    @ptitSeb : I don't think so, but I'll double check.

    Does IIR mean Infinite Impulse Response ?

    I thought libFLAC would have been more resource intensive, and would have benefited from NEON / DSP optimizations.

    I guess I was wrong (again...).

    Cheers, Magic Sam
    --- Double Post Merged, Dec 11, 2016, Original Post Date: Dec 11, 2016 ---
    @ptitSeb : equalizer was indeed ON... :oops: :$

    With it turned off, CPU usage is down to ~40%.

    Sorry for the noise...

    Cheers, Magic Sam
     
  8. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,636
    Location:
    France, near Lyon
  9. sebt3

    sebt3 homebrew player (P. & C.)

    Joined:
    Sep 9, 2008
    Messages:
    4,633
    Location:
    France
    FYI : Most audio stream, use an mplayer audio decoder. All these are already fairly optimized. There's already many NEON optimisation there.
     
    levi likes this.

Share This Page

Loading...