yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] NCommander:
If any ROM developer is interested in helping me build a proper redistributable image with the camera driver tweaks, I'd be glad to release an AOSP tech demo with working camera while I continue to debug the video camera issues. Please drop me a PM if interested and please already have a 2.0 based ROM available thats posted to xda-developers.
[G1 Android Development] JoelOFH:
You are a saint. I am incredibly excited for this to finally happen. :D
[G1 Android Development] Daneshm90:
Hey cud u luk at gpu drivers as well ? evaluate the difficulty of porting it. If 2 hard i dont mind waiting for the official drivers :(

Thanks
[G1 Android Development] sanpei:
i did some research in msm_camera part in msm-kernel 2.6.29, for making camera working with eclair on a special version (HERO Radio and SPL) of SAPP 32A.

my progress is behind you, so I think if I can get some info from you and we can exchange other info when i have caught up with you.
[G1 Android Development] daniel0615:
Do you have confirmed the Model of camera sensor?

Do you have confirmed the Model of camera sensor?

It seems that the sensor should be ST VB6871, but not sure.

I've tried to got the data sheet, but failed, just got a brief data sheet.
[G1 Android Development] sanpei:
the model of camera is not so important, since msm_camera is used after 2.6.29. the real sensor driver will register itself to msm_camera.

the requests and responses between kernel and userland and conventions the most we need to know about the kernel side are just here.

the big problems are we don't have the codes of userland library, and the parts I talk above in the kernel source have a lot of mistakes. they are not same as the code Google/HTC used on shipped phone.
[G1 Android Development] justanothercrowd:
Shoot me an email justanothercrowd @ Gmail I'm not on xda often enough to PM

I already have an Eclair ROM that is snappy and stable for the G1/MT3G posted in the forum. Besides the Camera here are only some minor bugs.
[G1 Android Development] Brajin:
If you two guys could hook up an get the camera out on XROM that would be great. Its good to here when devs team up to get things done.

Tmobile G1 Black

Danger SPL

Super D 1.51

Class 6 sd EXT3 96mb Swap
[G1 Android Development] domex2k:
Damm and here i thought that with the release of the Android SDK 2.1, the Camera Drivers will have been provided as-well.:confused:
[G1 Android Development] bluedragon1982:
same to say from me :)

Thanks for you two and the rest of your teams for this great work - can wait to have an near to full working eclair rom befor we will have an oficial ROM.
[G1 Android Development] Shatterv2:
Thats sdk not source.
[G1 Android Development] domex2k:
Ok Thanks for the info,the way everyone was announcing it on twitter i assumed it was what we where all waiting for.:eek:
[G1 Android Development] Genesis206:
Random question, may have been answered somwhere else, but....

With the alpha release of this camera, would a market camera like Snap Photo have regular functionality or is it only as good as the base camera in the ROM?
[G1 Android Development] Shatterv2:
He is making a driver so im guessing the app would work....bad as it is.
[G1 Android Development] billquinn1:
Oooo....snap!
[G1 Android Development] miamicanes:
Is the main problem that we don't know how to bitbang the raw camera hardware to make it charge the sensor, expose it, and sample the raw data from its sensor array? Or is the problem that people here HAVE done that already to prove it's possible, but it's viewed as a dead end because nothing that depended on the 2.x Android multimedia API (including thirdparty camera apps) would be able to make use of it?

CAN Linux kernel code directly bitbang raw hardware? Or is Linux kernel architecture kind of like Windows, where not even hardware drivers are really allowed to touch the bare metal if the kernel can help it?
[G1 Android Development] digitallysick:
Could we sue htc for the source? since its required for android builds? After all we purchased the hardware, how fair is it for them to prevent us from using the hardware we bought?

It would be like buying a computer, and then no one handing over the ability to make drivers
[G1 Android Development] :
you could always make your own code and drivers, open source projects like linux always do this. but HTC is in no way obligated to do it for you.
[G1 Android Development] miamicanes:
Honestly, everyone needs to forget about lawsuits. Even if there were egregious and blatant wrongdoing on HTC's part, and someone with standing to sue were to do it... by the time the actual court date arrived sometime in late 2010 or 2011, it would be moot. If an attorney were hired today and did everything in his power to expedite things, it would be about a month before the court even got around to booking them on a judge's calendar. Unless you're talking about something where lives and public safety are literally at risk of imminent harm, lawsuits drag on for *months*. Forget CourtTV. Real lawsuits are more like playing chess on the Atari 2600: occasional moments of activity, with long delays in between.

