yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy R i9103] CallMeVentus:
Try using software decoding for now

Sent from Ursa's claws.
[Samsung Galaxy R i9103] karthik050782:
Now the portal is updated with my name! Thank you guys to feel me proud :)
[Samsung Galaxy R i9103] D™:
its great buddy. But what about camera Hal patch. i have provided/ is it helpful..??
[Samsung Galaxy R i9103] karthik050782:
Sorry buddy, in office I cant download and see it... but google is open for me and i think i have found the cause of graph error.

Thought to PM our developers about that, better to post here...

While searching for camera HAL for tegra, i have found the link that use for the graph in tegra 2

http://gstreamer.freedesktop.org/documentation/

Can any one search any libraries which name as libgs* in system/lib, u should be in different ROM or u can unzip the BB or Mazel rom and search for it...

Will dig it after reaching home...
[Samsung Galaxy R i9103] venkatraman:
Congo bro:cool: u deserved it:):D
[Samsung Galaxy R i9103] gitanshu:
Looked for it in my bbrom cwm backup but did nt see any such file :eek:

Someone else confirm?
[Samsung Galaxy R i9103] 4eLLka:
Hello.

Maybe ask for help directly from the CyanogenMod team?

We are not asking for the continued support it is not clear, but a point of assistance they could provide us - At least with the same camera.:confused:

Sorry for my bad eng.
[Samsung Galaxy R i9103] karthik050782:
No one will be ready to help us as we have tegra device...

But we are in touch with some developers and they can help us.

I will try today by digging some with the properietary libraries, coz last time i haven't check the kmsg.. will check this time and report you guys if i found anything...
[Samsung Galaxy R i9103] Adi_Pat:
I downloaded the libcamera source. Proprietary blobs won't help you.

OK do one thing. Compile from that source, and tell me what errors those libs give. Upload them, I will make according edits to the source then.

Doing my school work now, will be online in maybe an hour. Till then upload the log(of the Toshiba libs)
[Samsung Galaxy R i9103] G@sh!sh:
i have last built.

wallpaper and keyboard reset to default after reboot phone.
[Samsung Galaxy R i9103] mj.vikram:
This tread is only for Developers purpose and these kind of doubts should be asked in General Section....
[Samsung Galaxy R i9103] G@sh!sh:
ok, sorry
[Samsung Galaxy R i9103] ivangoto:
Ricardo Cerqueira is developer CM for LG 2x. Maybe ask for the help of his!
[Samsung Galaxy R i9103] Adi_Pat:
Ok so went through a lot of stuff!

I don't think the issue is in V4L2_Camera.cpp but it looks like an issue with the Kernel.

According to dmesg logs-

<6>[ 34.098343] tegra_camera tegra_camera: tegra_camera_open
<3>[ 34.098582] tegra_camera tegra_camera: tegra_camera_ioctl: Unknown tegra_camera ioctl.

Now, look at drivers/media/video/tegra/tegra_camera.c

static long tegra_camera_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
uint id;
struct tegra_camera_dev *dev = file->private_data;

/* first element of arg must be u32 with id of module to talk to */
if (cmd != TEGRA_CAMERA_IOCTL_SENSOR_FW_FOR_SAMSUNG) {
if (copy_from_user(&id, (const void __user *)arg, sizeof(uint))) {
dev_err(dev->dev,
"%s: Failed to copy arg from user", __func__);
return -EFAULT;
}

if (id >= TEGRA_CAMERA_MODULE_MAX) {
dev_err(dev->dev,
"%s: Invalid id to tegra isp ioctl%d\n",
__func__, id);
return -EINVAL;
}
}

