Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,356 Members 39,127 Now Online
XDA Developers Android and Mobile Development Forum

[Q] cm7 nightly camera preview freeze

Tip us?
 
thuanngotau
Old
#11  
thuanngotau's Avatar
Senior Member
Thanks Meter 87
Posts: 616
Join Date: Feb 2009
Location: Hải Pḥng
Quote:
Originally Posted by slugthru View Post
Yes, I saw on the cm7 nightly thread people reporting the latest KANGs from kaijura working with no camera problems.
Tried that but doesn't work for me

Sent from my Incredible S using XDA
I've tried all possible CM7 builds including CM7 nightlies & official 7.1 release -> All same -> Camera freeze!


NOKIA LUMIA 928 - Windows Phone 8 - Lumia Amber (GDR2)
GOOGLE NEXUS 10 - Official SlimKat
SONY XPERIA Z1 - Rooted 4.3 Stock
 
aliireza
Old
#12  
Junior Member
Thanks Meter 3
Posts: 12
Join Date: Jul 2010
Location: Tehran
try nightly kang version + tiamat kernel

http://forum.xda-developers.com/show...&postcount=530
The Following User Says Thank You to aliireza For This Useful Post: [ Click to Expand ]
 
Psyloid
Old
#13  
Psyloid's Avatar
Senior Member
Thanks Meter 236
Posts: 963
Join Date: May 2011
just my two cents : stop messing with CM7 and go for CM9 Ice cold sandwich ...
camera works 95% flawless with Angel camera Dx on it


Samsung Galaxy SIII & Google Nexus 7

RUNNING CM11 KITKAT

Retired Devices :
Acer Liquid , ZTE Blade, HTC incredible S, Samsung Tab P7100, Asus TF300T, Samsung Galaxy S2

 
slugthru
Old
#14  
Member - OP
Thanks Meter 29
Posts: 38
Join Date: Feb 2012
Default Possible fix

I might have found the source of the problem in the kernel's msm framebuffer driver.

I didn't have time to look into more detail but I noticed that in drivers/video/msm/msm_fb.c you have a check for the overlay_play result and force update and sleeping state (don't know what this is for).
If I remove this check and just go everytime with msmfb_pan_update than I no longer see the freeze.

This is the whole diff for my test, if anybody know how to code this the proper way please go ahead:

--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -805,7 +805,7 @@ static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp)
int ret;
struct msmfb_overlay_data req;
struct file *p_src_file = 0;
- struct msmfb_info *msmfb = info->par;
+// struct msmfb_info *msmfb = info->par;

ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
@@ -816,12 +816,11 @@ static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp)

ret = mdp->overlay_play(mdp, info, &req, &p_src_file);

- if (ret == 0 && (mdp->overrides & MSM_MDP_FORCE_UPDATE)
- && msmfb->sleeping == AWAKE) {
+// if (ret == 0) {
msmfb_pan_update(info,
0, 0, info->var.xres, info->var.yres,
info->var.yoffset, 1);
- }
+// }

if (p_src_file)
put_pmem_file(p_src_file);

Unfortunately I won't be able to go ahead with it this week so be my guest
 
slugthru
Old
#15  
Member - OP
Thanks Meter 29
Posts: 38
Join Date: Feb 2012
Default Fixed CM7 nightly camera freeze

Ok, I've had some time today and finally settled on a fix - don't know if it's the "right one" but it solves my problem.

That means that camera works ok, camcorder works ok with the CM7 nightly.

The fix: for vivo it will no longer reset the force update override in the panel setup (for everyone interested see below the file changed with diffs).

For who wants to test this I've attached a kernel update (based on the vanilla cm7 gingerbread): cm7_kernel_cam_fix.zip. (PS: no support for this).

Have fun!

diff --git a/arch/arm/mach-msm/board-vivow-panel.c b/arch/arm/mach-msm/board-vivow-panel.c
index 94ebc62..b91d3c3 100644
--- a/arch/arm/mach-msm/board-vivow-panel.c
+++ b/arch/arm/mach-msm/board-vivow-panel.c
@@ -1106,13 +1106,15 @@ int __init vivow_init_panel(unsigned int sys_rev)