The truth is, assuming HTC plans to release the source eventually, here's what they'd do if you really tried to sue them in equity (equity is when you want to ask a court to force someone to actually DO something, as opposed to asking a court to make someone pay you money to compensate you for some harm they caused), and found some legal theory that might support it:

1. They'd get their lowest-paid attorney to wait until the day before the deadline, then fedex a response denying everything and asking for a summary judgment against you dismissing the claim with prejudice (translation: you lose, and you can't sue them for it again). He'd also counterclaim with a motion for dismissal challenging both jurisdiction (the court's authority to hear the case) and venue (the appropriateness of the court chosen to thear the case).

2. The judge would probably accept the response, deny the motion, and forward everything to your attorney for response.

3. Your attorney denies the venue and jurisdiction claims, and makes another motion in response.

4. Stir, rinse, and repeat back and forth for a few months, until finally your attorney makes a motion for trial that doesn't get deflected by HTC's attorney or the judge. Your attorney gets a letter telling you to request a pretrial conference. Your legal bill so far: $3,000-6,000... if you're lucky.

Weeks pass.

5. The attorneys meet with the judge for the pretrial conference. By this point, you'll have spent AT LEAST $10,000 on a lawyer and court costs. If you're lucky, the judge will decide the case has merit, and allow a trial to decide the specific points the two attorneys can't agree about.

Weeks and weeks pass. The Android 2.5 or 3.x SDK gets released by Google. Finally, as the trial date nears (~5-14 months from now), HTC officially releases the source to 1.5, and files a motion with the court seeking dismissal since your case is now moot.

Cynical, but more or less an accurate high-level summary of how lawsuits generally work in the US.
[G1 Android Development] ripgut:
Magic and Dream may have similar specs but the cameras are different, i doubt the Roger's magic drivers will work for the dream, as both differ in mega pixels, but i could be wrong
[G1 Android Development] big_d093:
Y'all tripping now talking bout sueing n stuff LOL it ain't that deep if ppl are so needed for a camera have a donut build on switchrom n switch back n forth if we get the drivers then we can all jump for joy but if not its not the end of the world
[G1 Android Development] bakgwailo:
not to mention the camera drivers etc are proprietary software and HTC has absolutely no legal or other obligation to release their code. Its like trying to sue NVIDIA for not open sourcing their drivers or specs.
[G1 Android Development] jmhalder:
bakgwailo? from eccs.hybridka.com? small world! and although you're right, they are under no obligation to release drivers... YET, as far as I know, they DO have to release source for any addition to the pre-compiled linux kernel, as far as I know they have done this, although they are under no obligation to generate source for 2.x since they obviously havent released a dream with 2.x on it...

http://developer.htc.com/

see, kernel source, what good does it do us? nothing, since that wont work for 2.x.
[G1 Android Development] bakgwailo:
hahahaha oh ****, yeh man from eccs! small word it is !

But, if they did their kernel drivers correctly (ala NVIDIA style), then all they all they have to release is the source code to interface between the kernel -> the driver module. For instance, the NVIDIA driver is a closed source seperate from the kernel tree, and they provide the source to the interface between the two, thus no infringement on the GPL and they can keep their closed source.

The real goal would be replicating/reverse engineering the camera driver, gpu driver, etc into a completely open source project. This way with new releases we don't need HTC. There is a project somewhere that does this for the radio interface and a few other things I think (its called like the Open Android Project), which has the goal of reverse engineering all the proprietary bits in android as a whole. Not sure if it is still alive though :)
[G1 Android Development] miamicanes:
... hence, my point that at this point, since what most of us care about *right this minute* is getting the camera to work with 2.1, it might be more productive to start pestering HTC daily for the compiled .so files and kernel module for the 2.1 camera driver they've almost certainly finished by now... or at least will be developing at some point between now and the day 2.1 officially gets released for our phones, and might as well get elevated a bit on their priority list to get us off their backs. Hell, they could even call it a private developers-only beta test if it made their lawyers happy.

