[DISCUSSION] MP3 Players for Android

Discussion in 'Android' started by Sklipnott, Jul 13, 2018.

  1. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    #21 Yen, Sep 5, 2018
    Last edited: Sep 5, 2018
    The actual question was the other way around: How can I make viper4android work with other players and pure viper4android and nothing that has got interferences?

    I spent many weeks. It was my challenge at XDA forums. I wanted a clean mod.....(other username there, though)

    When /system hadn't DM verity yet I modified those files directly....and since SE Android has enforcing mode as default....the viper Neon driver (the best) needs its own policy to run...
    In other words to get viper4android to run it required more and more efforts besides of root account...
    V4A actually does not need root at all. It only needs an own lib placed at /system/lib/soundfx. And to do that one needs 'root' one time...and of course to modify the configs you need root as well...

    By doing that you break DM-verity and safety net check detects root which means root checking apps refuse to start...the keyword: modify the system systemless-ly (Magisk)

    Samsung has own DSP libraries. And two tools (sound alive and adapt sound) which interfere with viper's own lib.

    The players 'do not know' what's 'after' when they deliver the stream.....but before it reaches the internal DAC there's own DSP...and it's the place where viper has to chime in...

    The file that controls that is the audio_effects.conf (on some newer Android devices it's a XML).
    As any conf it has got a strict structure you can find out how it works.
    Since it also has own sound processing at voice calls and recordings and wind-noise suppressing stuff and the like..I left that alone and original. I only redirected the effects which are relevant for music playing to the viper lib.

    Some crude mods just removed anything or deleted the own libs without to take care about calls from the conf....

    In other words.....when you have managed to run viper4android with stock player (driver status: normal, Neon enabled: Yes, processing: yes, audio format supported: yes) then UAPP works as well. It's nothing bitchy, the contrary it just delivers it bit perfect to viper4android using its own hires drivers....

    There are many people using viper4android which is still interfering with internal DSP or are using mods which remove DSP that makes sense at voice calling and recording and the like...
    And there are people who combine viper4android with other stuff such as Dolby Atmos or other fancy lib sets..

    I only can say......

    A proper mod and the understanding what viper4android can do is by far enough. One needs a bit time to figure how to setup viper properly....
    Many are overwhelmed and try to alter any virtual rotary buttons and sliders at once...lol....some effects just do not go together or are neutralizing each others...


    Does it not work for you? It simply works if V4A works with stock player or any other 'common' player......
    V4A is not 'external'...and not just an equalizer (I even do not use V4A fire equalizer)...

    If you have special tech questions concerning how to run v4a properly I try to answer them. I can share at MDL what I have learned myself by experiments and tests and at XDA...

    It was fun and I was very motivated to realize that...It was a sort of hobby to me...I realized to let run v4a with NEON support at SE enforcing mode while others still said you need permissive...lol...

    And I love V4A. The dev of it is a genius.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Hadron-Curious

    Hadron-Curious MDL Guru

    Jul 4, 2014
    3,730
    603
    120
    Somebody recommended Stellio music player to me. I tried it and it's very good with lossless quality formats. It seemed to have high customization as well.
     
  3. Stfan2142

    Stfan2142 MDL Novice

    Sep 8, 2018
    1
    1
    0
    PowerAmp...best 2-3$ ever spent!
     
  4. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    It's nice that there are several good players and one can run the player that is personally the best. Whatever player it is. :)
    The own personal impression about sound is different and therefore it's good that there are different players available.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. sid_16

    sid_16 MDL Giveaway Organiser

    Oct 15, 2011
    2,494
    5,362
    90
    #25 sid_16, Sep 10, 2018
    Last edited: Sep 10, 2018
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. c6p0

    c6p0 MDL Junior Member

    Aug 17, 2010
    74
    47
    0
    I use VLC for streaming radio with satisfaction
     
  7. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    #27 Yen, Sep 10, 2018
    Last edited: Sep 10, 2018
    When v4a is started the first time it checks audio_effects.conf if there is already a V4A lib entry. If not it uses commands from busybox to insert the missing entry (Lib name/path to and effect name, UUID etc...).

    Then it checks if there is already the v4a lib present at /system/lib/soundfx. If not it asks to be installed and if yes it places it there. This is the 'driver installation'.

    At some devices there is also a vendor partition that can hold vendor specific configurations. This applies to Samsung devices.

    To keep the modified config persistent you should place a copy of the modified one at /vendor/etc as well.
    At system update you have to check if the original config has changed and replace it again by a new mod at both locations (/system/etc and /vendor/etc). Also you have to install the lib again.

    Neon driver of V4a only works when applying SE Android policy on each start.
    Therefore you need a command that is able to do that.

    Chainfire has the su policy tool that comes with superSu. You just had to place a sh script at /su/su.d.
    Or at magisk you have to place the command at post-fs-data.sh

    Code:
    supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"
    This one is sufficient for Samsung Galaxy S6 / S7.....

    Collection depending on device...

    supolicy=magiskpolicy

    Code:
    magiskpolicy --live "allow audioserver audioserver_tmpfs file { read write execute }"
    magiskpolicy --live "allow mediaserver mediaserver_tmpfs file { read write execute }"
    
    magiskpolicy --live "allow hal_audio_default hal_audio_default process { execmem }"
    
    magiskpolicy --live "allow hal_audio_default hal_audio_default_tmpfs file { execute }"
    Best is to apply all them first.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. sid_16

    sid_16 MDL Giveaway Organiser

    Oct 15, 2011
    2,494
    5,362
    90
    #28 sid_16, Sep 10, 2018
    Last edited: Sep 10, 2018
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. sid_16

    sid_16 MDL Giveaway Organiser

    Oct 15, 2011
    2,494
    5,362
    90
    In the root explorer I can see system/su.d and inside su.d there is permissive.sh and sound sever only. So where should I place the modified "
    supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };" ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,770
    295
    60
    There is one other thing that you might want to remember. About 75% (some say 90%) is the quality of the headphones. Unless you are willingto spend, let us say... $400 on a pair of cans, and another few bills on a good amplifier, the player will not make a real difference.

    Go to a GOOD store and plug in... lets say a Sennheiser 650... and you will understand.
     
  11. dage85

    dage85 MDL Novice

    Sep 11, 2018
    1
    0
    0
    I also vouch for AIMP, it has a easy to use and detailed equalizer, and the sound output options are useful. Now if someone knows about an app that has parametric equalizer like in a rockboxed media player that would be amazing.
     
  12. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    #32 Yen, Sep 11, 2018
    Last edited: Sep 11, 2018
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,770
    295
    60
    I will go and try the Beyer, just to hear the difference. For me the "problem" has always been that I can be found listening to Salome in the afternoon, and a few hours later to a Guns and Roses concert. So I like how the Sennheiser deals with both.
    And also... it costs a lot less, for a poor pensioner like me the bottom of the top class will have to do...
     
  14. takeru788

    takeru788 MDL Novice

    May 30, 2017
    2
    0
    0
    Sony Music works great for me. If you're not on a sony phone though, you have to download a magisk module to enable sony apps. It can sort songs by folder, edit tags and download album covers.
     
  15. sid_16

    sid_16 MDL Giveaway Organiser

    Oct 15, 2011
    2,494
    5,362
    90
    Please tell me the procedure- how to do the above and I'll upload it for your perusal.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    #36 Yen, Sep 13, 2018
    Last edited: Sep 13, 2018
    The best way to 'learn' how to do is to compare an original and a proper mod.
    There once was a config with descriptive comments for each of the three sections of the config. Also for the meaning of the effects...
    The former is needed to understand the structure, the latter to decide what to change....
    Without that info you do not know in advance what you have to leave alone and what you have to redirect / remove.

    Nowadays Samsung does not publish that anymore.
    When I am back home I can upload the descriptions, my original config and my own mod.
    As mentioned I studied configs a long time and I actually am not sure if I'd understand all them audio_effects.conf since there are a lot of different devices/ brands.

    I am very familiar with Samsung, though.
    I've modified Galaxy S3 upwards to S7 for friends. I am sure the Galaxy S series it no prob..and any other Samys also...


    The T5p second edition is also a multi talent. The p stands for portable. Although it's an over-the-ear sized headphones it gets be well driven with just a smartphone. It's 32 Ohm impedance only..and I guess that's the reason why it costs that much....

    Some people with 'large' ears mention to have problems with wearing comfort, though. They prefer the Beyerdynamic DT 1990 Pro which is in the same category as the Senn HD-650 although with different sound characteristics.

    It actually depends on the 'handwriting' of the brand....Beyerdynamic, Sennheisser and AKG....all them have typical attributes....

    I ever liked the Beyer-sound....although it also has changed on the Tesla models...

    Headphones and much more speakers are purchases which are made to last a long long time.... and listening to music is enjoyment...the T5p is my second over-the-ear after 15 years...got it for around 680 pounds from Amazon UK...and guess what...Beyerdynamic Germany is just 50 kilometers away and they wanted RRP 1200 €....which I had never paid for it...

    Now the prices are equalized...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,081
    13,979
    340
    #37 Yen, Sep 13, 2018
    Last edited: Sep 15, 2018
    Description of Samsung. Still found at Android 5 Galaxy S6 Edge, later removed, though.

    Section 1 libraries
    Code:
    # List of effect libraries to load. Each library element must contain a "path" element
    # giving the full path of the library .so file.
    #    libraries {
    #        <lib name> {
    #          path <lib path>
    #        }
    #    }
    Section 1b
    Code:
    # Default pre-processing library. Add to audio_effect.conf "libraries" section if
    # audio HAL implements support for default software audio pre-processing effects
    
    Section 2 effects
    Code:
    # list of effects to load. Each effect element must contain a "library" and a "uuid" element.
    # The value of the "library" element must correspond to the name of one library element in the
    # "libraries" element.
    # The name of the effect element is indicative, only the value of the "uuid" element
    # designates the effect.
    # The uuid is the implementation specific UUID as specified by the effect vendor. This is not the
    # generic effect type UUID.
    #    effects {
    #        <fx name> {
    #            library <lib name>
    #            uuid <effect uuid>
    #        }
    #        ...
    #    }
    Section 2b
    Code:
    # Default pre-processing effects. Add to audio_effect.conf "effects" section if
    # audio HAL implements support for them.

    Section 3 pre_processing
    Code:
    # Audio preprocessor configurations.
    # The pre processor configuration consists in a list of elements each describing
    # pre processor settings for a given input source. Valid input source names are:
    # "mic", "camcorder", "voice_recognition", "voice_communication"
    # Each input source element contains a list of effects elements. The name of the effect
    # element must be the name of one of the effects in the "effects" list of the file.
    # Each effect element may optionally contain a list of parameters and their
    # default value to apply when the pre processor effect is created.
    # A parameter is defined by a "param" element and a "value" element. Each of these elements
    # consists in one or more elements specifying a type followed by a value.
    # The types defined are: "int", "short", "float", "bool" and "string"
    # When both "param" and "value" are a single int, a simple form is allowed where just
    # the param and value pair is present in the parameter description
    #    pre_processing {
    #        <input source name> {
    #            <fx name> {
    #                <param 1 name> {
    #                    param {
    #                        int|short|float|bool|string <value>
    #                        [ int|short|float|bool|string <value> ]
    #                        ...
    #                    }
    #                    value {
    #                        int|short|float|bool|string <value>
    #                        [ int|short|float|bool|string <value> ]
    #                        ...
    #                    }
    #                }
    #                <param 2 name > {<param> <value>}
    #                ...
    #            }
    #            ...
    #        }
    #        ...
    #    }
    
    At the attached rar you find the original and the mod.

    Interfering are soundalive related libraries and effects. I have frozen/removed the soundalive app additionally.
    Its name on my phone is SoundAlive_52 and located at priv-app folder.

    Also adapt sound is an app I have frozen/ removed additionally.
    Its name here is Hearingdro_V52_N and also located at priv-app

    Each brand is different concerning own DSP.
    Actually you cannot do anything wrong when modifying the config, but to remove DSP that has advantage for other needs (voice call, ring, audio recording...) or to leave back interfering configs for music playing.

    If you set permissions to 0644 and double check it on your phone it'll boot well. The editor when modifying on your PC has to be in UNIX LF mode.

    When going for a mod you have to read the config 'backwards'.
    The mod approach I have applied is to redirect anything that is music playing related only instead of to remove the definitions. Others who have modified it just removed the definitions entirely.
    I rather wanted all the corresponding effects and libs still to be configured, anyway redirected. It works well, no annoying behaviors.

    Check at section 3 what is used for other purposes than music playing and check how they are related to the effects and libraries.
    For instance HERE at my config:

    Leave them alone:
    agc, ns and aec also fens and lmfv. Remove sa3d from music, it's sound alive related. But do not redirect its corresponding lib. It's used elsewhere here additionally (ring).

    At any other effect you can use: library v4a_fx and its uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b

    At section 1 at first run v4a installs its library giving a name v4a_fx
    Code:
     v4a_fx {
        path /system/lib/soundfx/libv4a_fx_ics.so
      }
    
    And at section 2 giving a standard effect
    Code:
     v4a_standard_fx {
        library v4a_fx
        uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b
     } 

    All those libraries who do play a role at music playing such as bundle and reverb and more you have to redirect to v4a's library by changing the paths:
    Example reverb
    Code:
     reverb {
        path /system/lib/soundfx/libv4a_fx_ics.so
      }
    All those effects playing a role at music playing have to get the library v4a_fx for instance bassboost
    Code:
     bassboost {
        library v4a_fx
        uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b
     }

    Library output_session_processing for instance must not be changed, though. Why? It delivers effects needed for other purposes. Check section 3. They are lmf and fens! Got it?
    sa3d needs library myspace and agc, aec and ns needs library pre_processing.

    THOSE have to remain for a proper mod!

    I removed sa3d at the music section only. Better said I have removed the music section definition there.

    Removal of sa3d there turned out to be very important for v4a not to interfere!



    dha (original library mysound) I have redirected as well since it is not configured at section 3. So I suppose it is not needed for other DSP purposes.

    By studying the modifications and the sections you find out what I mean.

    Each device might be (slightly) different. But how the config works is the same, of course.
    Also the lib names and paths might be different.

    Good luck.
    If you have particular questions I try to answer them....can take a bit time, though. Will be busy coming weekend. :)
    My most downloaded config over at XDA is 500+. Considering the S6 Edge is an old phone already it's not bad and people like it to have anything but music playing to be original. :)
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...