yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] medimel:
Hi guys found the data sheet of chipset managing our toy.

Too late this night to analyse it but u can see the filter applied to load impedance up to 500 ohm.so headphones detection confirmed and u was greatly inspired to think it.there also indications of max min range settings to apply in service mode.

Have a good read...

http://www.wolfsonmicro.com/documents/uploads/data_sheets/en/WM8990.pdf

ps: note wolfson is a famous chipset audio factory u can find in expensive audio materials, audiophile mp3 players and in apple ipod iphone products.Final quality depend of surrounding components too.

May it s a way to investigate to get optimal audio quality playback nd improve video recording mic audio clarity...
[Galaxy S I9000 Android Development] supercurio:
Thanks medimel !

PS : About audio recording (for video or anything), I agree... this hardware is able to do so much better

Auto gain control is such a basic feature, I can't stand how Samsung forgot this.
[Galaxy S I9000 Android Development] supercurio:
The exact CODEC is the WM8994 (even better than WM8990) like buddy01 reported previously, confirmed by /proc values.

I don't know where you found the link for the WM8990's data sheet, maybe you can find the same for WM8994 :D
[Galaxy S I9000 Android Development] medimel:
ok supercurio.Ur right it s even better (24bits 96khz dac and better headphone amp (class W numeric amp it s like class d for audio amp.like the ta2024 chip in home audio who was encensed by all the audio press.googling it to see how much))

Tried to found it but no way for now.

There is main page of the chip : http://www.wolfsonmicro.com/products/audio_hubs/WM8994/

And the explanation of the impedance compensation who deteriorate audio quality who is there to improve efficiency and reduce power consumption dixit wolfson:

http://www.wolfsonmicro.com/documents/uploads/misc/en/WAN0212_1.pdf

Think the chips are brothers and settings management.There s only few differences with the 8993 :http://www.wolfsonmicro.com/documents/uploads/data_sheets/en/WM8993.pdf

Now we can explore this to maybe improve it more.

May we can :

activate 24bits 96khz with compatible flac files.

remove all eq filters and some dynamic range control (read it goal to limit excursion of speakers or headphone unit)

run it at full power but without additional gain who affect noise floor nd can cause saturation

Im going to work n it
[Galaxy S I9000 Android Development] FadeFx:
if you have sniffed the comunication its maybe the best idea to just set the params via a bootscript this would make searching for the save option obsolete, enable to build an app to configure the dsp on the fly and maybe to build a system eq app... i am not a coder nor am i able to do linux shellscripts, but someone with a little more knowledge could do this for sure.
[Galaxy S I9000 Android Development] supercurio:
With the 100dB SNR DAC and a great quality headphone amp, the SGS has definitely the ability to become a high-end portable audio equipement.

Too bad Samsung use the hardware so bad by default !

But here we come :)

Good find, it will really help using settings properly.

For 24/96 support, we may probably have to talk directly to the linux alsa device, 96 kHz should not be a problem, i'm not sure that Android SDK let use other resolutions than 16bit PCM or 8bit PCM

In the Samsung music player everything is resampled to 44100Hz/16bit, but i don't know yet if it's done by samsung player or Android framework.

BTW it's nice not being the only one investigating ;)
[Galaxy S I9000 Android Development] supercurio:
Yep FadeFx, i sniffed it but still don't know if the ServiceMode app talked to a linux character device, or an other API...

But somebody know for sure ;)

And because current ServiceMode app is just another apk, some other app should have the same abilities !

I had the same idea about an app acting as a collection of quick fixes and more

Features of this app would be :

Auto fix EQ settings at boot

Allow customized parametric EQs with some GUI and the ability to set them at boot too

Ability to set the DAC analog gain to get the best SNR and volume for several headphones

Ability to set and tweak dynamic compressor to improve listening experience in car and other noisy environments

Ability to enable/disable auto gain control for the mic input.