switch (cmd) {
/*
* Clock enable/disable and reset should be handled in kernel.
* In order to support legacy code in user space, we don't remove
* these IOCTL.
*/
case TEGRA_CAMERA_IOCTL_ENABLE:
case TEGRA_CAMERA_IOCTL_DISABLE:
case TEGRA_CAMERA_IOCTL_RESET:
return 0;
case TEGRA_CAMERA_IOCTL_CLK_SET_RATE:
case TEGRA_CAMERA_IOCTL_SENSOR_FW_FOR_SAMSUNG:
{
int ret;
if (cmd == TEGRA_CAMERA_IOCTL_SENSOR_FW_FOR_SAMSUNG) {
dev->info.id = TEGRA_CAMERA_MODULE_VI;
dev->info.clk_id = TEGRA_CAMERA_VI_SENSOR_CLK;
dev->info.rate = 24000000;
} else {
if (copy_from_user(&dev->info, (const void __user *)arg,
sizeof(struct tegra_camera_clk_info))) {
dev_err(dev->dev,
"%s: Failed to copy arg from user\n", __func__);
return -EFAULT;
}
}
ret = tegra_camera_clk_set_rate(dev);
if (ret)
return ret;
if (cmd != TEGRA_CAMERA_IOCTL_SENSOR_FW_FOR_SAMSUNG &&
copy_to_user((void __user *)arg, &dev->info,
sizeof(struct tegra_camera_clk_info))) {
dev_err(dev->dev,
"%s: Failed to copy arg to user\n", __func__);
return -EFAULT;
}
return 0;
}
[B][COLOR="Red"]	[B]default:
dev_err(dev->dev,
"%s: Unknown tegra_camera ioctl.\n", __func__);
return -EINVAL;[/B]
}
return 0;[/COLOR][/B]
}

static int tegra_camera_open(struct inode *inode, struct file *file)
{
struct miscdevice *miscdev = file->private_data;
struct tegra_camera_dev *dev = container_of(miscdev,
struct tegra_camera_dev,
misc_dev);
int ret = 0;

dev_info(dev->dev, "%s\n", __func__);

if (atomic_xchg(&dev->in_use, 1))
return -EBUSY;

file->private_data = dev;

mutex_lock(&dev->tegra_camera_lock);
/* turn on CSI regulator */
ret = tegra_camera_power_on(dev);
if (ret)
goto open_exit;
/* set EMC request */
ret = tegra_camera_enable_emc(dev);
if (ret)
goto open_exit;
/* enable camera HW clock */
ret = tegra_camera_enable_clk(dev);
if (ret)
goto open_exit;
open_exit:
mutex_unlock(&dev->tegra_camera_lock);
return ret;
}

Lines in red.

I would have to do some more study into this, which means complete study of all variables,struct,pointers in this driver.

Maybe in a few days I would be able to sort this out.
[Samsung Galaxy R i9103] Adi_Pat:
There is even an issue with tegra_camera_probe() !

EDIT: NULL pointer in there.
[Samsung Galaxy R i9103] Adam77Root:
Can anyone extract anything from this link?

Sent from my GT-I9103
[Samsung Galaxy R i9103] khpatel4991:
I know everyone is concentrating on camera, but

Maybe this can help with microphone fix?!!

http://xdaforums.com/showthread.php?t=1948560
[Samsung Galaxy R i9103] karthik050782:
Adam, with translation... but no source...

http://translate.google.com/transla...tp://qiuzhenqing.blog.edu.cn/2010/576278.html
[Samsung Galaxy R i9103] milindthakker:
What cmd is being called? just print the command and try putting the values of the other cases in default and see the behaviour ;) xD
[Samsung Galaxy R i9103] hasanjaved:
Do v get any clue if look into cm9/10 of lg optimus 2x for camera???
[Samsung Galaxy R i9103] karthik050782:
Nope, they dont use tegra_camera.. it is samsung + tegra or any device which use tegra_camera and CM10.. searched and found nothing.. now searching for the sources.. there are chinese websites showing the makefile but no source... will post the updates...

Meanwhile our Adi is working for us, hope he get something for us..
[Samsung Galaxy R i9103] Adi_Pat:
I don't think this is an issue with Camera HAL.

Looks more like Kernel related because from the logs karthik gave me-

Stock Kernel (KMESG)

<6>[ 483.605505] tegra_camera tegra_camera: tegra_camera_open

<6>[ 488.876273] tegra_camera tegra_camera: tegra_camera_release

<6>[ 2.034067] tegra_camera tegra_camera: tegra_camera_probe //This happens in stock too. So no problem here

