New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Rhonin86
Old
(Last edited by broncogr; 11th January 2012 at 09:34 AM.)
#1  
Rhonin86's Avatar
Senior Member - OP
Thanks Meter 229
Posts: 435
Join Date: Nov 2011
Location: Hagen
Cool [9001][DEV]Information around the original car charging Cradle

Hi @ all,

after an extensive testing period with different kernels i would like to share my experiences with you. After Updating to CyMod 0.2 (a german MOD) i was not able to charge my mobile in the cradle anymore. Without going too deep into details i can give you the following statements:

1) All FeaCore oder Phoenix based kernels don't recognize the charging cradle, that means the mobile don't get charged. (I used the following kernels: FeaCore 1.2; Phoenix OC/UV; NON OC; OC/UV vdd -Testkernel; Cranium V6 1900 MHz)

2) Stock-Kernels XXPKS / XXKPU gets the mobile to be charged and additionally switch the mobile into car mode. (Car mode: in the upper left corner appears a steering wheel -> mobile gets charged andthe display isn't switched off automatically)

Meanwhile i discovered that this behaviour doesn't depend on the kernel itself but depends on a "closed source samsung module. This module isn't used in the open source kernels e. g. Phoenixkernel (But this is only an assumption by me, and only the profis can tell) LINK: http://forum.xda-developers.com/showthread.php?t=980937 an in connection to that: http://forum.xda-developers.com/showthread.php?t=820275

************************************************** ************************************************** *************************************

EDIT: as mentioned above, there must be a kernel component / driver which is missing in the so called open-source-kernels. A friend of mine in the german forum sends me the following link, which contains perhaps the needed code:

http://bonsai.googlecode.com/svn-his.../fsa9480_i2c.h

May be this is the missing link to make the Phoenix kernel work with the cradle. But i'm too unexperienced to check it and really don't know where to start searching in the kernel's code. In another thread i've read that the choosen mode depends not on the pin assignment but on the delivered voltage at the pins. This voltage assignments to the pin is made by the cradles electronic.

************************************************** ************************************************** ***********************************

Maybe we can use the collected information to find a new approach to find a way to make the wonderful Phoenix-kernel work with the charging cradle.


Special Thanks go to:

a) Skywalker01, who supported me with his knowledge on every level, also with the english language

b) Cynob from Android-hilfe for his MOD and for his support to figure out the problem