Would it be ideal? Of course not. Would it be good enough to put (more or less) fully-functional builds of 2.1 on our phones within a week or two of the camera-driver release? Almost certainly. Who knows, if they made us develop our own camera-app front end, we'd probably end up with one that's better than their official one(*)

Actually, I might even go a step further, and suggest that *****ing about HTC's non-cooperation regarding the 2.1 camera drivers (either as usable kernel modules, or at least the source to the 1.5 ones) would be more effective if it were done loudly and publicly, instead of via daily email to HTC itself. Ten thousand angry emails in your inbox are filterable spam. On the other hand, just a few hundred daily angry posts about HTC and Google's betrayal of Android's alleged "openness" on Slashdot, Gizmodo, Twitter, and everywhere else will send their public relations department into code red panic. Instead of accusing them of violating the GPL, yell angrily that we're needlessly suffering with 1.5, when we could have 2.1 metaphorically "tomorrow" if they'd just be nice and throw us a camera cookie or two. :cool:

(*)Someone, please go flog the idiot at HTC who came up with the brilliant idea of using the trackball as the shutter release... THEN decided to ALSO make it jump into album mode if you happen to move it too much before/while pressing it...
[G1 Android Development] ceas909:
from what i seen from eugene373 past tweets... there are test drivers already made... he had tweeted awhile back that a source released some test drivers to him fo his esspresso rom but was not given permissions to release his rom with the need drivers for camera... i had asked him if he knew if those test drivers where any indication that a official 2.xx will be coming to g1/mt3g and he said he had no idea... lets all hope that there are... and that 2.xx will be coming in the near future!
[G1 Android Development] NCommander:
You need to complain to Qualcomm, they're the ones who made the SoC and the camera drivers, not HTC.

Anyway, the source for the new camera driver is up at http://gitorious.org/eclair-camera-drivers and cyanogen has already tested it on his G1.
[G1 Android Development] entex:
Someone should just put the damn drivers on a rom. This is getting so ****ing ridiculous, I can't find one good damn ROM that has speed, facebook contact integration, AND a camera.

Thanks again for slapping some DEV's in the face, NCommander. You did a great job with these drivers. Props.
[G1 Android Development] jmhecker:
Give the devs some time, entex. The source was posted 22 minutes before your post..chances are it will take at least 23 minutes for them to accomplish it.

Patience young grasshopper, patience.
[G1 Android Development] entex:
Eh I'm just annoyed. My bad. Not at the Devs, but more at people who are telling the Dev's that they can't release said drivers. Like, whats the point of having a ROM with no camera drivers? -_-
[G1 Android Development] JAguirre1231:
They don't want to lose their jobs
[G1 Android Development] nyctrini3:
Wow this is great news! good looking man can't wait to see it incorporated. Into the roms it's gonna ne hard to choose there is a lot of good ones out there
[G1 Android Development] thenameismax:
wow man keep up the good work!!!!
[G1 Android Development] eklipz3:
omg camera working, i'm getting ready to jump ship. i said in my earlier comment that i could feel it. good job.:D
[G1 Android Development] nocute8072:
camera works.

does it mean that G1 only is short of graphic driver?

hope the graphic driver will be released by vendor.
[G1 Android Development] digitallysick:
I don't see whats to worry about, considering the driver is used to power the devices that we bought and paid for , and android was supposed to be an "open" platform.

But maybe something can be done about the driver, its really nuts that we can't run eclair 100% working on g1/mytouch
[G1 Android Development] JoelOFH:
ANDROID is open-source. You're speaking of HTC HARDWARE drivers (which is not related to Android).

Let's say you built a computer from scratch and put Linux on it. Now, would you call Nvidia and say "give me your drivers, because I'm using Linux and it's open-source."

See your error? Stop with this. NCommander is helping us make this work. He's a GREAT asset to us.
[G1 Android Development] anthonws:
Great work!

A big thank you :)

P.S. For people wanting Eclair with camera go to cyanogen github

-> http://github.com/cyanogen/android_hardware_msm7k

