[DEV] Voodoo Sound for Optimus 2x and G2x

Search This thread

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
Hi!

After a ton of requests from you guys, I finally decided to take the challenge to write a Voodoo Sound port for this WolfsonMicro WM8994 powered phone.

So I bought a device just for that, because it was just impossible without.
As stated previously, this phone don't have a proper sound driver, or at least not a Linux Kernel driver.

There is some kind of non-standard userspace audio implementation inside /system/bin/nvrm_daemon.
This daemon sends directly i2c commands via a NVIDIA proprietary API, which has an interface running as a bunch of foreign code in Kernel in order to access the hardware.

Why this port is a real technical challenge, requiring a fair share of reverse-engineering, lots of head-scratching and a very hacky state of mind?
Because it's not supposed to be possible. But, eh ^^

I have an Optimus 2x since a few days only so I don't have much experience about what needs to be improved, apart from the obvious:

- Sound quality.
- Headphone amp volume.
- Creepy speaker output.

As usual, most of my work is under GPL and Kernels developers/packagers are welcome re-using my patches.
If possible, I'll also write an in-app implementation, not requiring a patched kernel in Voodoo Control Plus.

You can follow the dev work here:
github.com/project-voodoo/linux_lge-p990/commits/froyo-voodoo-sound
I commit code real-time so if you're curious you don't have to wait for release to play with it!

PS: targets are Optimus 2X official and CyanogenMod, G2X official and CyanogenMod
 
Last edited:

Benee

Retired Recognized Developer
Mar 15, 2010
921
1,735

sibbor

Senior Member
Jul 28, 2008
663
330
sibbor.nu
Looking forward to this and will make a donation as soon I HEAR any improvement on my LG O2X CM7 running device.
 

sacredsoul

Senior Member
Feb 17, 2007
1,896
565
Singapore
With MIUI coming officially next week, it would be nice if it is included too. Just a suggestion but welcome onboard the O2X community :)
 

Mason.

Member
Nov 19, 2008
30
1
Brilliant

Voodoo sound is the main thing I really miss having from the Nexus S

Sent from my Optimus 2X using XDA App
 

dondavis007

Senior Member
Aug 10, 2010
1,852
378
Samsung Galaxy S23 Ultra
This is perfect! The sound (n battery) is The main reason for not using fr org. For me its a trade off because I really line the org. camera. This way I can stay org. With great sound! (FR org. Sucks I think).
Thank U

Sent from my Optimus 2X using Tapatalk
 
Last edited:

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
Sorry for this noob question but what is difference between voodoo sound and dsp manager or volume+ ?

No pb!

Voodoo sound work directly at hardware level.
This way I can fix issues at the lowest level, use the full potential of the sound chip, increase quality.

Other solutions are software effects: cannot improve the sound quality or increase the volume for real, eats some CPU and add latency.
 

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
BTW I found theoretically how to hook Voodoo Sound driver without flashing a custom kernel yesterday, I'll try the concept today.

This way, Voodoo Control Plus should be able to load the driver on rooted devices.
 
  • Like
Reactions: smokeweedevery

Top Liked Posts

  • There are no posts matching your filters.
  • 89
    Hi!

    After a ton of requests from you guys, I finally decided to take the challenge to write a Voodoo Sound port for this WolfsonMicro WM8994 powered phone.

    So I bought a device just for that, because it was just impossible without.
    As stated previously, this phone don't have a proper sound driver, or at least not a Linux Kernel driver.

    There is some kind of non-standard userspace audio implementation inside /system/bin/nvrm_daemon.
    This daemon sends directly i2c commands via a NVIDIA proprietary API, which has an interface running as a bunch of foreign code in Kernel in order to access the hardware.

    Why this port is a real technical challenge, requiring a fair share of reverse-engineering, lots of head-scratching and a very hacky state of mind?
    Because it's not supposed to be possible. But, eh ^^

    I have an Optimus 2x since a few days only so I don't have much experience about what needs to be improved, apart from the obvious:

    - Sound quality.
    - Headphone amp volume.
    - Creepy speaker output.

    As usual, most of my work is under GPL and Kernels developers/packagers are welcome re-using my patches.
    If possible, I'll also write an in-app implementation, not requiring a patched kernel in Voodoo Control Plus.

    You can follow the dev work here:
    github.com/project-voodoo/linux_lge-p990/commits/froyo-voodoo-sound
    I commit code real-time so if you're curious you don't have to wait for release to play with it!

    PS: targets are Optimus 2X official and CyanogenMod, G2X official and CyanogenMod
    25
    Hi again.

    First of all, my apologies to the people who bought the Plus app expecting a lot more feature a lot faster.
    As a developer working on quality optimizations (and even in general) I'm not fast but kind of slow, why I stay cautious in terms of predictions and ETAs.

    As I hate users being unhappy, if you're disappointed by this and think you were misguided by my writings please contact me with your O2x / G2x Voodoo Control Plus order number and I'll refund your purchase.

    About challenges involved:

    First of all I'm anal about sound quality and hardware implementation of audio components in LG device is subpar. As a result, signal is affected with several issues like:

    - DC offset, triggering DAC DC servo I don't manage to kill yet: increases distortion and power consumption

    - Headphone detection: I didn't find out yet a solution, but at high amp levels, the detection goes wild and think headphones were disconnected despite they're still here.
    So far, it avoids reaching higher output levels.

    - Weak power stage, leading to saturation & distortions at high levels (less headroom than Samsung existing implementations)

    - 20dB lost in stereo separation by lack of physical isolation between left and right channels on the board path.

    As I'm a perfectionist yes those issues bother me a lot and as long as they're not solved or attenuated I feel like adding features like 128x oversampling would might not noticeable enough and that would be more like a gimmick instead of a real solution or improvement.

    Other than that, in the driver writing itself:
    I'm proud of the the method I use to hijack commands sent by ROM nvrm daemon directly to WM8994 audio IC. Its clever :)

    However for additional features, there's several stuff I need to implement and I just didn't had the skills required to do that before.
    I struggled several months this summer to learn those but eventually succeed by writing on a different project (about Super AMOLED screens)
    As I'm close to a first release on this Super AMOLED stuff I'm finishing it and will release an app on market.

    As usual I'm bad with ETAs so I'll avoid giving a failed one but next thing is my TODO is O2x/G2x Voodoo sound.
    There's still a lot I don't know, as long as it's not written. Also because to my knowledge it has not been done before, so stay tuned (and also patient :))

    Note: I'm extremely demanding in terms of sound quality. the appreciation I make here are bit bold but I doesn't prevent a few people to think it's awesome as it is already.
    15
    Okay I'm back on the project!
    14
    Guys, we had a short chat in gtalk and he already managed to flash v30a successfully.
    Actually it was just the USB cable he used first, another one resolved the problems. I remembered having such problems with an HTC cable as well, so keep this in mind if NVFlash doesn't work for someone.

    Now it's up to him to publicly announce his future development plans about the 2x.


    Sent from my LG-P990 using xda app-developers app
    13
    Alright I changed the detection routine, looking for:

    • user.feature.lgdrm
    • user.feature.lgresource
    • user.feature.lgsetupwizard
    • user.feature.lgpoweroff

    Will be in the next update.