yashsingh1/xdaforums huggingface dataset:
[Captivate Android Development] rraquib:
Dumb question xcaliburinhand, can't we compare with the released captivate (2.1) source code? Or was it never released.
[Captivate Android Development] TMC_Sherpa:
The 2.2 source is very different than 2.1, a lot of files have moved/been renamed so while you can grab the missing code and put it in (A1026 comes to mind) there are a LOT of files that need to be checked. iirc it's something like 10k files unique (mostly to do moves/rename) and 13k files that are different (most of them don't deal with our phone but that's still a huge list to have to pick over).

Once you have that you need to see which changes are samsung updates to all the phones (they made some changes to clocks based on an updated internal document) and which ones are for making a captivate out of the code soup.

*shrug* it's work.

PS every time I've posted something like this xcal releases a fix for whatever I'm saying is hard so, you know, my bad for not posting sooner :)
[Captivate Android Development] rraquib:
I understand Sherpa, I am a software engineer albeit for windows mostly. My point was can we find out from 2.1 what codes makes the button work. Then we can look for that code in 2.2 source. I could be totally wrong since I have know idea how kernel code is laid out.
[Captivate Android Development] thecellx:
Well sounds great that the Master of Kernels is still working on it. I will be one of the first to test it when released. Thank you for your incredible work.
[Captivate Android Development] xcaliburinhand:
Basically Samsung decided to use the ADC value to decide what is plugged into the headphone jack. The kernel is sensing that something is plugged into the headphone jack correctly (this is why a regular pair of headphones works). However, nothing is ever sent by the ADC so the kernel can't decide if you plugged in a regular pair of headphones, a wired headset, or a line out device. The default is to assume a regular pair of headphones.

From reviewing the code, both the headset mic and headset button will work properly once the kernel knows they are there. Without anything coming from the ADC the kernel will never know you plugged in a headset.

There are numerous ADCs in the phones. ADC values are used to judge battery level, temperature, where you touched the screen, the proximity sensor, plus a bunch of them within the sound chips. Somewhere the routing is off on the ADC that is used to judge what is in the headphone jack. This could be part of the sound circuit or the power circuit (there is a reference to the headphone ADC in the battery code).

Samsung reworked a lot of the code between Eclair and Froyo. Some of the reworking made the kernel a lot nicer to work with (combining stuff spread over multiple directory structures), but it also means comparing Eclair and Froyo is a real chore.
[Captivate Android Development] rraquib:
Thanks for shedding some light in to it xcaliburinhand. Even though I know nothing about kernel programming, I think now I am curious to see what the code looks like lol. Thanks mate for your efforts.
[Captivate Android Development] Sagui:
Hi xcaliburinhand, big fan of your work.

I have been holding off on using your kernel full time only because of the headset issues. From reading your posts I have one question that could be completely stupid: Could you force the ADC to report a headset with mic to the kernel, rather than making it decide for itself? As in set the variable for that value to the number corresponding to the headset manually.

I don't think functionality would be affected for those using headphones or line in devices if the kernel reports headsets, but it would provide full functionality for headset users.

I am no kernel hacker, nor do I know the intricacies of the kernel, so I apologize if this makes no sense.
[Captivate Android Development] bedwa:
I've been taking a look at it and from what I see, you really can't. the ADC for the sec_jack (samsung jack detector) seems to detect it on the fly when you put the headset into it. So, it's touch and go finding a solution.

Note, I've been looking at it and doing alittle tinkering.... no solution as of yet.
[Captivate Android Development] aminj:
How to install!

Hi Guys,

Can somebody help me to flash chis kernel? I tried different things, including the following:

1-flashed Tayutama

2-using CWR I installed I9000-reoriented-v2.1.3

3-I wanted to use CWR to install jpm_modem as mentioned in http://xdaforums.com/showpost.php?p=8706939&postcount=225 but I couldnt! The proess does not start at all... any suggestions?

Thanks
[Captivate Android Development] glitterballs:
I'm not entirely sure what you're trying to do. If you want to flash a kernel, it's done in one step. In step 1 you're trying to flash a ROM, in step 2 you're trying to flash a kernel, in step 3 you're trying to flash a modem. The order you probably want to do this in is ROM --> kernel (if necessary, likely not as the newer ROMs all have updated kernels included) --> modem (if necessary).
[Captivate Android Development] boomerod:
We know this is driving you nuts X. I appreciate your work and hope you get this figured out. For me, it's a non-issue cause I use Bluetooth.
[Captivate Android Development] Sagui:
I may have found a workaround for this headset issue, but I haven't tried it yet. Apparently there is an app called "toggleheadset" that you can install and force the system into headset and headphone mode (or nothing connected, obviously).