Compile Eclair from his source and flash into your phone
[G1 Android Development] Che123:
is there allready a rom using this cam driver?
[G1 Android Development] Ace42:
Do you mind taking a spin at HW accel to Ncommander?
[G1 Android Development] QTeknology:
Well Done NCommander !

RESPECT !!!
[G1 Android Development] kingskidd268:
Now that their are drivers, its up to the Dev to put it into their roms.
[G1 Android Development] bmj1086:
You need a donate button :)
[G1 Android Development] Dyonas:
NCommander to the rescue! :) This is quite awesome and I only wish I had the time, patience and knowledge to do similar.
[G1 Android Development] sarf1974@yahoo.co.uk:
Great work. It will help the community.
[G1 Android Development] entex:
I feel like the Dev's are just ignoring this topic on purpose.
[G1 Android Development] jmhecker:
Seriously entex, be patient. It takes time. If you are that impatient, I recommend you read up on cooking and develop your own.

The devs work in their free time. Today is Wednesday...I am willing to bet that a lot of them are at work.

There is a 'non-optimized' Eclair release in the forums, which includes camera support. Go use that one if you are in that dire need.

Again, be patient. No need to clutter the thread(s).
[G1 Android Development] pershoot:
good job ncommander. this is what it's all about:)
[G1 Android Development] eugene373:
Huge Thanks For Posting Source ;)
[G1 Android Development] fastludeh22:
Thanks a ton for doing this, I know it took a lot of time to fig it out.

Now for a question. Since u fig these out and posted the source in the true open source fashion, does this mean in the future when a new update comes out that breaks the cam again, that the new drivers can be made based off of these?

Again great job, thanks!
[G1 Android Development] Joe92T:
Great job, i dont see why everyones complaining about the camera drivers. Seriously when was the last time you used the camera on your phone? for me it was probobly like 3 months ago, having a good ROM is way more important then having a working camera that youd probobly realistically use twice a year for something stupid not even anything important.
[G1 Android Development] chucky80:
Thanks a lot! You have saved the android rom 2.XX. Many of us use our phone camera's including market camera apps so thank you.
[G1 Android Development] domex2k:
THANK You !!Oh Happy Days!!!:D:D:D
[G1 Android Development] TemporalShadows:
I just wanted to add my thanks to this thread. I use my camera often and have been waiting for this so I could run Eclair.

Thanks a million!
[G1 Android Development] domex2k:
Eclair_2.1-v1.5 G1/MT3G 32B Camera Working!!!

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

32B G1 / MT3G] Eclair v2.4 w/ Camera 1/13/10

http://xdaforums.com/showthread.php?t=589344
[G1 Android Development] rsfaze:
very good job ncommander, people that take their time to do backwards engineering of a driver is who I think really should have a donate here link up.

thanks for all of your work, now the dev's can make their roms and I'm sure try to take credit or not give full credit to the people that MAKE stuff work and not just put stuff together like it's a puzzle :)
[G1 Android Development] toastcfh:
thanx for showing ur work. im gonna check it out now and see if i can use it on the hero. alot of devs have been waiting for this. including the winmo to android porters. itll help alot of people out thats for sure. but yeah just wanted to say thanx:D
[G1 Android Development] sanpei:
what OP had posted is a implementation of user-space interface(in my mind, we shouldn't call it a driver)

the leaked kernel-2.6.29-hero may use a different driver (which is in kernel), the communication between driver and user-space lib has some little different from kernel-2.6.29-donut (and cyanogen's kernel, which cannot use on hero and sapp with hero's radio).

you may try different liboemcamera/libqcamera version to find out a best combination with the real driver and this implementation.

to OP:

thank you for your work, with your code, i can tweak msm_camera (for my destination) more easily now :).
[G1 Android Development] JoelOFH:
I'll just add another thank you. You have done a lot for our community with this driver. Good work, sir. You at a A+ member in my book!
[G1 Android Development] jubeh:
I have a question, might be silly but I'm still not very experienced with repo and git.

I already have the AOSP source, so, if I try to repo init and sync the project page, it'll try to download all of the source again, but I just need the changes you made to /hardware/msm7k and /vendor/htc/*.