<6>[ 2.034145] tegra_camera tegra_camera: tegra_camera_probe: no regulator device, overriding //Same

But in CM10-

<6>[ 2.070753] tegra_camera tegra_camera: tegra_camera_probe
<6>[ 2.070883] tegra_camera tegra_camera: tegra_camera_probe: no regulator device, overriding
<6>[ 34.098343] tegra_camera tegra_camera: tegra_camera_open
[B]<3>[ 34.098582] tegra_camera tegra_camera: tegra_camera_ioctl: Unknown tegra_camera ioctl. //Issue lies here![/B]

tegra_camera_release isn't running- because it terminates at tegra_camera_ioctl(); ..

EDIT: I am adding some printk lines to the function, someone please test it on stock ICS (Working Cam) and send me kmesg, that wil help me understand some stuff.
[Samsung Galaxy R i9103] karthik050782:
As my backup is corrupted, i am unable to restore and test this kernel... can anybody having ICS stock(BB rom, mazel II) can do the testing and send the kmsg...
[Samsung Galaxy R i9103] D™:
Donno is this right time to share this when we are in between camera problem. I have few words with "entropy" buddy, the Elite Recorgnized Developer. I have requested him to help us bt As per him, He doesnt have any knowledge abt tegra devices. Here is the reply:
[Samsung Galaxy R i9103] karthik050782:
Lets try to an extend... Having chat with adi, for debugging the kernel... We have Adam, adi and teamgalaxyr for the support, hope ardatdat and other developers join here for getting camera for CM10 :)
[Samsung Galaxy R i9103] hasanjaved:
Dont give up hope guys:thumbup:
[Samsung Galaxy R i9103] D™:
Hey buddy. Why u r feeling this.?? We r with u. I hve just asked from him as help. When there is no way then a small ray can gives u hope of a way. So, dont give up. :D
[Samsung Galaxy R i9103] vipul12389mehta:
Cld this also mean that camera wil nt wrk ever on cm10...??

I knw its too early to say.......

Sent from my i9103 using CM10 alpha
[Samsung Galaxy R i9103] karthik050782:
No guys, we are not giving up... Doing lot of research... Will send it to Adam and Adi, I will also try to do some patch.. lets hope..
[Samsung Galaxy R i9103] 4eLLka:
ONLY TEGRA DEVICES !!! ONLY HARDCORE !!!!

we all believe in you and your abilities :good:
[Samsung Galaxy R i9103] sarun_biotech:
It means even though its is as hard as hell to make the tegra camera work, few others have made it work somehow. And it also means that if they can do it, our guys can do it too...
[Samsung Galaxy R i9103] milindthakker:
Adi can you tell me the steps i need to follow ..

Will try that

Also did anyone get a chance to check for tegra 3 camera?

Motorola Xoom has Tegra 2/Jelly Bean :) .. so if anyone can check that

G2X has Tegra 2 + camera working in JB-

http://xdaforums.com/showthread.php?t=1784980
[Samsung Galaxy R i9103] mj.vikram:
Adam and Karthik, "Ricardo Cerqueira" has relesed first official CM 10 for LG O2X today even though its First Nightly its almost stable and can be used it as Daily Driver, So if one of you can speak with him he may help us because this is the only one Tegra Phone CM is supporting Officially..

XDA Thread

Source: Google+
[Samsung Galaxy R i9103] D™:
Great..:good: dont have remaining thanx. will give you shortly buddy.:p

Edit: Given ;)
[Samsung Galaxy R i9103] karthik050782:
Thanks mj. First I thought to use their code but what they did is, they are using old driver which built for cm7. And also they don't have tegra_camera in their kernel source.. so I felt that it is very different and we can't use... but I shared adi about the kernel source of lge by vork. Its gonna be a big challenge to make work of tegra... many interesting thread and forum but all are given up... :mad:
[Samsung Galaxy R i9103] vipul12389mehta:
i am noob in dev...

bt y cant we also do the same thing...i mean we have GB and ics working camera..