I don't have the kernel flashed right now, if someone with the reoriented kernel could try this app and see if you can use the wired headset for phone calls, that would be great!
[Captivate Android Development] aminj:
Thanks for the answer. but, see I dont understand, I was using another ROM (GeoMod) and then I flashed this kernel and some crazy things happened (for example I lost data network connection). That is why I switched to This other I9000 rom. the kernel works fine with this ROM, but why cant I update the modem? should'n I update all of them from recovery and install .zip?
[Captivate Android Development] xcaliburinhand:
Even if you force headset mode, the mic won't work. I forced the headset on at one point and the mic wouldn't pic anything up. Almost seems like captivate routes the mic in differently but I haven't found the proof yet.

As a side note, in addition to my own debugging I dropped a question to the samsung open source resource center. Hopefully a samsung dev will take pity on me and point me in a good direction.

Really wish I had a wiring diagram of these phones.
[Captivate Android Development] xcaliburinhand:
The modem would need to be packed in an update.zip that CWM can handle. In addition, the update.zip has to be compatible with the original PIT used (usually does a direct overwrite of the modem partition so modem partition and modem size have to be the same).

Would recommend pulling the modem.bin out of whatever update package you are using and flashing with the phone field in odin.
[Captivate Android Development] rraquib:
Keeping fingers crossed xcaliburinhand. An observation, the bln (nelder I presume) app says that the kernel is using older code or something like that. Are you aware of this?
[Captivate Android Development] aminj:
Sorry for these questions, I am a newbie here! But odin needs a tar file, however the extracted file is a bin file! I make a tar file from it but Odin didnt accept it!
[Captivate Android Development] Killemalll:
Place the modem.bin file in the "PHONE" slot in ODIN and flash when in Download mode. You don't need the tar or PIT files. Just the .bin file
[Captivate Android Development] johan8:
I have applied reoriented 2.1.3,

it should have voodoo lagfix pre6 and working,

but my Quadrant score is just 16xx in my Captivate.

It should be 2200~2500, but mine to too low.

what's wrong ?
[Captivate Android Development] ademejia:
will this work with cm 6.1 1120a
[Captivate Android Development] wmwilker:
No 10 char
[Captivate Android Development] Pirateghost:
whats wrong is you are relying on fake numbers to tell you if your phone is faster than normal.
[Captivate Android Development] johan8:
I'm not sure those score are true or not.

I just played i897 for couple minutes, then flashed i9000 and reoriented in the very beginning, so I don't know how bad was it, and I'm not sure voodoo lagfix is better than other.

In the sense that ext2 is faster is benchmark, but not stable,

and most of them are OCed and using oneclicklagfix, that doesn't need update kernel.

If you have tried other lagfix, could you give me some real experience.

I have read those lagfix posts, voodoo will format whole 2GB into ext4 ? or just the data, the other still in RFS ?

And can I use other reoriented in this forum ?
[Captivate Android Development] Whipon:
Well, maybe you're referring to this:

I9000 Pinout.

I897 Pinout.

As you can see the pinout is diferent.

I personally had to hack a I9000 headset with a soldering iron to be able to use it on my Captivate. All four pins (Right Audio, Left Audio, Mic and Ground) are in different order in both phones.

I really wish this info can help you to enable the wired headset mic and button support. I use the headset a lot and its the only thing keeping me from installing this rom and the wonderfull I9000 roms out there.

EDIT: Didn't noticed it, but there's a new update to the I9000 pinout since last time I checked. It seems only pins changed in both phones are MIC and GROUND.

I'll have to hack my headset again ^^.
[Captivate Android Development] jbruckner:
I'd pay $25 for a working headset. :-)
[Captivate Android Development] stevesteveLA:
I'd match that...
[Captivate Android Development] bedwa:
Thanks for the helpful info.... so you're saying if soldered correctly, its noticed just fine..... hmm.....
[Captivate Android Development] Whipon:
I can assure the pinout info, because I rewired a I9000 headset to use it on the Captivate. In theory, if you use a I9000 headset with the reoriented kernel, mic and button should work.
[Captivate Android Development] jbruckner:
Has anyone confirmed this?