I tried git clone but I get "warning: remote HEAD refers to nonexistent ref, unable to checkout."

I've been able to clone that way from github, and I thought gitourious was the same, maybe there's something missing.

Anyway, is there some place (a git web interface) where I can look at the sources without having to download. Or is there a way I can just download that specific project without getting the whole source (I also tried repo on the project itself but it tried to donwload everything, maybe I'm doing it wrong).
[G1 Android Development] jubeh:
nevermind, i got it, I was syncing from platform_hardware_msm7k/manifest.git instead of platform_hardware_msm7k.git
[G1 Android Development] ubernicholi:
i think Ncommander needs to get a hols of this guy, he might be able to get video working, lol.
[G1 Android Development] lbcoder:
That is not quite the achievement that it is being made out to be.

1) Despite having been started by one developer, there is more than one developer working on the project -- there are resources being devoted to it from just about every major linux distro in existance.

2) 235 is a very misleading number when you consider the fact that they are all more-or-less the exact same thing with a different plastic case holding it all together.
[G1 Android Development] polyrhythmic:
Thank you NCommander and team for your excellent work :) I am reading through your code and trying to apply the updates for our Kaiser driver. Unfortunately when we take photos with our driver our photos look like this:

Here is that same photo in same lighting taken in Windows Mobile:

Have you implemented noise reduction in your camera driver? Or does your hardware take care of it automatically? Perhaps you can provide some insight to our problem.
[G1 Android Development] JoelOFH:
Well, shoot. Tell him to stop working on it, since he isn't doing anything special. I don't care if a developer has made one driver or 1,000,000 drivers, he's doing something. If you had that one webcam, you'd be quite pleased with him, I'm sure.

What's the point of your post? You saw him JOKING about this man and thought to yourself, "This man is a FRAUD! I must expose him!"?

We don't need you, nor your attitude, on this website.
[G1 Android Development] keatliang2005:
thanks , this is really helping the community out..... let's G1's have tasty yummy eclair with camera !! LOL:p
[G1 Android Development] andonnguyen:
EDIT: I posted in the wrong forum :)
[G1 Android Development] vettejock99:
NCommander,

I just wanted to say thanks for this. It is great work, and I would really like for you to post a donation link so I can drop a little something in the tip jar for your efforts.

Any chance you are going to try to get the video working or even cooler (to me, anyway) to maybe tie off with shafty23 to get BT working for us on Hero/Espresso?

Regardless, thanks again!

vj99
[G1 Android Development] lbcoder:
Drop dead.

It was being blown out of proportion and presented as something it was NOT. YOU have NO IDEA what goes into software development, so how about you BACK OFF of something that you HAVE NO IDEA ABOUT.
[G1 Android Development] spocky12:
Thanks NCommander for your great work.

As you asked for bug report, here's my problem. I'm developping a realtime camera deformation app (using the preview callback). I used to work on 1.6 roms, but now that your driver is released, I decided to try android 2.01. Unfortunately, I experienced a big drop in framerate (from 16fps on latest android 1.6 cyanogen rom to 3 fps on latest jac's 2.01 xRom) (of course, without changing anything in my source code).

Could it be related to your driver or is android 2.01/jac's rom the culprit ?
[G1 Android Development] jubeh:
Gotta love this cowboy
[G1 Android Development] NCommander:
Might be an issue with video codecs or OpenGL which is causing slower screen rendering times.

No donation button as of yet, but maybe in the future ...

@polyrhythmic - in the code I rewrote, there was no noise cancelation issues. That looks like that might be an issue with the JPEG encoding or the raw YUV data from the camera though; the pattern looks kinda weird. Out of curosity, do you have working video recording in your ROMs?
[G1 Android Development] bcrook:
I may be wrong but I really do think the 32A camera drivers will work. When we do a 32A port of the cyanogenmod ROM we only need to swap the kernel for a 32A one and the corresponding wlan.ko. Our camera works fine with a 32B ROM...switching the kernel is enough.
[G1 Android Development] NCommander:
Git merged against 2.1 for ROM builders. Two new tags: eclair-2.0 for 2.0 ROM builders, and 2.1 for 2.1 ROM builders.

Best of luck.