Jump to content


Photo

[HOWTO-GUIDE] Tweak sound amplifier.

- - - - -

  • Please log in to reply
21 replies to this topic

#1
Genrix

Genrix

    Regular

  • Members
  • PipPip
  • 57 posts
  • Gender:Male
  • Location:Russia, Rostov-on-Don
  • Devices:Acer Liquid Metal
And so, if you do not like the sound volume on your device, then the volume can be changed.
You will need to change the audio amplifier driver.
You will need to download:
1. Datasheet for sound amplifier TPA2051.
2. Special program from TI management board for the developers.
(TPA2051D3YFFEVM - Graphical User Interface (GUI) Software (zip 68791 KB)
3. Source code of our kernel.

Read the datasheet. Install the program. The program works in Windows, and Linux under Wine.

Now we find the driver source code amplifier.
=> ./kernel/arch/arm/mach-msm/qdsp5v2/tpa2051.c

Run a special program from TI.
Open the driver in a text editor.
Go to the line in the picture.
Posted Image

This initialization of the device at startup.
Some options set is one time at startup, but you change it next.
tpa2051_set_control - this line setup amplifier options.
(1,1,16);//0x10 when 1=write mode, 1=register number, 16 = decimal number. ;//0x10 = comment.
16 decimal number. = ;//0x10 comment.
Now, setup options in TI GUI tool = source code. Try it, but first time is not easy. Try it many times. :)
So, now we look setup options sound amplifier in source code at startup system.

Now, go to line code next picture.
Posted Image

This line setup options your amplifier when you insert headphone jack.
Setup TI GUI Tool = options in source code.

Next we write new settings in source code. We do tweak headphone volume level.
Posted Image
Well done.
Build your kernel now.

You can get completed build kernel at this post
. (High_Boost_LimitterOFF).
I recommend using source driver - High_Boost_LimitterOFF.
Driver MaxBoost_HPLimitter gives a distorted sound. This is a very loud setting, but the quality is poor.
Maybe later I'll find the best setting amplifier.
Good luck! :D

!!!Exactly the same sound amplifier have HTC Sensation (XE) and Incredible. Yes :) Superior headphone music quality with same our amplifier :)
But HTC vendor get out amp setting from kernel and write settings in config file on file system. Here. My trick may apply on HTC too. On HTC not need convert HEX to DEC and rebuild kernel. All in realtime. ;)

Maybe can do the same. And to make GUI Tool, MT Overclocking similar. But not I, sorry.

You can use the driver and method for free in any custom kernel or ROM, if you write a description of the kernel or ROM, the author's method of modification.