$50 on the table for a working Captivate headset! :-)
[Captivate Android Development] jgaviota:
what is a safe way to flash?

Hi all,

On Thursday I'm getting my third captivate after managing to brick two

The first one while flashing back to stock with odin without working 3 button download mode.

The second one experimenting with odin and this kernel.

I hope not to brick the third one, but it's in my nature to tinker.

So, what I'd like is i9000 JPO with this kernel and JK3 modem, preferably clockwork flashable.

Is there a guide to start cooking this? Or how do you suggest I go about it in a safe(ish) way?

THANKS!
[Captivate Android Development] Jay120171:
Well I am not sure how you bricked them since you can get out of most situations with tools all over this board. I know this is a little ot for this thread but here is what I do.

I personally use Tayutama's 1.0.3 lite ROM, this kernal and the JK3 modem. It's just personal preference but I like the theme from Tay's ROM. I have good stability, call quality and battery life with this combo. I also use the standard ODIN to revert if I get any issues while testing other ROM's around here.

Here is ODIN (not 1 click) along with a stock 2.1 ROM:

http://xdaforums.com/showthread.php?t=818439&highlight=odin+button

Here is Tayutama's ROM in the i9000 forum (scroll down for cappy version):

http://xdaforums.com/showthread.php?t=808763

Here is the JK3 modem:

http://xdaforums.com/showthread.php?t=845706

I use ODIN and the modem.bin placed in the PHONE slot to flash the phone in download mode since it is the safest. There is CWM flashable one in that thread but didn't work for me at the time, it may be fixed now.

Yea it is three steps and this is assuming you already have the CWM update.zip, ROM and kernal on your SD card.
[Captivate Android Development] han.azuki:
could u provide updated kernel without voodoo?
[Captivate Android Development] rraquib:
Just do not enable voodoo
[Captivate Android Development] bedwa:
Reason I asked is I've been trying to tinker on the code in the sec_jack.c file. If that's the issue, I know where I need to be looking at and what needs to be looked into. I need to figure out where the phone is looking for the info and feed the kernel the proper info. This should help out... I'll be back after I look into it. Though may not be able to look into it till Fri evening or Sat evening.
[Captivate Android Development] han.azuki:
well whenever i put in odin it instantly doesn't even boot, does some weird robot voice thing over and over
[Captivate Android Development] Sagui:
This is exciting! For the first time a non-developer like me is feeling like the solution might be within reach...I can't wait for this to be implemented.
[Captivate Android Development] Whipon:
Great, thank you!

Thats great Bedwa!.

Thanks a lot.
[Captivate Android Development] poetgeek:
Go bedwa, Go!

9GY994738T4305549

a modest donation of seed (beer) money for that Friday/Saturday session!

Come-on headset!
[Captivate Android Development] wvumaniac79:
Is this still available? When I try to download it says the service is unavailable

Sent from my SAMSUNG-SGH-I897
[Captivate Android Development] xcaliburinhand:
Hmm.. it should be, looks like my server is being tempermental. :mad:

Back up and running, rogue file in my apache conf directory.
[Captivate Android Development] Whipon:
Hi...

Hi X!.

Any news about the wired headset mic and button?.
[Captivate Android Development] thecellx:
Same question here.
[Captivate Android Development] xcaliburinhand:
Nothing yet. Samsung development told me I am running in an unsupported way and to wait for the I897 source. Would have been nice if they answered my simple question anyway, but oh well.

Started to look at tear down pictures to see if I could find any more clues. Headphone jack is connected by a 16 pin ribbon cable, which I find odd since it has only 6 solder points. From the looks of it both the captivate and I9000 headphone jack connect to relatively the same location on the main board.

Besides pin 3 and 4 of the headset being reversed between the captivate and I9000, the jack switch has slightly different logic between the two. Long story short, I am starting to get a good understanding of the jack logic but am still a few pieces away from having a solution.

My luck, I will figure it out a day before Samsung releases the I897 source code.
[Captivate Android Development] Whipon:
I see...

Thanks for the update ^^.