B(KERN_INFO "%s(%d): enter. panel_type 0x%08x\n", __func__, __LINE__, panel_type);

+#ifndef CONFIG_MACH_VIVO
//use dmap for hitachi panel
if(panel_type == PANEL_VIVOW_HITACHI)
{
mdp_pdata.overrides = 0;
pr_err("%s: mdp_pdata.overrides = 0\n", __func__);
}
-
+#endif
+
msm_device_mdp.dev.platform_data = &mdp_pdata;
rc = platform_device_register(&msm_device_mdp);
if (rc)
The Following 9 Users Say Thank You to slugthru For This Useful Post: [ Click to Expand ]
 
slugthru
Old
#16  
Member - OP
Thanks Meter 29
Posts: 38
Join Date: Feb 2012
Quote:
Originally Posted by Psyloid View Post
just my two cents : stop messing with CM7 and go for CM9 Ice cold sandwich ...
camera works 95% flawless with Angel camera Dx on it
You might be right but for the moment CM9/AOKP are not stable enough for me to use daily (eg camera - with Angel cam - stopped working after 5-10 pictures).

Besides, it's been fun
 
slugthru
Old
#17  
Member - OP
Thanks Meter 29
Posts: 38
Join Date: Feb 2012
Btw, can anybody post a link to this fix in the cm7 nightly thread ?
Looks like I dont have enough "thank you's" to post in the development forums

Sent from my Incredible S using XDA
 
Nonverbose
Old
(Last edited by Nonverbose; 14th March 2012 at 04:19 AM.)
#18  
Senior Member
Thanks Meter 995
Posts: 1,627
Join Date: Sep 2011
Location: Adelaide
Quote:
Originally Posted by slugthru View Post
Btw, can anybody post a link to this fix in the cm7 nightly thread
Looks like I dont have enough "thank you's" to post in the development forums

Sent from my Incredible S using XDA
I think its a 10 post minimum to post in the dev forum, you should be OK now.

Edit: thanks for posting this, I have recently gone back to cm7 from which the reason I left it for sense is because of the camera issue. Having had no satisfaction it any of the sense customs (every kernel available to this device has Bluetooth dropout issues) I installed a cm7 'nightly' with tiamat kernel and used a third party camera app to get around the camera freeze issues I was experiencing. This seems like a much better fix.
Phone: Incredible S s-off
Hboot: Revolutionary
Recovery: 4EXT touch
Kernel: Redux
Radio: 3831.18.00.28_M
 
kaijura
Old
#19  
kaijura's Avatar
Recognized Contributor
Thanks Meter 1,816
Posts: 1,298
Join Date: Jan 2011
@slugthru
nice work, you should submit this on the cm gerrit review. None of their devs who manage the vivo read this section anymore and I don't see anyone ever dev'ing for the vivo except kali- / Guilio.

You should do it so that they are aware of it and can implement a patch.
Code:
Mako E960 4.4.2 KOT49H - OmniROM Official - Maguro SC-04D 4.3 JLS36G - OmniROM Unofficial - Maguro i9250M 4.4.2 KOT49H - OmniROM Homemade - Razor 4.4.2 KOT49H - OmniROM Official - Grouper 4.4.2 KOT49H - OmniROM Official
 
jpkbeddu
Old
#20  
Senior Member
Thanks Meter 74
Posts: 395
Join Date: May 2011
Location: Chennai, India
Can I flash this kernel fix to MIUI.?

Sent from my Incredible S
__________________
Device : Samsung Galaxy Note II GT-N7100 (rooted)
Samsung ROM: HyperNote Slim TW
AOSP ROM: PA by Utacka
Old Devices: HTC Incredible S, Nokia 5800 XM, N81, 3230, 6610, 1100, 3315

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes