Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,959 Members 43,261 Now Online
XDA Developers Android and Mobile Development Forum

Help with Audio Mod... [Need help from an Android Dev]

Tip us?
 
Meltus
Old
(Last edited by Meltus; 16th August 2010 at 11:01 PM.)
#1  
Meltus's Avatar
Senior Member - OP
Thanks Meter 993
Posts: 1,909
Join Date: Jan 2009
Location: Manchester

 
DONATE TO ME
Default Help with Audio Mod... [Need help from an Android Dev]

Ok, basically my linux knowledge is very limited and i need help modifying a file that gets written on boot (i don't know if this would even work, so if someone could answer that it would be very much appreciated).

The file i'm looking to change is '/sys/module/q6audio/parameters/speaker_max_gain'. In the latest 2.1 build this file is set to '602', which i think explains the slight volume increase from 1.6 (it was set to '600', but located in 'sys/module/msm8k_cad_volume/parameters/handset_max_gain' instead)

So, does anyone know how to alter this file? I know it gets re-written every time you boot the phone, but i can't find where it's being written from. Is it a kernel thing or am I completely wasting my time with this?

Cheers
 
Meltus
Old
#2  
Meltus's Avatar
Senior Member - OP
Thanks Meter 993
Posts: 1,909
Join Date: Jan 2009
Location: Manchester

 
DONATE TO ME
UPDATE - Thanks to @VogelDerNacht, i've tried a few things like trying to change the value in the init.rc (echo "value" > sys/module/q6audio/parameters/speaker_max_gain) which didn't work, and i then tried to use a sysctl.conf in /system/etc/ to do the same thing, which also didn't work (don't think the kernel supports this), so now i'm pretty stuck
It seems like i may have to wait for the kernel source to be release now ><
 
DJ_Steve
Old
#3  
Senior Member
Thanks Meter 832
Posts: 1,152
Join Date: Apr 2007
Location: Durham, Uk

 
DONATE TO ME
how about creating a simple shell script and having it execute as a service from one of the init scripts ?

its possible the sys entry is not created until later in the boot sequence
Devices: Nexus 7 (Grouper) | B&N Nook HD+ | Dell Streak 5 | Motorola Milestone |
Developing Android/Cyanogenmod for Streak/Streak 7 - Please feel free to Donate : GBP Donate | USD Donate
Twitter: http://www.twitter.com/dmonsterprod
 
Meltus
Old
#4  
Meltus's Avatar
Senior Member - OP
Thanks Meter 993
Posts: 1,909
Join Date: Jan 2009
Location: Manchester

 
DONATE TO ME
Quote:
Originally Posted by DJ_Steve View Post
how about creating a simple shell script and having it execute as a service from one of the init scripts ?

its possible the sys entry is not created until later in the boot sequence
could you give me an example please? i'm pretty new to all this linux stuff

The problem seems to be that when i add the line in to the init.rc (or any of the init files) it gets overridden by something else (probably the kernel) and i can't get it to apply my changes. I can change it fine whilst the phone is running, but that doesn't do anything because i think these files only get read from once when the phone boots.
I could be completely wrong though, like i said, my linux knowledge is pretty bad ><
 
DJ_Steve
Old
#5  
Senior Member
Thanks Meter 832
Posts: 1,152
Join Date: Apr 2007
Location: Durham, Uk

 
DONATE TO ME
First you need to confirm that entry boosts what you want
Devices: Nexus 7 (Grouper) | B&N Nook HD+ | Dell Streak 5 | Motorola Milestone |
Developing Android/Cyanogenmod for Streak/Streak 7 - Please feel free to Donate : GBP Donate | USD Donate
Twitter: http://www.twitter.com/dmonsterprod
 
Meltus
Old
#6  
Meltus's Avatar
Senior Member - OP
Thanks Meter 993
Posts: 1,909
Join Date: Jan 2009
Location: Manchester

 
DONATE TO ME
Quote:
Originally Posted by DJ_Steve View Post
First you need to confirm that entry boosts what you want
That's the problem. I think it reads from the file only once when the phone boots but i don't know, that's why i want to change it on boot to see if it works
 
DJ_Steve
Old
#7  
Senior Member
Thanks Meter 832
Posts: 1,152
Join Date: Apr 2007
Location: Durham, Uk

 
DONATE TO ME
their should be a simple script (.sh extension) in /system/etc that you may be able to edit to add echo *your value > sys path to end of
Devices: Nexus 7 (Grouper) | B&N Nook HD+ | Dell Streak 5 | Motorola Milestone |
Developing Android/Cyanogenmod for Streak/Streak 7 - Please feel free to Donate : GBP Donate | USD Donate
Twitter: http://www.twitter.com/dmonsterprod
 
Meltus
Old
#8  
Meltus's Avatar
Senior Member - OP
Thanks Meter 993
Posts: 1,909
Join Date: Jan 2009
Location: Manchester

 
DONATE TO ME
Quote:
Originally Posted by DJ_Steve View Post
their should be a simple script (.sh extension) in /system/etc that you may be able to edit to add echo *your value > sys path to end of
Tried that. Tired editing the init.rc, that didn't help. I tried adding a sysctl.conf but i don't think the kernel supports it. I tried editing every .sh file i could find but it looks like the kernel just overwrites everything
 
DJ_Steve
Old
#9  
Senior Member
Thanks Meter 832
Posts: 1,152
Join Date: Apr 2007
Location: Durham, Uk

 
DONATE TO ME
ok if you fancy a hand trying to get the volume to boost drop me a pm as i woudln mind being a tester ffor playing with werid options (and since iport android anyway i know my way around
Devices: Nexus 7 (Grouper) | B&N Nook HD+ | Dell Streak 5 | Motorola Milestone |
Developing Android/Cyanogenmod for Streak/Streak 7 - Please feel free to Donate : GBP Donate | USD Donate
Twitter: http://www.twitter.com/dmonsterprod

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

MaR-V-iN to Talk Google and Android APIs at XDA:DevCon 2014

Our international xda:devcon 14in Manchester, UK on the weekend of September … more

But First, Let Me Take a #Selfie

“Today while browsing XDA,I’m going tocheck to seeif my favorite ROM has been updated–but … more

Easily Combine Text and Manage Your Android Clipboard with StuffMerge

Android clipboard management has always been impractical without the … more