ps. Don`t try boost external speaker! He is very easy to burning.
psps. Sorry, bad English. English-speaking moderators, adjust the text to make it easier to read.

Attached Files


Edited by Genrix, 23 January 2012 - 12:54 PM.

  • 6

#2
vincyforce

vincyforce

    Newbie

  • Members
  • Pip
  • 49 posts
  • Devices:Acer liquid Metal
c'è un app chiamata volume + ed è molto più intuitiva e veloce di questa configurazione

  • 0

#3
davidevinavil

davidevinavil

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,005 posts
  • Gender:Male
  • Location:Crevoladossola (VB)
  • Devices:Acer Liquid Metal
Thank you a lot ;)
I'll add it into cm7 kernel :)

  • 0
If you like my work, offer me a beer

#4
Genrix

Genrix

    Regular

  • Members
  • PipPip
  • 57 posts
  • Gender:Male
  • Location:Russia, Rostov-on-Don
  • Devices:Acer Liquid Metal
Volume+ its hack android sound subsystem and get you mono sound.
My mod is hardware change. Quality sound is higher.
And use English. Internatinal community dont like national speech. You should respect forum members.

  • 2

#5
davidevinavil

davidevinavil

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,005 posts
  • Gender:Male
  • Location:Crevoladossola (VB)
  • Devices:Acer Liquid Metal

Volume+ its hack android sound subsystem and get you mono sound.
My mod is hardware change. Quality sound is higher.
And use English. Internatinal community dont like national speech. You should respect forum members.


+ 1
But did you tried to boost speaker volume?

Edited by davidevinavil, 21 January 2012 - 02:33 PM.

  • 0
If you like my work, offer me a beer

#6
Eduard1234

Eduard1234

    Regular

  • Members
  • PipPip
  • 69 posts
  • Devices:Acer Liquid Metal
sorry , i am noob , i am downloading program from ti and after that how can i continue ?

  • 0

#7
Genrix

Genrix

    Regular

  • Members
  • PipPip
  • 57 posts
  • Gender:Male
  • Location:Russia, Rostov-on-Don
  • Devices:Acer Liquid Metal
Possible boost headphone and external speaker. For call speaker tpa2051 amplifier use bypass mode and he is not amplife volume level.
In conference mode call tpa2051 amplife speech and send her to external speaker. It's possible boost. For it driver resive special trigger change work mode.
Boost all mode work amplifer is not different. Read first message this tread and search line in source driver.

  • 0

#8
Eduard1234

Eduard1234

    Regular

  • Members
  • PipPip
  • 69 posts
  • Devices:Acer Liquid Metal
why i have to read datasheet ?

  • 0

#9
Genrix

Genrix

    Regular

  • Members
  • PipPip
  • 57 posts
  • Gender:Male
  • Location:Russia, Rostov-on-Don
  • Devices:Acer Liquid Metal
This guide for people who made costom ROM and make OC kernel. He understand what I wrote in 1st post. This guide not for all and not for noobs too.

  • 0

#10
Eduard1234

Eduard1234

    Regular

  • Members
  • PipPip
  • 69 posts
  • Devices:Acer Liquid Metal

This guide for people who made costom ROM and make OC kernel. He understand what I wrote in 1st post. This guide not for all and not for noobs too.


ok , thanks ' i hate sound of our phones ... i want this in t&l...

  • 0

#11
davidevinavil

davidevinavil

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,005 posts
  • Gender:Male
  • Location:Crevoladossola (VB)
  • Devices:Acer Liquid Metal
I've tried this configuration for speaker but seems no change..
Attached File  tpa2.png   379.31KB   22 downloads


And this is the code

int tpa2051_speaker_phone_switch(int command)
{
	if (command == 1) {
		pr_debug("tpa2051 speaker phone switch = true \n");
		tpa2051_set_control(1, 1, 194);//0xC2
		tpa2051_set_control(1, 2, 37);//0x25
		tpa2051_set_control(1, 3, 87);//0x57
		tpa2051_set_control(1, 4, 13);//0x0D
		tpa2051_set_control(1, 5, 215);//0x8D
		tpa2051_set_control(1, 6, 13);//0xD
	} else {
		pr_debug("tpa2051 speaker phone switch = false \n");
		tpa2051_set_control(1, 1, 16);//0x10
	}

	return 0;
}

Edited by davidevinavil, 21 January 2012 - 04:06 PM.

  • 0
If you like my work, offer me a beer

#12
vamper89

vamper89

    Newbie

  • Members
  • Pip
  • 24 posts
  • Gender:Male
  • Location:milan
  • Devices:acer liquid mtal
even if it is offtopic I try to ask the same
When I receive calls on my caller hears the echo. This is due to the TPU cover. By turning off the second microphone with the option that appears in the call, the problem goes away.
Can you make a option which disables the second microphone?

Edited by vamper89, 21 January 2012 - 04:23 PM.

  • 0

#13
Genrix

Genrix

    Regular

  • Members
  • PipPip
  • 57 posts
  • Gender:Male
  • Location:Russia, Rostov-on-Don
  • Devices:Acer Liquid Metal
davidevinavil
Don`t need add all registers in driver. Try to remove line code for registers №5 and №6. I think №5 and №6 not need.
I see your settings.... Don`t set limit at 4.2V. Is very high. You burn a speaker and need to do repair him. Set in first time 3.6V.

@all
I recommend using source driver - High_Boost_LimitterOFF.
Driver Max_Boost_HPLimitter gives a distorted sound. This is a very loud setting, but the quality is poor.
Maybe later I'll find the best setting amplifier.

Edited by Genrix, 21 January 2012 - 05:50 PM.

  • 0

#14
vincyforce

vincyforce

    Newbie

  • Members
  • Pip
  • 49 posts
  • Devices:Acer liquid Metal

Volume+ its hack android sound subsystem and get you mono sound.
My mod is hardware change. Quality sound is higher.
And use English. Internatinal community dont like national speech. You should respect forum members.


sorry sorry :(

  • 0

#15
chemicalbuz

chemicalbuz

    Diehard

  • Members
  • PipPipPipPip
  • 305 posts

Thank you a lot ;)
I'll add it into cm7 kernel :)


pretty idea! :D

  • 0

#16
harylauw

harylauw

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Devices:Acer Liquid Metal S120
  • Twitter:@hary232
how can i buld kernel? sorry i'm a noob

  • 0

#17
ciauasd

ciauasd

    Newbie

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Devices:Acer Liquid Metal

Hello genrix ...
we know that the speaker sound is not very good on our smartphones, you can make a hardware change for this problem? maybe changing the Hz output from the sound card?

Edited by ciauasd, 24 January 2012 - 04:24 PM.

  • 0

#18
Genrix

Genrix

    Regular

  • Members
  • PipPip
  • 57 posts
  • Gender:Male
  • Location:Russia, Rostov-on-Don
  • Devices:Acer Liquid Metal

we know that the speaker sound is not very good on our smartphones, you can make a hardware change for this problem? maybe changing the Hz output from the sound card?

No, change in level at the output frequency of sound is only possible with the software. Including an external speaker.
If you need it, there is only one way - to prepare a melody for the device.

But I and davidevinavil working to increase the volume of the external speaker. Maybe we'll get.

  • 0

#19
ciauasd

ciauasd

    Newbie

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Devices:Acer Liquid Metal
ok, thanks... i'm hopeful!

Edited by ciauasd, 24 January 2012 - 04:51 PM.

  • 0

#20
ltpitt

ltpitt

    Diehard

  • Members
  • PipPipPipPip
  • 476 posts
  • Devices:Acer Liquid Metal
What I have experienced is that sound in MIUI is a lot worse of DMD or t&l or stock rom...

Gonna test CM soon and write back.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users