So, if we have to wait until the source is released, we won't see it until they oficially release Froyo for the Captivate, and it seems there is no date for that T_T.
[Captivate Android Development] daraj:
Ok well then I installed JPM(I9000 FROYO) with this Kernel and I keep getting those FC vibrate almost constatntly. I tried another I9000 froyo with this kernel and the same FC almost constantly with vibrate FC. Unusable. The only usable i9000 rom on the captivate is Shep's roms and I believe he had to edit the rom to make it usable on our captivate.

It would be nice if this kernel will allow us to use any i9000 freely with no FC.
[Captivate Android Development] rajendra82:
Not just that. This kerenel will eventually allow things like voodoo lagfix and backlight notification on a Captivate running Froyo, since the source code for the JPM kernel is available. We can't get these things on Captivate otherwise until the Captivate Froyo source code is released.
[Captivate Android Development] netnerd:
how do i install this?

just replace the kernel (zImage) and modem.bin in cong2.2 beta6 and flash?
[Captivate Android Development] daraj:
That would be nice to incorporate Voodoo in this kernel, but not sure if you read my above post that I cant install any I9000 ROM with this kernel and work properly. Not sure if Im doing anything wrong in this case.
[Captivate Android Development] techmik67:
If I am understanding your previous posts, you are NOT trying to install roms, you are trying to FLASH FIRMWARES. Try installing an actual rom for froyo i9000, of the 2 (i think) that have been put out since source was released. Flash the rom, then odin in this kernel and hsupa modem if using captivate modem (jg8 or jp6 work). You will have orientation fixed, hsupa and other usability issues resolved.

At the moment, though, the keys are still messed up. Home and back are the same no matter what you map them to and you may have to remap reversed volumes. Power works to make choice in recovery, but recovery is 3e and still doesnt work with clockwork.
[Captivate Android Development] daraj:
Not sure what is the difference but here is what I flashed: I flashed these:

1. I9000XWJP6 - Froyo 2.2

2. JPM

3. JP6

All with this kernel for froyo and im getting the FC almost constantly.
[Captivate Android Development] Pirateghost:
Try sheps rom. It doesn't fc for me like the other combos did

X, did you update the beta this morning?

Sent from my chopped and screwed captivate/i9000 remix
[Captivate Android Development] shaolin95:
OK I am stupid but can someone tell me if it is possible to flash something from this rom to my current Beta 6 Cognition 2.2 so that I can get HSUPA ?
[Captivate Android Development] daraj:
Sheps ROMS never FC because he had to change framework and some other files to make it work. But the point of using this Kernel is to use

any

I9000 ROM with the captivate with no issues. I know its still beta hopefully it will work out so we can install any froyo i9000 rom.
[Captivate Android Development] xcaliburinhand:
I have added 2e recovery to the "Todo list". Good catch with the home acting as back, shouldn't be too hard to fix.

Tonight I plan on switching over to a I9000 Froyo ROM so I can do some proper testing.
[Captivate Android Development] cropythy:
Since it doesn't look like anyone else in this thread has tried yet, you could try using odin to flash this kernel and the JP6 modem. If it works with cog should be that simple.
[Captivate Android Development] netnerd:
how do i use this? i thought odin only accept tar file
[Captivate Android Development] LinuxNewb:
Let me know when you'll need someone to test your different build. Work has been nothing but training at my desk and I'm bored with my 2.1 setup.

P.S Xcaliburinhand - Do you have an IRC channel or are you in DG's room? I'm in there harassing Zilchy-Poo and Reefermatness quite a bit :)
[Captivate Android Development] shaolin95:
I would try, just let me know what I need to flash..modem.bin or something?
[Captivate Android Development] Pirateghost:
right.

and WITHIN the zip file i attached is a .tar file........:rolleyes:
[Captivate Android Development] rraquib:
Actually

Odin can take modem.bin with out any wrapper. I swap out modem.bin for hsupa and voice quality :D
[Captivate Android Development] designgears:
well, as much as I like HSUPA, losing 80% battery overnight while I am sleeping is not ok... reverting
[Captivate Android Development] Pirateghost:
wow. i only lost 20% on mine
[Captivate Android Development] boomerod:
Yep, getting that issue here too...I'm sure X will take care of that this evening.
[Captivate Android Development] shaolin95:
So you were able to use the HSUPA with Cog beta 6? What file did you use and was it from the rom on this thread? I want to try it! :D
[Captivate Android Development] bedwa:
I've passed another pack of files to try over to Xcal, so here's hoping that it works.... If not, back to the grindstone. :)