c) Crybert for providing the slightly modified stock-kernel (Link: http://forum.xda-developers.com/show....php?t=1376388 )

and all the other members here and in the german Android-Hilfe-Forum
The Following User Says Thank You to Rhonin86 For This Useful Post: [ Click to Expand ]
 
bikeaholics
Old
#2  
Senior Member
Thanks Meter 4
Posts: 100
Join Date: Apr 2011
IT would be awesome if sakindia and manu0ver would implementiert these Codes which will let us use our cradle.

Gesendet von meinem GT-I9001 mit Tapatalk
 
Rhonin86
Old
(Last edited by Rhonin86; 8th January 2012 at 07:35 PM.)
#3  
Rhonin86's Avatar
Senior Member - OP
Thanks Meter 229
Posts: 435
Join Date: Nov 2011
Location: Hagen
Thumbs up New Infos from Skywalker01

to whom it may concern....

Hi,
....
I just compared the linked source code to the one that is in Samsungs I9001 sources. The file is named slightly different and it appears in 4 different locations. The appropriate location seems to be GT-I9001_Kernel\kernel\include\linux\i2c\fsa9480.h

While this is an original linux source and about 5 month NEWER than the version in the given link above the latter one is a special Samsung version with some modifications and quite a lot of additions.

It is also unclear if these sources derive from the very same generic kernel sources and if it will be sufficient just to exchange this single file. h files are only definitions and parameters, usually the accompanying program code files (fsa9480.c for example) will also need adaptation.

Best advice I can give right now is to post these infos to manveru0 or YardE so they can try to include this stuff into there I9001 custom kernels.
......


BIG THX to your efforts Skywalker01

Here you find the related code: http://bonsai.googlecode.com/svn-his.../fsa9480_i2c.h
 
manveru0
Old
(Last edited by manveru0; 10th January 2012 at 08:46 PM.)
#4  
manveru0's Avatar
Senior Member
Thanks Meter 247
Posts: 285
Join Date: Oct 2011
Location: Bern
Quote:
Originally Posted by Rhonin86 View Post
to whom it may concern....

Hi,
....
I just compared the linked source code to the one that is in Samsungs I9001 sources. The file is named slightly different and it appears in 4 different locations. The appropriate location seems to be GT-I9001_Kernel\kernel\include\linux\i2c\fsa9480.h

While this is an original linux source and about 5 month NEWER than the version in the given link above the latter one is a special Samsung version with some modifications and quite a lot of additions.

It is also unclear if these sources derive from the very same generic kernel sources and if it will be sufficient just to exchange this single file. h files are only definitions and parameters, usually the accompanying program code files (fsa9480.c for example) will also need adaptation.

Best advice I can give right now is to post these infos to manveru0 or YardE so they can try to include this stuff into there I9001 custom kernels.
......


BIG THX to your efforts Skywalker01

Here you find the related code: http://bonsai.googlecode.com/svn-his.../fsa9480_i2c.h
I've changed the fsa9480.h file under /include/linux/i2c and compiled the OC Kernel with it. Everything went well so there are at least no functions in the header file which ain't listed in the fsa9480.c file under /drivers/misc/fsa9480.c

Here's the link to the full package with the new kernel, though I doubt this will work (see skywalkers statement about the header files):

WARNING: As this thread is in the I9000 forum I must warn you! This is a kernel/CWM package for the I9001 aka Galaxy S Plus. Do not flash this on a I9000 or you'll brick your phone!

http://www.mediafire.com/?9ea081eeu34cv9p

The output concerning fsa9480.c during the compile process was:

Code:
 CC      drivers/misc/fsa9480.o
drivers/misc/fsa9480.c: In function 'fsa9480_i2c_tx_data':
drivers/misc/fsa9480.c:344:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c: In function 'fsa9480_i2c_rx_data':
drivers/misc/fsa9480.c:388:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c: In function 'fsa9480_chip_init':
drivers/misc/fsa9480.c:460:2: warning: large integer implicitly truncated to unsigned type
drivers/misc/fsa9480.c:464:2: warning: large integer implicitly truncated to unsigned type
drivers/misc/fsa9480.c: In function 'usb_switch_show':
drivers/misc/fsa9480.c:612:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c:619:2: warning: 'return' with no value, in function returning non-void
drivers/misc/fsa9480.c:626:3: warning: 'return' with no value, in function returning non-void
drivers/misc/fsa9480.c: In function 'usb_switch_store':
drivers/misc/fsa9480.c:657:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c:687:1: warning: no return statement in function returning non-void
drivers/misc/fsa9480.c: In function 'disable_vbus_store':
drivers/misc/fsa9480.c:710:1: warning: no return statement in function returning non-void
drivers/misc/fsa9480.c: In function 'DefaultESNStatus_switch_store':
drivers/misc/fsa9480.c:886:1: warning: no return statement in function returning non-void
drivers/misc/fsa9480.c: At top level:
drivers/misc/fsa9480.c:1557:2: warning: initialization from incompatible pointer type
drivers/misc/fsa9480.c:264:1: warning: 'dev_attr_KiesStatus' defined but not used
drivers/misc/fsa9480.c:591:12: warning: 'get_current_mode' defined but not used
drivers/misc/fsa9480.c:888:1: warning: 'dev_attr_DefaultESNStatus' defined but not used
drivers/misc/fsa9480.c:921:1: warning: 'dev_attr_dock' defined but not used
drivers/misc/fsa9480.c: In function 'fsa9480_chip_init':
drivers/misc/fsa9480.c:461:5: warning: 'ret' may be used uninitialized in this function
in addition, there are links to what may be original sources (we need to check them if the kernel above won't work):
http://lxr.free-electrons.com/source...misc/fsa9480.c

and a patch:
https://lkml.org/lkml/2011/7/26/77
The Following 2 Users Say Thank You to manveru0 For This Useful Post: [ Click to Expand ]
 
Rhonin86
Old
#5  
Rhonin86's Avatar
Senior Member - OP
Thanks Meter 229
Posts: 435
Join Date: Nov 2011
Location: Hagen
Quote:
Originally Posted by manveru0 View Post
WARNING: As this thread is in the I9000 forum I must warn you! This is a kernel/CWM package for the I9001 aka Galaxy S Plus. Do not flash this on a I9000 or you'll brick your phone!
*SORRY* Guys... it was my fault ....

Could one of the admins move the topic in the right forum
 
bikeaholics
Old
#6  
Senior Member
Thanks Meter 4
Posts: 100
Join Date: Apr 2011
There is no need to switch it. Here are also People with the same problem. Maybe you will start a new thread in 9000 section and link it to here so the can use the informations also.

Thanks Manu! I´ve installed the new kernel 4200 points in Antutu and I will check in around an hour if the cradle hopefully will work.

Have you any idea about the frontcam issues in skype? with stock rom and kernel it works but with cwm it will not work only the backside one.
 
Rhonin86
Old
#7  
Rhonin86's Avatar
Senior Member - OP
Thanks Meter 229
Posts: 435
Join Date: Nov 2011
Location: Hagen
Post unfortunately it doesn't work...

though the istallation precess works fine and without error the cradle denies to charge the phone.

Thx anyway Manveru0...

If you got something to test, post it and we'll try it to help you to get rid of this wrong interpretation of the Phoenix-Kernel.

The cradle was recognized from stock-kernel 2.3.4 due to information delivered in the german forum.... Maybe this ist another hint to follow...
 
bikeaholics
Old
#8  
Senior Member
Thanks Meter 4
Posts: 100
Join Date: Apr 2011
For me the same. Installation without trouble but screen shut off as normal and no charging.

Gesendet von meinem GT-I9001 mit Tapatalk
 
ZappBrannigan
Old
#9  
Junior Member
Thanks Meter 2
Posts: 12
Join Date: Nov 2008
Maybe this might help?

The car cradle works fine with stock 2.3.6! The screen is rotating and phone is charging. But there is no Samsung-car-app available for the i9001 :( Strange, because the normal google-car-app works fine! (although I can't install it through the german market, as it is "not available in your country"?!?).

The only thing which still won't work is the audio-out :( I tried some of the i9000 audio-out-switcher apps, but non of them worked. Audio still comming from the phone speaker.
 
skywalker01
Old
#10  
Senior Member
Thanks Meter 618
Posts: 244
Join Date: Oct 2009
Quote:
Originally Posted by manveru0 View Post
I've changed the fsa9480.h file under /include/linux/i2c and compiled the OC Kernel with it. Everything went well so there are at least no functions in the header file which ain't listed in the fsa9480.c file under /drivers/misc/fsa9480.c

Here's the link to the full package with the new kernel, though I doubt this will work (see skywalkers statement about the header files):

WARNING: As this thread is in the I9000 forum I must warn you! This is a kernel/CWM package for the I9001 aka Galaxy S Plus. Do not flash this on a I9000 or you'll brick your phone!

http://www.mediafire.com/?9ea081eeu34cv9p

The output concerning fsa9480.c during the compile process was:

Code:
 CC      drivers/misc/fsa9480.o
drivers/misc/fsa9480.c: In function 'fsa9480_i2c_tx_data':
drivers/misc/fsa9480.c:344:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c: In function 'fsa9480_i2c_rx_data':
drivers/misc/fsa9480.c:388:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c: In function 'fsa9480_chip_init':
drivers/misc/fsa9480.c:460:2: warning: large integer implicitly truncated to unsigned type
drivers/misc/fsa9480.c:464:2: warning: large integer implicitly truncated to unsigned type
drivers/misc/fsa9480.c: In function 'usb_switch_show':
drivers/misc/fsa9480.c:612:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c:619:2: warning: 'return' with no value, in function returning non-void
drivers/misc/fsa9480.c:626:3: warning: 'return' with no value, in function returning non-void
drivers/misc/fsa9480.c: In function 'usb_switch_store':
drivers/misc/fsa9480.c:657:2: warning: ISO C90 forbids mixed declarations and code
drivers/misc/fsa9480.c:687:1: warning: no return statement in function returning non-void
drivers/misc/fsa9480.c: In function 'disable_vbus_store':
drivers/misc/fsa9480.c:710:1: warning: no return statement in function returning non-void
drivers/misc/fsa9480.c: In function 'DefaultESNStatus_switch_store':
drivers/misc/fsa9480.c:886:1: warning: no return statement in function returning non-void
drivers/misc/fsa9480.c: At top level:
drivers/misc/fsa9480.c:1557:2: warning: initialization from incompatible pointer type
drivers/misc/fsa9480.c:264:1: warning: 'dev_attr_KiesStatus' defined but not used
drivers/misc/fsa9480.c:591:12: warning: 'get_current_mode' defined but not used
drivers/misc/fsa9480.c:888:1: warning: 'dev_attr_DefaultESNStatus' defined but not used
drivers/misc/fsa9480.c:921:1: warning: 'dev_attr_dock' defined but not used
drivers/misc/fsa9480.c: In function 'fsa9480_chip_init':
drivers/misc/fsa9480.c:461:5: warning: 'ret' may be used uninitialized in this function
in addition, there are links to what may be original sources (we need to check them if the kernel above won't work):
http://lxr.free-electrons.com/source...misc/fsa9480.c

and a patch:
https://lkml.org/lkml/2011/7/26/77
@manveru0: OK, so we were right that this won't work because it's just not enough. But it's the right direction and some additional changes still need to be made. The compiler warnings also seem to show that the used versions of fsa9480.c and fsa9480.h don't match. At least some of them.

I just had a look at the code in your given links above and analysed the code a little bit. Here are the results:

- the patch in the lkml link is already included in the latest version 3.2 of the lxr link

- BUT although this is a Samsung source code it is not meant for use with the Galaxy phones. It is just a generic linux kernel code and does NOT include the necessary "CAR_KIT" code.

- apart from an extremely different code architecture the fsa9480.c version that is provided in the I9001 sources DOES contain a lot of "CAR_KIT" references and is also much longer so this definitely seems to be the right code which we are looking for.

- the latter code can be found in kernel/drivers/misc and this is exactly the path where your compiler warnings derive from. So to my best knowledge and understanding you are already compiling the correct fsa9480.c code and there is "only" one step left: get rid of all the warnings so the code can work as intended.

- the ISO C90 warnings can generally be ignored as they just refer to programming style and standards which might be inappropriate for you anyway and definitely are for the author of the code ;)
Just one example from line 612, original code is:

Code:
mm_segment_t fs = get_fs();
Replacing that with two lines, first declaration, then program code like this should remove the warning as ISO C90 is fulfilled:

Code:
mm_segment_t fs;
fs = get_fs();
Well, the latter version is kind of beginner's code for the slow-witted and every experienced hardcore-coder would just laugh at that but the same goes for the ISO C90 standard. Well, that's of course just my opinion. And that of a huge bunch of somewhat experienced coders I know

- you replaced fsa9480.h in include/linux/i2c which is included in kernel/drivers/misc/fsa9480.c. But looking at the code I found that it's a conditional include, the code actually says:

Code:
#if defined(CONFIG_MACH_ARIESVE) || defined(CONFIG_MACH_ANCORA) || defined(CONFIG_MACH_GODART)
#include <linux/fsa9480.h>
#else
#include <linux/i2c/fsa9480.h>

#endif
So as CONFIG_MACH_ARIESVE is defined in your FeaCore_config only include/linux/fsa9480.h is actually included by fsa9480.c.

- now I compared include/linux/fsa9480.h and include/linux/i2c/fsa9480.h and except for two additional empty lines and Windows EOLs in /linux/i2c instead of Linux EOLs in /linux the files are completely identical. This leads only to one conclusion: include/linux/fsa9480.h in the I9001 sources is the wrong version but only this one should be exchanged.

You could give this another try and I think here are still some grateful testers for a second test version. I'm not sure if this is really the final solution and end of the story but I can have another look at the new warnings of the compiler output with the proposed modification - if there are still any left.

The Following User Says Thank You to skywalker01 For This Useful Post: [ Click to Expand ]