[Galaxy S Advance I9070 General] mfjdfj:
can someone explain to me exactly. have I flashed kernel but here I can not get further

Please note that listening to too high volume music over 1 hour can damage your ears.

Or makes your speaker/headset overload.

( 5.0+) Sound control has been enhanced.

( 5.1+) Sound control behaviours have been optimized.

Switch to sound control folder first:

cd /sys/mo*/snd_soc*/p*

* Use RootExplorer to view this folder,you will see a lot files.

Sound hacks wont take effects immediately.It depends on powering on/off ab8500 asoc.

Stop music for 5s to let ab8500 asoc shut down fully,then turn on music.

You need to enable XXXXX_con first,then tweak the XXXXX_bit.

After enabling XXXXX_con,it will be applied when codec powers on or it wont.

How do i check whether it has shuted down or not?

dmesg | grep codec

If you get "Disable ab850x",it has been powered off.

I will explain how to calculate the binay values below.

If we echo 0000 to something,system will consider it as 0.

But that doesnt matter.

'(default)' means that is my default setting in sound control.

[AnaGain3] (Headset audio path):

Ana stands for 'analong'.This is analong gain.

To enable control:

Quote:

echo 1 > anagain3_con

To tweak volume: [volume 0(default, +31dB) > 34 > 68(stock) > 85 > 87]

Quote:

echo 0 > anagain3_bit

* Most values(except 0,34,68,85) will make the volume lost balance.

* If you hear too much noise with 0,34 is recommended.

* It is nice to use 0 with large speakers(audio output)

[HsXDigGain] (Headset Digital Gain)

HsL means left channel.HsR is the right.

To enable control:

Quote:

echo 1 > hsldiggain_con

echo 1 > hsrdiggain_con

To tweak:

* 0000: +8 dB gain (default)

* 0001: +7 dB gain

* ....: -1 dB step

* 0111: +1 dB gain

* 1000: 0 dB gain

* 1001 to 1111: -inf dB gain (mute)

Quote:

echo 0000 > hsldiggain_bit

echo 0000 > hsrdiggain_bit

* If you use +31 dB AnaGain3 + +8 dB DigGain,the result will higher than +39dB!

* Be careful,when the volume is too high,codec will power off automatically.

* Experience the differences between digital gain and analong gain by yourself.

[HsLowPow] (Headset low power mode)

This lowpow mode is enabled by driver normally.

If you want high performance audio instead of LPA(low power audio),

You can disable it.

To enable control:

Quote:

echo 1 > hslowpow_con

To tweak:

* 0: Normal Operation (default)

* 1: Hs drivers in Low Power

Quote:

echo 0 > hslowpow_bit

[HsDacLowPow] (Headset DAC low power mode)

DAC is Digital-to-Analong Converter.

This lowpow mode is enabled by driver normally.

To enable control:

Quote:

echo 1 > hsdaclowpow_con

To tweak:

* 00: Normal Operation (default)

* 01: Hs DAC drivers in Low Power

* 10: Hs DAC in Low Power

* 11: Hs DAC and Hs DAC drivers in Low Power

Quote:

echo 00 > hsdaclowpow_bit

[HsHP] (Headset high pass filter)

This high pass filter is disabled by driver normally.

Enable this can reduce some sub-nosie of audio.

To enable control:

Quote:

echo 1 > hshp_con

To tweak:

* 0: Headset high pass filter disabled

* 1: Headset high pass filter enabled (offset cancellation enabled) (defualt)

Quote:

echo 1 > hshp_bit

[ClassDDithHPGain]

ClassD is a kind of amplifier.

According to the documents,our ClassDs only relate to Handsfree(speaker).

To enable control:

Quote:

echo 1 > classdhp_con

To tweak:

* Gain control for the high pass component of dithering filter

* 0000: Minimum gain

* ....:

* 1010: Maximum gain (default)

Quote:

echo 1010 > classdhp_bit

[ClassDDithWGain]

* Gain control for the white component of dithering filter

* 0000: Minimum gain

* ......:

* 1010: Maximum gain

Quote:

echo 1 > classdwg_con

echo 1010 > classdwg_con

[ClassDHiVol]

This is a gain of speaker.But +2dB only.

echo 1 > classdhivol_con

Say 1(default) to enable:

Quote:

echo 1 > classdhivolhfl_bit

echo 1 > classdhivolhfr_bit

* In fact,our speaker is right channel only!

[ADDigGain2]

This is the audio path of mic2

Quote:

echo 1 > addiggain2_con

Quote:

echo 9 > addiggain2_bit

* Default: about +20dB

* Max: Say 0 to addiggain2_bit to +31dB

[EarDigGainb]

This is the digtal gain of earpiece

Experimental still.But you can try.

Quote:

echo 1 > eardiggain_con

Quote:

echo 0 > eardiggain_bit

* The values of eardiggain_bit is the same as hsldiggain_bit

How to calculate the binary values?

We use HsXDigGain as example.

The gain step is "+1".

In binary: So the values will like these:

0+1 = 1 | 0001: +7 dB

1+1 = 10 | 0010: +6 dB

10+1 = 11 | 0011: +5 dB

11+1 = 100 | 0100: +4 dB

..... | ......

[Experts!]:

This method can work on any ab850x codec platform!

Quote:

cd /d/asoc/U*/ab*

Play music,reduce the volume.

Now we are going to edit the codec registers.

Quote:

echo REG VAL > codec_reg

E.G:

AnaGain3:

Quote:

echo 0x16 0x00 > codec_reg

HsDigGain: (left/right channel)

Quote:

echo 0x4F 0x00 > codec_reg

echo 0x50 0x00 > codec_reg

Disable all lowpow mode:

Quote:

echo 0x04 0x00 > codec_reg

* These hacks will restore when codec power off.