And, Thanks poetgeek, you happen to be my first donation. Greatly appreciated and I certainly am going to continue to help Xcal as best possible on this one. :)
[Captivate Android Development] Sagui:
SWEET! Here is to hoping with fingers crossed.
[Captivate Android Development] ryude:
Looking forward to new updates on this kernel as I like it much better than the oc ones.
[Captivate Android Development] rraquib:
For some reason if i restore a previously backed up image (was using setiron), to this one BLN stops working. Any ideas why? Basically I flashed back to JF6, cwm flashed this kernel and JK3 modem then restored my back up.
[Captivate Android Development] xcaliburinhand:
For everyone who has been waiting patiently, the wait is over, wired headset works.

All the devs that are using my kernel as a base, I would recommend incorporating the latest change. Change is visible on my git.

-x
[Captivate Android Development] Pirateghost:
oh jesus....flood gates are opening
[Captivate Android Development] thecellx:
THANKSSSS!!!!

Youre a monster !!!!!!!. I will download this right now. THANK YOU.
[Captivate Android Development] jhnstn00:
Nice work. Gonna test it out. Actually I don't even use a headset but I'm looking for stability, gonna put it in di11igaf's ROM v2.5.
[Captivate Android Development] thecellx:
WORKED

I just did that... and wired headset is working perfect. This deserves a lot of beers....
[Captivate Android Development] amtrakcn:
It's awesome that the wired headphone issue is resolved.
[Captivate Android Development] boomerod:
I rarely use a wired headset but I understand how hard you worked to fix this. You're a talented and determined dev X. I'll be donating a little something for your efforts.
[Captivate Android Development] HeRmAyNe-MuNsTeR:
In order to install this I would have to go into recovery mode and install the zip as if I were installing a new keyboard or font package correct? Oh and by the way awesome job on the fix and everyone that helped. It's awesome having a community of developers as yourselves putting brains together to get something solved =).
[Captivate Android Development] pillz424:
I did a clean flash of di11i's 2.5 and then this new kernel, worked fine but when I booted into recovery again it stuck at 3e with no working select key. What steps did you use? Should I Odin instead of clockwork?
[Captivate Android Development] designgears:
Nicely done on the headset fix!

Big thank you coming your way ;)

--edit

I made some progress on it last night but your solution is much better and makes the kernel work on i9k and i897.
[Captivate Android Development] koreancanuck:
Wow, you probably have worked so hard into making this work! Thank you!
[Captivate Android Development] pillz424:
Guess I'll wait for the baked in version. I've been missing the headset for a long time, thank you thank you thank you for this!
[Captivate Android Development] HeRmAyNe-MuNsTeR:
I guess you're going to have to add the baked in version on your ROMs, huh DG? Lol.
[Captivate Android Development] designgears:
Yup

I just made a diff patch from source and now merging it with my current patch, got a few conflicts, not a big deal.
[Captivate Android Development] HeRmAyNe-MuNsTeR:
Awesome!!!! I'll be waiting for it. Thanks for the headset fix xcalibur (of course the peeps that helped also) and DG you rock dude !!:D
[Captivate Android Development] designgears:
everyone should send him a big thank you as well! I have been hating not being able to take a call with my headset.

Just sent my kernel out for testing :)

looking good so far.

Thanks again xcalibur
[Captivate Android Development] Coldheat1906:
DG

Are you just incorporating the headset fix or adding all of the changes?
[Captivate Android Development] HeRmAyNe-MuNsTeR:
DG is going to incorporate it in his next build I think. In his CL he says that's an upcoming fix.:D
[Captivate Android Development] HeRmAyNe-MuNsTeR:
xcalibur you're the man!! Im happy that I can use my headset again =).
[Captivate Android Development] MS3Zoom24:
does this cancel out setirons kernel at all?
[Captivate Android Development] HeRmAyNe-MuNsTeR:
Whoooo!! Can't wait....but I gotta lol
[Captivate Android Development] Stephenv1971:
Handset mic is gone, 3e recovery is back.
[Captivate Android Development] designgears:
confirmed, you lose mic for calls on handset. Headset works fine.

Not to much useful in the logs..
[Captivate Android Development] Whipon:
:(

So the only way to make a call is to use the headset?.

I tought it was perfect at last and another issue appears T__T.