This TODO is 0% completed right now ^^
[Galaxy S I9000 Android Development] supercurio:
medimel :

Right now I build a PC dedicated to Rightmark Audio Analyzer.

I have some troubling RMAA results with my SGS : only 82dB SNR measured... that's pretty bad compared to GSMArena results (90dB) and the theorical maximum SND (100dB).

But I'm on an internal soundcard, not the best reference.

Strange because I get 88.2dB SNR with a Galaxy Spica and the same Setup..

I've probably altered some other DAC parameters in ServiceMode, reducing the max volume without reducing the noise.

Anyway my spare good old Terratec DMX 6FIRE 24/96 will have a new legitimate use :)

I've buyed 2x 16Ohm resistors to simulate load too :)
[Galaxy S I9000 Android Development] medimel:
Here is dynamic compressor explained.

It say what 8993 and 8994 nd others family menbers use same drc functionality.

Think have located the compressor settings ...

Testing it
[Galaxy S I9000 Android Development] supercurio:
Nice ! :)

Do you check settings change with your ears or do you use another method ?
[Galaxy S I9000 Android Development] medimel:
Just my ears for moment....

Testing it again..

Will try later with audio software connected with external usb audio dac ( poppulse 707 who got line in ) to confirm factory specs and see improvements.

Will post full results when all done..
[Galaxy S I9000 Android Development] supercurio:
I had the opportunity to borrow another Galaxy S for some minutes, so I did some audio checks with it :

The phone 3.5mm out was connected to a double connector plugged to :

PL 50 Headphones

TerraTec DMX6Fire 24/96 line-in

The frequency response is different with and without the fix, even if I thought that the numbers representing the EQ difference would be much more dramatic.

This test procedure is probably not exactly representative of the real signal.

I doubt so many people would have heard a +0.5db boost in some frequencies !

You can see that the frequency response is far from linear. This is what appends when you plug real headphones (even in-ear) and line in at the same time ^^.

The green (with fix) bass curve is a bit buggy because the input gain was a little to high, some test sound were probably saturated even if RMAA reported 0% clipped samples.

I'm happy to show you the representation of this EQ. That's more visual than words ;)
[Galaxy S I9000 Android Development] supercurio:
medimel : I measured a big difference in signal amplitude between my Galaxy S and the other one.

According to the calibration procedure of RMAA, mine is at least 6db quieter (and the noise floor is lower too !)

So it is possible to record EQ and Gain settings for the DAC :)
[Galaxy S I9000 Android Development] dannyd2134:
I found an open source driver for the WM8994 here......

http://opensource.wolfsonmicro.com/node/6