can we port it to cm10 ?? by using the same code ??
[Samsung Galaxy R i9103] mj.vikram:
Ricardo Cerqueira is using 2.6.X kernel only for CM 10 also and he have modified it to support the CM10, This build is purely based on the CM7 they have update it to support CM10 you can check his Google+ page he have explained some questions in previous posts....

Actually CM Team will not like Tegra Phone so they have stooped to support LG O2x from CM 9 on words, But This guy took it as challenge and developed CM 10 for the LG O2X ..

Based on this I can think how much efforts Adam and karthik put on our device, Thank you Guys:good:....

Karthik if i remember the things correctly "Unkown" have modified the 2.6.X kernel to support ICS, may be you can use it with some modification to support it for CM10......

Edit: Link for Unkown's 2.6.X kernel for ICS.
[Samsung Galaxy R i9103] AcidFX:
tegra2

LG O2X isn't the only device with CM tegra. If you remember there is Galaxy Tab 8.9 is based on tegra and has fully working CM10. Maybe we should ask the developer for some help?!

Here is his thread

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

I've tried to write him a private message, but i don't know whether they are sent to him. My box of private sent messages is empty (i've tried to send a few times)/
[Samsung Galaxy R i9103] vipul12389mehta:
if that is the case then Post your query here....some one will sent it with his username...if you dont mind..!!
[Samsung Galaxy R i9103] karthik050782:
Unknownzd just repacked the stock ICS and added GB kernel, to avoid the emmc brick bug.

Also, we don't have working camera with CM7.2 (as u guys know how much effort put by epsy).. so we don't have those options...

Need to dig more, now i feel that we need to fix the audio, hw accel and tuning the sensor, all this might related to camera...

Not sure though...
[Samsung Galaxy R i9103] D™:
buddy, dont want to bother you or dont want to down your moral, but if you could focus on remaining issues like you said above for CM10..? Coz in the last atleast we will have 95% working CM10. ;)

While searching just got the link of Motorola Droid X2(Using Tegra 2). I have PM to Dev of Droid X2. let see if he could be with us for remaining part or for camera as well.:fingers-crossed:

Working:

WiFi

Bluetooth - we need it.

3G

Calling

GPS

Google Now

Audio System! (This was the biggest thing keeping me from releasing CM10.) - we need it, still having 90%

Camera..... ish (See known issues) - we need it. But Droid X2 also doesn't have this one.

Maps (You won't end up in a lake in Norway on your trip to the movie theater)
[Samsung Galaxy R i9103] mj.vikram:
Galaxy Tab and Galaxy R are having different Chipset buddy, I was taking about Ventana chip set which we have, hope you got it for details check this link..
[Samsung Galaxy R i9103] Adam77Root:
Regarding hw acceleration: I noticed that the system loads libstagefrighthw.so lib which is proprietary and should handle all codec registrations. However, it doesn't do so. Our codecs are in libnv... and libsomx... (See /etc/somxreg.conf for details.) libraries. In JB, the new media_codecs.xml file was introduced. It describes which filetypes use which codec. Even if I add one of the proprietary codecs into that file, log says node cannot be allocated and it falls back to the software codec. There might be some problem with the initialization code of proprietary codecs.

Sent from my GT-I9103
[Samsung Galaxy R i9103] 'cooleagle':
Check if you've enabled your private messaging on the settings/configuration page buddy.

-------------------------------------------

Does anyone remember reading if anyone was good at reverse engineering here on XDA or otherwise ? We could use some help if someone can reverse engineer required part of the camera code/HAL/libs/etc.

I know what I'm thinking is next to impossible. But if there's someone who's willing to give it a try and has the time for it(it takes a good amount of time), then it's worth a shot.

Once camera is functional I'm sure a good number of people will switch to CM 10 and help make it stable, all thanks to our Devs here.
[Samsung Galaxy R i9103] karthik050782:
Not getting much time... Will try few things @ weekend... Moving to hw accel... Any idea how the tegra_avp starts in kernel side... Now in bb rom to use camera... Will shift to cm10 @ night and will try some testing...
[Samsung Galaxy R i9103] parmarket:
New official CM file manager

http://xdaforums.com/showthread.php?p=33554724
[Samsung Galaxy R i9103] Adam77Root:
Status update: Yesterday I got Samsung hw acceleration features working. Had to patch libstagefright. Used IDA a lot. :D Nvidia ones are still not working, I think some libs are missing. I'll have to update the extract-files.sh and I'm thinking about uploading the vendor folder separately.

Unfortunately I almost broke my Linux installation when I was experimenting with building B2G (yes, really ;)), because Backtrack has a tricky Python implementation. I'll install Ubuntu tomorrow and try to get used to Unity. The working folders are on a different partition, so nothing is lost. :)

Regarding kernel: Epsy's patches cannot be directly ported to the ICS kernel. Something broke the kernel and it didn't boot. Most of his fixes are to eliminate warnings and clean up dmesg. However, there are good things he built in. Some of these are overclocking, adding governors (, maybe memory allocators) and some others. These can be implemented in other ways. I think I'll have a long discussion with Adi_Pat on this tomorrow. As soon as Titanium kernel gets stable on stock ICS, I'll use it for CM builds.

Regarding stability and any other issues: this is still an alpha build now, all of them will hopefully be eliminated in later versions.

One issue I'm thinking on is touchkey backlight. As far as my observations are correct, stock roms set key leds on and off from Java code. CM doesn't have such support. Epsy built code into the kernel, which handles the same on the kernel level. He also created a custom sysfs file to set the timeout. But if the kernel is built so, key led timeout cannot be modified on stock roms (for now neither on CM though). Later it can be incorporated into a separate application which then can be used on both stock and CM roms. So the decision is here: Can you live without setting keyled (default is 2 seconds, but this can be set to anything else in the kernel code) or is it essential? I ask this because building two different kernels is inconvenient for Adi (of course for other devs and me as well).

I'll post this last paragraph in the discussion thread too, please share your opinions there. Sorry for such a long post. :D

Sent from my GT-I9103 with CM10
[Samsung Galaxy R i9103] parajsinghal:
Thanks a lot Adam. Awesome work buddy.

Btw Unity sucks and so does gnome3. Nothing beats gnome2 till date :)

More importantly, I remember fixing the key led light issue differently on my temp CM7 kernel than Epsy. I managed to fix it by just adding a 200ms delay in ts_100ms_timer_stop method in atmel_mxt224E.c

I am not sure if that will work with CM10 but I'll see if I can find those sources on my system, but they may be lost by now :(
[Samsung Galaxy R i9103] CallMeVentus:
Adam , I'd probably recommend you to use 10.04 64-bit until the AOSP peeps themselves support 12.04/12.10....

Besides Unity sucks anyways....

I believe you could check out Nvidia's git network to see if there's anything related to our board....

Sent from Ursa's claws.
[Samsung Galaxy R i9103] karthik050782:
I found something interesting about AVP.

This one get executes whenever we run camera and video which uses axf files. In CM10 it get start but while execution of camera or videos it won't get execute. It seems AVP support armv4t. Some nvidia git changes are there for kernel side... but it is different than our Samsung released kernel.. can't find the whole kernel of nvidia's :(
[Samsung Galaxy R i9103] vbz89:
would the jelly bean kernel the su660 (south korean version of O2x) or P990 be any helpful?? it was recently released :)

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

http://www.xda-developers.com/android/lg-su660-kernel-source-released-may-help-g2x/
[Samsung Galaxy R i9103] D™:
Karthik & Adam buddies, just PM you something interesting. Please check. if possible then revert.
[Samsung Galaxy R i9103] karthik050782:
Oops! They use libcamera... Simillar like O2x... :(
[Samsung Galaxy R i9103] D™:
Damn..:mad:
[Samsung Galaxy R i9103] shaheen7m:
Karthik buddy, today we miss your daily dose of updation. :p
[Samsung Galaxy R i9103] karthik050782:
Sure buddy, i stopped writing coz not spending much time... Taken leave and enjoying with family... But doing some research for the tegra_avp (whenever my kid is eating and sleeping.. shhh.. now he is sleeping :) )