This site tells you things to help a developer to get the full potential out of the Wolfson. :eek::D:D
[Galaxy S I9000 Android Development] }{Alienz}{:
You guys have turned me into a SLAVE-ADDICT of checking this topic on the forums lol.

Ever since I got my Vibrant (thinking the sound will be perfect seeing GSMarena's flat line), I was flat out DISSAPOINTED by the sound quality and immediately went to look for a 3rd party audio player with a good EQ and volume boosts. The Vibrant was much quieter than my Nokia XpressMusic 5310 and just flat out LACKED in the bass department. Failing to find "the right player" depressed me but ever since I saw this, I am a believer again. The fix improves things to the point I can put the phone as a music player. I still think my Nokia 5310 is better but the Vibrant has +16GB internal. Ah well. Lol.

Can we get serious about possibly starting work on the "TODO" list supercurio listed? That would be like a dream come true.

PS: I fiddled with the sound more by connecting the Galaxy S to my main pair of headphones (Sennheiser HD595 Audiophile) and to my dissapointment, my fears were comfirmed. With the fix, the phone simply lacks power in the lower frequencies. I CLEANLY heard they are PRESENT with the 595s but its as if they are severely muted. Using just the stock music player EQ, I fiddled with the settings there and could not get the higher ranges "clean" either, at least not nowhere as clean as my X-Fi on my computer. Though I will say the fix given here improves the situation, it still is a bit far from ideal. What bothers me now is, is the lower frequencies being so quiet a hardware limitation of the chip or is it some stupid setting burrowed down. I do realize its not 105db hardware (100db being IDEAL theoretical and ~85 being the usuals as reported here) but still its a bit dissapointing if it cannot drive lows decently.

Provided the Sennheisers 595 are not exactly a small pair of headphones (though I did test with other portable equipment so I have an idea of HOW portables should sound quiet and loud), the Samsung Galaxy S seems on the lower range of the devices I tested. For my normal use, I use it with a pair of V-Moda's inears, which actually have a boosted treble and bass response (which is to my liking) but there are STILL things to be desired. That application/script being developed may be something.
[Galaxy S I9000 Android Development] The.Opethian:
I am a newb here but one who is very much interested in applying this to my device. Thanks for putting in all the work here. but I have some problems.

Following the first post it says that I should change:

"Set the value 0 fir_coeff 0, 1, 2, 3, 4, 5 and 6"

Do you mean to say that I should change my current settings which is:

[1] fir_coeff 0 : 0xffffff49
[2] fir_coeff 1 : 0xffffce6
[3] fir_coeff 2 : 0xffffab3
[4] fir_coeff 3 : 0xffffccb
[5] fir_coeff 4 : 0xffff0e9
[6] fir_coeff 5 : 0xfffffc7
[7] fir_coeff 6 : 0x3e4a

To the following:

[1]fir_coreff 0 : 0xffff49
[2]fir_coreff 0 : 0xfffce6
[3]fir_coreff 0 : 0xfffab3
[4]fir_coreff 0 : 0xfffccb
[5]fir_coreff 0 : 0xfff0e9
[6]fir_coreff 0 : 0xffffc7
[7]fir_coreff 0 : 0x3e4a

Several things I noticed here, the first one preventing me from doing anything:

1. When I "Key Input", it changes the hex value "0xfffffc" to "0x0", instead of "fir_coeff 1" to "fir_coeff 0". When I "Key Input" the 0 to them this is what it looks like afterwards:

[1] fir_coeff 0 : 0x0
[2] fir_coeff 1 : 0x0
[3] fir_coeff 2 : 0x0
[4] fir_coeff 3 : 0x0
[5] fir_coeff 4 : 0x0
[6] fir_coeff 5 : 0x0
[7] fir_coeff 6 : 0x0

How do I change the number instead of the hex value?

2. My settings say "fir_coeff" and yours say "fir_coreff". Are they the same?

3. My hex values are different for each line, like say the first line, mine has "[1] fir_coeff 0 : 0xffffff49" and yours has "[1]fir_coreff 0 : 0xffff49". Notice that mine has a couple more f's in there.

Any help you can provide will be most appreciated. :)
[Galaxy S I9000 Android Development] bajica:
I believe this is correct setup
[Galaxy S I9000 Android Development] robert_tlse:
Just tested these settings and couldn't really hear any difference with default galaxy s headphones.

Default headphones sound pretty crappy no matter what settings i seem to put in, best i've found is to set equalizer to classic & then effects to either: normal, wide, or clarity depending on music style (clarity works best overall).

However if i use my home headphones (Sennheiser hd 280 pro) and compare the sound of a same song between my pc (xfi titanium) and the galaxy s, then yes the sound can get quite near the pc quality (tho the galaxy s sounds a bit muffled).

...then again, i don't care how it sounds with my home headphones, as those are staying at home :)
[Galaxy S I9000 Android Development] supercurio:
The WM8994 driver is indeed already in kernel sources provided by Samsung.

Anyway it's good to see that Wolfson take very seriously their kernel driver job.

Their drivers are in sync with the latest Linux kernel tree, continuously improved and fully GPL.

Kudos Wolfson !

If Samsung ServiceMode interface really sucks, talking directly to the kernel driver will stay an option, as it is better documented.

Only problem is that we would need to a rooted device, because of this permissions :

# ls -l /dev/snd/
ls -l /dev/snd/
crw-rw---- root audio 116, 33 2010-08-01 23:38 timer
crw-rw---- root audio 116, 32 2010-08-01 23:38 controlC1
crw-rw---- root audio 116, 56 2010-08-01 23:38 pcmC1D0c
crw-rw---- root audio 116, 48 2010-08-01 23:38 pcmC1D0p
crw-rw---- root audio 116, 0 2010-08-01 23:38 controlC0
crw-rw---- root audio 116, 24 2010-08-01 23:38 pcmC0D0c
crw-rw---- root audio 116, 16 2010-08-01 23:38 pcmC0D0p
[Galaxy S I9000 Android Development] supercurio:
Hehe I would prefer everyone free :D

But I must admit I'm not satisfied either with the current situation.

Quieter than isn't a problem for most user, because more and more headphones a very sensitive now (especially in-ear ones).

As the signal to noise ratio never gets much better than 90dB, quieter means less floor noise.

Remember that with in-ear and isolating headphones, floor noise is easily noticeable or a real issue affecting the listening experience.

It is, for example, with earphones provided by Samsung with the Galaxy S.. test them, you'll see why the default ouput gain is quiet ;)

Independently, I understand that it can be a problem with some "low sensitivity" headphones, regardless of their quality !

With which equipment does the quiet output is problematic ?

I'm very surprised that you find that the SGS lacks in the bass department !

With the provided EQ Fix, the SGS amp drives my equipment as deep as possible.

I checked with some custom made test sounds, and listening to the frequencies, bass response is pretty flat until 25Hz :eek: This is truly impressive!

Either your headphones are exceptionally hard to drive, or probably, you're accustomed to a "bass boost" effect ;)

Right now progress is really slow.

The only real advance I made this week end is finding in which partition "ServiceMode" is.

I found corresponding strings in /dev/block/bml12, for instance :

strings ./bml12 | grep Diamond
[SND] TurnON UtaAudioModifyHf(prev_Diamond_mode:0x%x)
`[SND]DiamondVoice_GetMode : path = 0x%x, Diamond_mode = 0x%x
`[SND]DiamondVoice_GetMode : Diamond_mode = 0x%x
[SND]DiamondVoiceTXcfgMSG
`[SND] DiamondVoice_RxInit : DiamondVoice_Mode_v = 0x%x
Diamond Solution
[9] Diamond Solution
[SND]DiamondVoice_Config : DiamondVoice_Mode_v = 0x%x, Diamond_mode= 0x%x

bml12 nature is not known for now, according to this topic

Again : Any help is welcome !

This hardware will never output 10W for giant headphones.

The speaker driver is 2W/mono 1W/stereo but I don't know the exacts details about headphone amp circuit.

I guess that the frequency response for big headphones depends on the electric capacitors integrated with the amp.

If your headphones are really difficult to drive, I would pragmatically suggest some external amp.
[Galaxy S I9000 Android Development] supercurio:
Right... so... a "to" was missing to really make sense ^^

Sorry, my English is far from perfect !

Correction Done !

bajica answer was spot on, you just need to enter the 0 character.

Did it work for you The.Opethian ?
[Galaxy S I9000 Android Development] supercurio:
Re-bonjour robert_tlse :)

I see you stick to the music player EQ & Effects.

If it help your listening experience with the default headphones, why not ^^

Anyway provided headphones are quite good... compared to headphones provided with most other devices (who said iPhone?) :D
[Galaxy S I9000 Android Development] husq510:
[pid 2396] recvmsg(34, <unfinished ...>

[pid 2395] sendmsg(34, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\24", 4}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 4

[pid 2395] sendmsg(34, {msg_name(0)=NULL, msg_iov(1)=[{";\0\0\0\5\6\0\0\6\0\0\0\1\3\0\6\0\1\0\0", 20}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>

[pid 2396] <... recvmsg resumed> {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\1\210", 4}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 4

[pid 2396] recvmsg(34, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\5\6\0\0\0\0\0\0v\1\0\0\0\0- Handset Diamond Solution1Mic \0\1\0[1]fir_coeff 0 : 0xffffff49\0\0\0\0\0\2\0[2]fir_coeff 1 : 0xfffffce6\0\0\0\0\0\3\0[3]fir_coeff 2 : 0xfffffab3\0\0\0\0\0\4\0[4]fir_coeff 3 : 0xfffffccb\0\0\0\0\0\5\0[5]fir_coeff 4 : 0xfffff0e9\0\0\0\0\0\6\0[6]fir_coeff 5 : 0xffffffc7\0\0\0\0\0\7\0[7]fir_coeff 6 : 0x3e4a\0\0\0\0\0\0\0\0\0\10\0 \0\t\0 \0\n\0 \0\0\0", 392}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 392

your parameter are request by a specific sendmsg and result is in recvmsg.
[Galaxy S I9000 Android Development] supercurio:
Hey :) Interesting !

Which tool did you use to get these infos ?

Do you have some more details about the processes corresponding to pid 2395 and 2396 ?

Are they ServiceMode and ServiceModeService ? (I saw that in some DDMS log if I remember correctly)

Have you some logs for the event of setting a parameter ?

Thanks ;)
[Galaxy S I9000 Android Development] supercurio:
Wow, i had some interesting bug when using the Youtube App.

After plugging a line-out, the internal speaker just stayed active... but,

With a different EQ ! And this one sounded much better, with actual bass and treble in the sound, not just high-medium **** that resonate with the plastic battery cover.

All this without sound saturation either...

I think that we can get much better sound from the integrated speaker too !
[Galaxy S I9000 Android Development] Bhonka:
in system/etc there is an asound.conf file. which mentions some vol settings.

i've tried changing some values and managed to disable sound through the headset but have not been able to increase volume yet.
[Galaxy S I9000 Android Development] husq510:
2396 are fork of 2331 process which is com.android.phone.

message are sent and received on socket 34 which is unix domain socket.

m.android 2331 1001 34u unix 0xe7aa9b80 2676 socket

most probably /dev/socket/zygote
[Galaxy S I9000 Android Development] }{Alienz}{:
supercurio, I didn't say my headphones are hard to drive. I am WELL aware the test I did with my Sennheiser 595s is SUPPOSED to be quiet because I am YET to find a mobile device that can fully drive them without an amp (aside from my X-Fi sound card on the computer). I just used them to verify bass is THERE since I KNOW they can reproduce just about everything and am used to listening to them. I can confirm the phone HAS the frequences and reproduces them accurately, just I cannot tweak them to my desired values using the equalizers I have currently.

I usually listen using an in-ear phones by Vmoda which are bassand treble boosted in the drivers and and almost get the desired effect using those.

I guess my question/problem lies in my Nokia 5310 XpressMusic being able to ROYALLY kick the crap out of the Galaxy S when it comes to both bass and treble, and vlumes on both. The Nokia only has a 5-band EQ, yet boosting the low or the high actually boosts the really low frequncies and the phone can handle a good 10-12db increase on those with NO problems whatsoever in quality.

The Galaxy S on the other hand seems to be boosting higher-bass frequencies (since lower ones seem absent from the EQ to begin with I beleieve) but even so, even if I max the EQ bass, I still am at around 1/2 of what the Nokia can do in terms of power on that frequency.
[Galaxy S I9000 Android Development] johannesecaesar:
Everytime i change it to 0, here what i get

[1]fir_coreff 0 : 0x0

[2]fir_coreff 0 : 0x0

[3]fir_coreff 0 : 0x0

[4]fir_coreff 0 : 0x0

[5]fir_coreff 0 : 0x0

[6]fir_coreff 0 : 0x0

[7]fir_coreff 0 : 0x0
[Galaxy S I9000 Android Development] MiG123:
dude 0x0=0...
[Galaxy S I9000 Android Development] medimel:
hi supercurio.Think ur improvement in phone hp is the activation of sound compression nd anti clip function of the chip.havnt got time yet for experiment all setting.trying to found equivalence between samsung settings value and chip settings indicated in product sheet.

Samsung didnt use all features of audio chip to increase battery life or may dev is concentrate on software nd nt on audio quality optimisation.

We can together find the way to do it and really exploit the fantastic potential of this audio chip
[Galaxy S I9000 Android Development] fredphoesh:
Hi guys,

I have shure 530's and have definitely noticed an improvement to the audio with this fix. It seems more detailed to me, so I would not agree that the fix is compressing the sound, the reverse would seem truer...

Mark.
[Galaxy S I9000 Android Development] robert_tlse:
Re-Salut :)

Yeah, for now i will stick with default eq stuff, but thanks for all the info.

And i will continue monitoring this thread to see how things evolve :cool:

Dunno how iphone sounds, but i was used to the sound of my w810i before switching to the galaxy s ..was kinda shocked, considering the price ! :P
[Galaxy S I9000 Android Development] medimel:
hi live god im totally right with u.

But wasnt talking about headphones output who is more dynamic with fix nd disable compression.

Was talking about the phone external speaker supercurio found better with it s youtube bug.

To get acceptable sound with wider range ur forced to apply compression on little speakers.This is the recipe of bose in little subwoofer to limit distortion.

My goal is to find a way to free the headphone output of all dsp eq, anticlip and all type of compression.

Analysing spectral response now without fix nd with it apllied and others settings too
[Galaxy S I9000 Android Development] johannesecaesar:
is it ok?... is it same as yours?
[Galaxy S I9000 Android Development] Kpkpkpkp:
0x0 in hexadecimal = 0 in decimal
[Galaxy S I9000 Android Development] ^Sbk79^:
Is it just me, or?

Is it just me or anytime you activate the equalizer (any profile) you get a weird sound distortion?

Something that might be described like volume constantly adjusting itself, sound "going away" and "coming back"... just like if there is a dynamic self adjusting setting of some kind... Same feeling while listening to radio.

Anyone else??? JM2 here. Any idea?
[Galaxy S I9000 Android Development] dalingrin:
From what I can tell the EQ presets apply compression as well as adjust frequency amplitude.
[Galaxy S I9000 Android Development] fredphoesh:
aah kapish, thanks mate

mark.
[Galaxy S I9000 Android Development] }{Alienz}{:
Anyone figured out how to maybe "control" the hardware EQ that this fix removes?

I figured, if I'm using an EQ in the music player, I can combine it with the one here and maybe get a good effect. I agree the one Samsung uses (and is removed here) is bad. But perhaps if those settings are tweaked, a nice result can be achieved?

Anyone have a clue how to work the values? It apprears it is a 7-band EQ?
[Galaxy S I9000 Android Development] Prankey:
Service Mode not coming in JP3. Can someone help? I just get the numbers go in the dial pad! No service mode (used it before). Are the codes changed? I am using some custom rom (JP2 PDA, JP3 Modem and JP3 CSC with Samset 2.0 mod for JP2). This works great for me except for 2 issues - Headset doesnt work in calls and now the service mode issue!
[Galaxy S I9000 Android Development] supercurio:
Samset removes too much, a bit blindly I would say.

You may Never remove Service Mode from any Samsung device !

If you use this MOD you may inform his dev setenza01 about the issue.
[Galaxy S I9000 Android Development] supercurio:
So we can communicate through a standard UNIX socket.

That's great !
[Galaxy S I9000 Android Development] furstrated:
yep it might be due to samset as i can access the service menu on mine running stock jp3