Not sure how this bloody tegra_avp is getting called...

In stock log, below lines are there..

<6>[ 18.622387] tspdrv: open.

<6>[ 18.622523] tspdrv: ioctl cmd[0x494d4d52].

<6>[ 18.639970] [TSP] Called value by HAL = 255

But in CM10 it is not present and no word like HAL... Digging more, hope if this solve, then hw accel and camera make some progress..

As Adam said, he used SEC codec, but our device is compatible with Nvidia codec so he also working on that...

Won't stop digging till i get camera (may be i am selfish.. but i need it :) )
[Samsung Galaxy R i9103] dman3285:
Yo need a camera wrapper to wrap the existing Hal...
[Samsung Galaxy R i9103] Adam77Root:
This is not related to avp, but touchkey. The last line is removed in the kernel for the purpose of cleanup. The first two lines are for vibrator, it's maybe not there in CM, because haptic feedback is disabled/not working.
[Samsung Galaxy R i9103] karthik050782:
:crying: my bad, now looking into other device vendor tree to match :)
[Samsung Galaxy R i9103] The-Droidster:
Doubts

Adam, Karthik :good: Hats off to you guyz. You are doing a brilliant and unparalleled job here. Since the past few days I'm trying to learn a bit about the entire building, compiling, repo syncing process. I have been following the thread from the past few days and there are a few doubts that I would like to get cleared.:confused:

Noob Alert: I'm quite new to all this and still in the learning process, so the questions may seem funny or even not worthy. Nonetheless I'm asking them here.

1. Camera Issue with CM10: What is the root cause? Is it the proprietary nvidia driver that has not been released or something else? As far as I understand, JB comes with different camera module as compared to ICS and hence the official ICS camera drivers that came with the official ICS release are not working with the JB camera. Is that right?

2. Bluetooth: Does the above scenario also hold true for bluetooth and microphone?

3. CM9 or CM7: This one has been bugging me since a long time. We had official GB. We now have official ICS. Both very stable. These official releases brought with them the required proprietary drivers as well. Right? So, in case someone tries to build a CM7 or CM9 I'm assuming that he would be able produce a stable, perfectly functional build. I mean the dev shouldn't have any problem with CM9 because he has all the drivers at his disposal right. The same goes for CM7. I'm asking this because when Adam and Epsy tried to build CM7 Camera was still the problem despite the fact that we had official Gingerbread and all the drivers required. Why did that happen? In short, just tell me: If I plan to build CM9 from sources, will I be able to get the camera functioning or is there any driver trouble still involved? Sorry for such a long and noob question.

4. ICS came with kernel version 3.x.x which is what is required for JB as well. Am I right? So I assume the kernel can be used as is. I'm just verifying this to consolidate my understanding.

TIA even if you guys take the trouble of reading through.;)

Thnx!:)
[Samsung Galaxy R i9103] 824587:
I'd be very happy with a fully working CM9, all the ICS freezes are really annoying, in fact I recently reverted to GB.
[Samsung Galaxy R i9103] karthik050782:
Me too noob, last 2 month i am doing some research and found something interesting for our device.

coming to ur questions:

1. Unable to find root cause(if we found then we can fix it :) ). According to me, we can't simply use the drivers. We have drivers source in kernel. But for communication we need HAL(do a google, u can find more details). Else, we have to use proprietary libraries(which is what I am trying). I believe there is no difference in camera for ICS and JB, coz few device use proprietary libraries from ICS and it work in CM10.

2. Same as above. But in this case, we need to fix few things for working mic. We have source, thanks to Adam.

3. Even if we try CM7, CM9 or CM10 we have to dig for camera and other things. If we have working CM7 camera, then we can't use simply to CM9 or CM10, we need to do some more steps to working with CM9 or CM10.

4. Yep! We can use kernel 3.1. Few device have 2.6 kernel(but require lot of changes) for JB or ICS.

Adam tried to compile CM10 and it booted (thats a great and hard thing to achieve). So we all in CM10. I feel it is not mandatory to have CM7.. CM9 and CM10.

Its all my little brain guesses, if i wrong plz correct me..