Re: [android-porting] Re: hi253 camera module porting android for panther board

523 views
Skip to first unread message

ckkeo

unread,
Nov 5, 2014, 4:29:19 PM11/5/14
to android...@googlegroups.com
Check the camera Service Provider.
It seems not being loaded for some reason!

W/Launcher.LauncherProvider( 1677): Unable to add favorite: com.android.camera/com.android.camera.Camera
W/Launcher.LauncherProvider( 1677): android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.android.camera/com.android.camera.Camera}
W/Launcher.LauncherProvider( 1677):     at android.app.ApplicationPackageManager.getActivityInfo(ApplicationPackageManager.java:225)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherProvider$DatabaseHelper.addAppShortcut(LauncherProvider.java:924)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherProvider$DatabaseHelper.loadFavorites(LauncherProvider.java:828)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherProvider$DatabaseHelper.access$000(LauncherProvider.java:218)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherProvider.loadDefaultFavoritesIfNecessary(LauncherProvider.java:213)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherModel$LoaderTask.loadWorkspace(LauncherModel.java:1108)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherModel$LoaderTask.loadAndBindWorkspace(LauncherModel.java:852)
W/Launcher.LauncherProvider( 1677):     at com.android.launcher2.LauncherModel$LoaderTask.run(LauncherModel.java:956)
W/Launcher.LauncherProvider( 1677):     at android.os.Handler.handleCallback(Handler.java:615)
W/Launcher.LauncherProvider( 1677):     at android.os.Handler.dispatchMessage(Handler.java:92)
W/Launcher.LauncherProvider( 1677):     at android.os.Looper.loop(Looper.java:137)
W/Launcher.LauncherProvider( 1677):     at android.os.HandlerThread.run(HandlerThread.java:60)

Chinda

Le 05/11/2014 11:27, Việt Hoàng a écrit :

Hi cckeo,
Thank you for last your reply,
I get error as follow:
E/V4L2Camera( 1110): StartStreaming: Unable to start capture: Broken pipe
E/CameraHardware( 1110): Camera StartStreaming fail: Broken pipe
When i posting driver hi253 camera, i get device /dev/video2. HAL Camera can open device and read/write register on Camera. But i can't streaming video.
I attacted logboot.txt and logcat.txt. Please help me resolve my issue.
Thanks,
Hoang Quoc Viet.
Vào 20:15:08 UTC+7 Thứ hai, ngày 27 tháng mười năm 2014, ckkeo đã viết:
Hi,
Sorry for the late answer (holiday in France).

Related to your questions:

#1.  In your log file, I saw the message "omap3_init_camera successful!", but I doubt about this message because if it is really successful then you should able to register the sub i2c subdevice with V4l2 device driver. Narrow down the problem by just comment out all the v4l2 staffs in the platform layer, BUT make sur that all th Camera's ID information are set correctly to see if the Device driver will be loaded (because in your log, I don(t see any message from the camera device driver) by the system and the probe function is called (add as much the printk to check).

There might have 2 potential reasons for your fails:

       a. the Camera's gpios are incorrectly set.
            Check the gpios settings.
            Check the i2c has been configured appropriately for your camera device (e.g type, index, clock, etc ...)
 
       b. the Camera has been initialized too early VS the v4l2 core layer within the plat-form driver.
            If this is the case then all the v4l2 registrations need to be done in the Camara's "device driver" initialization and not in the platform.
       
#2. my comments are in the answer #1-b

#3. The reason that you can't read/write is because the Device Driver has not been loaded and initialized (check answer #1).

#4. All your problems lead to the answer in #1.

Tips:
Don't hesitate to add as much printk in your code (on only just for the status success/failed).

Hope this help.
Chinda

Le 21/10/2014 02:30, Việt Hoàng a écrit :
Thanks for your reply,
I have attached files include: hi253.c driver and hi253_log, board-omap3beagle.c (file board config) and board-omap3beagle-camera.c (file init camera).
1. My log give error: isp_register_subdev_group: Unable to register subdev hi253
In isp.c file check board_info and give me this error:
subdev = v4l2_i2c_new_subdev_board(&isp->v4l2_int_device, adapter,
                board_info->board_info, NULL, 1);
        if (subdev == NULL) {
            printk(KERN_ERR "%s: Unable to register subdev %s\n",
                __func__, board_info->board_info->type);
            continue;
        }

        if (first)
            sensor = subdev;

2. hi253 driver use struct v4l2_int_device, i think convert to v4l2_subdev. is it should done?
3. in hi253_write_reg function and hi253_read_reg, i can't read or write to register of hi253. I don't have any solution for this. Please help me.
4. When i can sue i2c_tool get, set, dump, detect hi253 camera ? Only support power and clock( MCLK=24Mhz), that i done but i don't use i2cdump, i2cget, i2cset. It give error: Device bussy.
Thanks,
Viet.

2014-10-20 17:38 GMT+07:00 ckkeo <ck...@neuf.fr>:
In order to help, Please provide more details and attach logs file???

Meanwhile, you can check these below points:

  1 - Does the platform layer apply the correct power level to all sections of the Camera HW?
  2 - Are all appropriated ID information (of the camera) being added to the Device Driver, in order, for the "probe" routine  to correctly detecte and intialize the HW.
  3 - Does the Firmeware (if any) have been downloaded successfully into the HW.
  4 - And finally check if the Device Drive has been successfully loaded by the kernel and the driver has initialized the HW without any errors.

Chinda

Le 19/10/2014 10:24, Việt Hoàng a écrit :
Hi cckeo,
I have tried to use i2c-tool for detect, get, set register on hi253 camera but it not work. I use this patch for add hi253 Camera on kernel configure: https://gitorious.org/angstrom/angstrom-linux/commit/046dac666301c0df22679424169675045c70defd
Why i can't detect Camera sensor although i have supported Power sequence, MCLK (24MHz) for it ?


Vào 21:27:52 UTC+7 Thứ năm, ngày 18 tháng chín năm 2014, ckkeo đã viết:
Check the 3 points below:

a- Your camera driver source code came from hi253 and have been patched against <kernel>/drivers/media/<where, which file>?
     You have to look for the "device node" in this code, the HAL layer will need it to open and access to the Hi253 device driver.
  
b- Your plateform driver (in <kernel>/arch/arm/mach-omap2/xxxxx.c) has been patched:
     Check all gpios are correctly mapped for the Hi253.
     Based on your Ti doc for the panther plateform, the i2c should be OK, but you have to check the schematic for the // bus part.

c - You can start implementing the Hi253 HAL layer inspiring from mt9v113 source code:
     - Open the correct V4L2 device node (check how the device driver (#a) is set for it).
     - Open/Close/Read/Write on V4L2 are quite standard, but NOT the ops (ioctl) which should be handle according to the Hi253 specifications in the camera HAL interface.

 Hope this point you to the right direction.
Chinda

Le jeudi 18 septembre 2014 03:42:52 UTC+2, Việt Hoàng a écrit :
Hi cckeo,
I don't have hi253 HAL code. I am editing Camera HAL code that supported by TI (or Jorjin, i uncertain): http://59.124.231.13/index.php/JAJ_1.0.DEV04_AP_Module_AM37_Jelly_Bean_Release_Notes. On folder <panther-bsp>/hardware/ti/omap3/camera.
But i am stucking in here. I am reading and trying to understand code but it is difficult with me. Thanks for your share.
Do you have other idea?
Thanks,
Do your best, the rest you come!
Hoang Quoc Viet.

Vào 21:47:10 UTC+7 Thứ tư, ngày 17 tháng chín năm 2014, chinda keodouangsy đã viết:
OK, your hi253 driver seems to intialize and drive correctly the i2c and the // data bus.
Can you show me your hi253 HAL code? Do you have it?


Le 16/09/2014 05:07, Việt Hoàng a écrit :


Thanks for your reply!
1. Here this connector I used. Hi253 Camera connect with DM3730 AP Module through I2C Bus and Parallel Interface (CAM D2,...,CAM D9) as above image.
2. Here Source code Hi253 Driver that I use: https://github.com/allwinner-ics/lichee_linux-3.0/blob/master/drivers/media/video/sun4i_csi/device/hi253.c
Have you give me any advise?

Vào 10:00:55 UTC+7 Thứ hai, ngày 15 tháng chín năm 2014, chinda keodouangsy đã viết:
That's lead to the question I've asked before, as there are some Hardware dependencies:
        -   *** How do you connect the hi253 camera to your board? 
           Check the vendor document to know on which bus (USB, PCI or i2c) the hi253 used to connect to the system.
           Normally the hi253 code should help you to identify the bus used to connect to the system.

 What is for sure is that the mt9v113 does use i2c bus to connect to the system (e.g. your board).





Le 12/09/2014 09:50, Việt Hoàng a écrit :
I have checked existing HAL camera on Link that I posted. But on file: V4L2camera.cpp only support 3 sensor camera: mt9v113, mt9t111, tvp514x.
1 - On hi253 driver, it register with v4l2 interface with funtion:
        - v4l2_int_device_register(&hi253_int_device);
2 - On mt9v113 driver, it register with v4l2 inter with 2 functions:
        - /*
     * Register as a subdev
     */
    v4l2_i2c_subdev_init(&mt9v113->subdev, client, &mt9v113_ops);
    mt9v113->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;

    /*
     * Register as media entity
     */
    mt9v113->pad.flags = MEDIA_PAD_FLAG_OUTPUT;
    ret = media_entity_init(&mt9v113->subdev.entity, 1, &mt9v113->pad, 0); f
I don't understand about this different. I am stucking here. Can you show me a solution?
Vào 23:35:40 UTC+7 Thứ ba, ngày 09 tháng chín năm 2014, ckkeo đã viết:
I just answered your other thread!

Did you have any camera comes with your board today?

Check and locate your existing HAL camera source code. (i.e. Did you see any camera folder within the <panther-bsp>/hardware folder ?)
Sure that it's better if you can get the HAL code from the vendor. (make sure that the HAL can drive the V4L2 driver).

Chinda


Le 09/09/2014 11:04, Việt Hoàng a écrit :
Thank you verry much!
I am clearly steps in integrate process.
I was success re-build kernel that add hi-253 driver. But i don't understand about:

 1 -  Is Hi-253 driver compatibility with HAL camera at patch: http://processors.wiki.ti.com/images/6/6c/0001-HAL-camera-support-added-for-beagleboard.patch.gz
or i have to contact with vendors for HAL camera?
Thank you!

Regards,
VietHQ
Do your best, the rest you come!

Vào 04:04:40 UTC+7 Thứ ba, ngày 09 tháng chín năm 2014, ckkeo đã viết:
In clear you have to do these below steps:

------------------------- 
The kernel part
------------------------
1 - Integrate the hi253 device driver into your Panther board kernel
      a - Add the driver source code to your kernel
      b - Configure OMAP to recognize your hi253 camera
      c - Enable the Camera Module to your kernel config
  
     The patch for these steps have been provided in the TI's porting guide at this link : http://processors.wiki.ti.com/images/a/aa/0001-camera-sensor-support-mt9v113-for-beagleboard.patch.gz
     All you have to do is apply the patch to your kernel.

2 - Re-build your kernel

    You can refer to this link for How to build the kernel : http://processors.wiki.ti.com/index.php/TI-Android-FroYo-DevKit-V2_UserGuide#Kernel

----------------------
android part
---------------------
3 - Add the Camera HAL interface to your android plateform

Per TI's porting Guide, the patch is here : http://processors.wiki.ti.com/images/6/6c/0001-HAL-camera-support-added-for-beagleboard.patch.gz
Also per TI's porting guide for Froyo release the patch should be applied at <ANDROID_ROOT>/hardware/ti/omap3/camera, to check on your android plateform development source code the V4L2 part.

4 - Re-build the android system and give a try

Hope this clarified a little bit for you.

Chinda


Le 08/09/2014 08:57, Việt Hoàng a écrit :
i was stuck there. But i can'n find who help me. haizzzz. So sad.

Vào 17:15:55 UTC+7 Thứ hai, ngày 23 tháng sáu năm 2014, Hao Nguyen đã viết:
I am working on panther board and i want to use hi253 camera module in my board. I've read porting guide on http://processors.wiki.ti.com/index.php/TI-Android-DevKit-Camera_Porting_Guide but i didn't still understand. Can anyone give me some infomation relate to my problems? I have recenty worked on embedded kit so i don't have much knowledge about it. Thanks for reading!!
--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




...
--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! est active.


Việt Hoàng

unread,
Nov 6, 2014, 5:35:56 AM11/6/14
to android...@googlegroups.com
Thanks,
But i don't think so it is important error. When i click Camera App and use "dmesg" on terminal, I get log as bellow:
[   71.427124] Hi253: hi253_open                                               
[   71.430206] Hi253: hi253_open successful                                    
[   71.504150] Hi253: hi253_s_power                                            
[   71.594635] Hi253: hi253_def_config                                         
[   71.598297] Hi253: mt9v113_write_regs                                       
[   71.878417] Hi253: next->token == TOK_DELAY!                                
[   71.882873] Hi253: hi253_vga_mode                                           
[   71.886352] Hi253: mt9v113_write_regs                                       
[   72.011260] Hi253: next->token == TOK_DELAY!                                
[   72.015747] Hi253: format V4L2_MBUS_FMT_YUYV8_2X8                           
[   72.020660] Hi253: mt9v113_write_regs                                       
[   72.151855] Hi253: next->token == TOK_DELAY!                                
[   73.555114] Hi253: hi253_open                                               
[   73.558258] Hi253: hi253_open successful                                    
[   73.606994] Hi253: hi253_get_pad_format                                     
[   73.610992] Hi253: Exit hi253_get_pad_format  

But on my logcat terminal:
D/****CameraHAL( 1110): cameraHal BACK 0
D/****CameraHAL( 1110): cameraHal 0
V/CameraHolder( 1831): open camera 0
D/****CameraHAL( 1110): cameraHal BACK 0
D/****CameraHAL( 1110): cameraHal 0
I/CameraService( 1110): Opening camera 0
I/****CameraHAL( 1110): camera_device open
E/CameraHardware( 1110): version >= KERNEL_VERSION(2,6,37)
E/V4L2Camera( 1110): Open
E/V4L2Camera( 1110): Open_media_device
D/V4L2Camera( 1110): pads for entity 1=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): (1 OUTPUT)
D/V4L2Camera( 1110): [1:1]===>[5:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 2=
D/V4L2Camera( 1110): (0 OUTPUT)
D/V4L2Camera( 1110): [2:0]===>[1:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 3=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): (1 OUTPUT)
D/V4L2Camera( 1110): [3:1]===>[4:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): [3:1]===>[5:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 4=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 5=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): (1 OUTPUT)
D/V4L2Camera( 1110): (2 OUTPUT)
D/V4L2Camera( 1110): [5:1]===>[6:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): [5:2]===>[7:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): [5:1]===>[10:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): [5:2]===>[13:0]
D/V4L2Camera( 1110):     ACTIVE
D/V4L2Camera( 1110): [5:2]===>[14:0]
D/V4L2Camera( 1110):     ACTIVE
D/V4L2Camera( 1110): [5:2]===>[15:0]
D/V4L2Camera( 1110):     ACTIVE
D/V4L2Camera( 1110): pads for entity 6=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 7=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): (1 OUTPUT)
D/V4L2Camera( 1110): [7:1]===>[9:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): [7:1]===>[10:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 8=
D/V4L2Camera( 1110): (0 OUTPUT)
D/V4L2Camera( 1110): [8:0]===>[7:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 9=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 10=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): (1 OUTPUT)
D/V4L2Camera( 1110): [10:1]===>[12:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 11=
D/V4L2Camera( 1110): (0 OUTPUT)
D/V4L2Camera( 1110): [11:0]===>[10:0]
D/V4L2Camera( 1110):     INACTIVE
D/V4L2Camera( 1110): pads for entity 12=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 13=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 14=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 15=
D/V4L2Camera( 1110): (0 INPUT)
D/V4L2Camera( 1110): pads for entity 16=
D/V4L2Camera( 1110): (0 OUTPUT)
D/V4L2Camera( 1110): [16:0]===>[5:0]
D/V4L2Camera( 1110):     INACTIVE
D/dalvikvm( 1831): GC_CONCURRENT freed 231K, 10% free 5552K/6151K, paused 17ms+32ms, total 196ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed 59K, 10% free 5581K/6151K, paused 36ms, total 37ms
I/dalvikvm-heap( 1831): Grow heap (frag case) to 6.584MB for 830224-byte allocation
D/dalvikvm( 1831): GC_CONCURRENT freed 1K, 9% free 6390K/6983K, paused 14ms+15ms, total 54ms
D/dalvikvm( 1831): WAIT_FOR_CONCURRENT_GC blocked 35ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed 0K, 9% free 6391K/6983K, paused 33ms, total 33ms
I/dalvikvm-heap( 1831): Grow heap (frag case) to 7.028MB for 467008-byte allocation
D/dalvikvm( 1831): GC_CONCURRENT freed 0K, 9% free 6847K/7495K, paused 24ms+2ms, total 98ms
D/dalvikvm( 1831): WAIT_FOR_CONCURRENT_GC blocked 33ms
E/CameraHardware( 1110): initDefaultParameters
D/CameraHardware( 1110): Set Parameter...!!
D/CameraHardware( 1110): PreviewFormat yuv422sp
D/CameraHardware( 1110): PictureFormat jpeg
D/CameraHardware( 1110): preview width:640,height:480
D/CameraHardware( 1110): picture width:640,height:480
D/CameraHardware( 1110): FRAMERATE 15
D/CameraHardware( 1110): Picture Size by CamHAL 640 x 480
D/CameraHardware( 1110): Preview Resolution by CamHAL 640 x 480
D/CameraHardware( 1110): enableMsgType:3085
I/AwesomePlayer( 1110): setDataSource_l('/system/media/audio/ui/camera_click.ogg')
E/WVMExtractor( 1110): Failed to open libwvm.so
I/AwesomePlayer( 1110): setDataSource_l('/system/media/audio/ui/VideoRecord.ogg')
E/WVMExtractor( 1110): Failed to open libwvm.so
D/dalvikvm( 1831): GC_FOR_ALLOC freed 832K, 20% free 6055K/7495K, paused 87ms, total 87ms
D/CameraHardware( 1110): Set Parameter...!!
D/CameraHardware( 1110): PreviewFormat yuv422sp
D/CameraHardware( 1110): PictureFormat jpeg
D/CameraHardware( 1110): preview width:640,height:480
D/CameraHardware( 1110): picture width:640,height:480
D/CameraHardware( 1110): FRAMERATE 15
D/CameraHardware( 1110): Picture Size by CamHAL 640 x 480
D/CameraHardware( 1110): Preview Resolution by CamHAL 640 x 480
D/CameraHardware( 1110): Set Parameter...!!
D/CameraHardware( 1110): PreviewFormat yuv422sp
D/CameraHardware( 1110): PictureFormat jpeg
D/CameraHardware( 1110): preview width:640,height:480
D/CameraHardware( 1110): picture width:640,height:480
D/CameraHardware( 1110): FRAMERATE 15
D/CameraHardware( 1110): Picture Size by CamHAL 640 x 480
D/CameraHardware( 1110): Preview Resolution by CamHAL 640 x 480
D/dalvikvm( 1831): GC_CONCURRENT freed 3K, 13% free 6563K/7495K, paused 12ms+12ms, total 51ms
D/dalvikvm( 1831): WAIT_FOR_CONCURRENT_GC blocked 30ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed 323K, 17% free 6240K/7495K, paused 26ms, total 26ms
D/dalvikvm( 1831): GC_CONCURRENT freed <1K, 10% free 6751K/7495K, paused 17ms+13ms, total 102ms
D/dalvikvm( 1831): WAIT_FOR_CONCURRENT_GC blocked 65ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed 333K, 15% free 6435K/7495K, paused 75ms, total 76ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed <1K, 10% free 6758K/7495K, paused 15ms, total 15ms
I/dalvikvm-heap( 1831): Grow heap (frag case) to 7.120MB for 186432-byte allocation
D/dalvikvm( 1831): GC_FOR_ALLOC freed 0K, 10% free 6940K/7687K, paused 18ms, total 18ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed 323K, 14% free 6617K/7687K, paused 31ms, total 39ms
D/dalvikvm( 1831): GC_FOR_ALLOC freed <1K, 10% free 6941K/7687K, paused 84ms, total 84ms
V/StateManager( 1831): startState class com.android.gallery3d.app.PhotoPage
V/NFC     ( 1831): this device does not have NFC support
D/OrientationManager( 1831): lock orientation to landscape
D/dalvikvm( 1831): GC_CONCURRENT freed 503K, 12% free 6960K/7879K, paused 18ms+34ms, total 132ms
D/CameraHardware( 1110): Set Parameter...!!
D/CameraHardware( 1110): PreviewFormat yuv422sp
D/CameraHardware( 1110): PictureFormat jpeg
D/CameraHardware( 1110): preview width:640,height:480
D/CameraHardware( 1110): picture width:640,height:480
D/CameraHardware( 1110): FRAMERATE 15
D/CameraHardware( 1110): Picture Size by CamHAL 640 x 480
D/CameraHardware( 1110): Preview Resolution by CamHAL 640 x 480
V/camera  ( 1831): Preview size is 640x480
D/CameraHardware( 1110): Set Parameter...!!
D/CameraHardware( 1110): PreviewFormat yuv422sp
D/CameraHardware( 1110): PictureFormat jpeg
D/CameraHardware( 1110): preview width:640,height:480
D/CameraHardware( 1110): picture width:640,height:480
D/CameraHardware( 1110): FRAMERATE 15
D/CameraHardware( 1110): Picture Size by CamHAL 640 x 480
D/CameraHardware( 1110): Preview Resolution by CamHAL 640 x 480
D/****CameraHAL( 1110): cameraHal BACK 0
D/****CameraHAL( 1110): cameraHal 0
D/****CameraHAL( 1110): cameraHal BACK 0
D/****CameraHAL( 1110): cameraHal 0
V/camera  ( 1831): Preview size is 640x480
D/CameraHardware( 1110): Set Parameter...!!
D/CameraHardware( 1110): PreviewFormat yuv422sp
D/CameraHardware( 1110): PictureFormat jpeg
D/CameraHardware( 1110): preview width:640,height:480
D/CameraHardware( 1110): picture width:640,height:480
D/CameraHardware( 1110): FRAMERATE 15
D/CameraHardware( 1110): Picture Size by CamHAL 640 x 480
D/CameraHardware( 1110): Preview Resolution by CamHAL 640 x 480
W/****CameraHAL( 1110): ----Preview not Enabled----
V/camera  ( 1831): startPreview
W/****CameraHAL( 1110): ----Preview not Enabled----
E/CameraHardware( 1110): setPreviewWindow
D/****CameraHAL( 1110): Exiting the function
E/CameraHardware( 1110): startPreview
E/V4L2Camera( 1110): Open
D/dalvikvm( 1325): WAIT_FOR_CONCURRENT_GC blocked 1ms
D/CameraHardware( 1110): startPreview width:640,height:480
E/V4L2Camera( 1110): Configure
D/V4L2Camera( 1110): CameraConfigure PreviewFormat: w=640 h=480
E/V4L2Camera( 1110): BufferMap
E/V4L2Camera( 1110): StartStreaming

E/V4L2Camera( 1110): StartStreaming: Unable to start capture: Broken pipe
E/V4L2Camera( 1110): VietHQ: Toi khong muon hien len dong nay!

E/CameraHardware( 1110): Camera StartStreaming fail: Broken pipe
E/V4L2Camera( 1110): Uninit



Why I can't streaming video? Do you know set format color for camera as VGA (640x420), HD720 (1280x720) on driver? When streaming video, hi253 camera driver will run what function?
Help me, i am stucking. thanks for your share.
Regards,
Hoang Quoc Viet.


Vào 04:29:19 UTC+7 Thứ năm, ngày 06 tháng mười một năm 2014, ckkeo đã viết:

ckkeo

unread,
Nov 6, 2014, 10:19:08 AM11/6/14
to android...@googlegroups.com
Tricks: Your kernel traces should be more dynamic to debug a low (realtime) issues, or the early stage of the bootstrap!
           e.g. Disabled IMMEDIATLY the very short & frequent traces ONCE the doubts or fails have been fixed to avoid spam as in your logboot.txt file which made the traces useless for the diagnostic!
                Add traces around the new issues found, this will give you an idea on the direction to focus your searches for the causal of the issues.

Hope this help
Chinda

ckkeo

unread,
Nov 17, 2014, 3:04:24 PM11/17/14
to android...@googlegroups.com
Hi,

Sorry for the late answer, I was working so hard on porting Lollipop.

Related to:

<<<
E/V4L2Camera( 1110): StartStreaming: Unable to start capture: Broken pipe
E/CameraHardware( 1110): Camera StartStreaming fail: Broken pipe
<<<
Several issues may lead to this error:
   1. The video streaming channel cannot be established with the HW. (I2C or // data streaming issues)
   2. Ioctl functions are not correctly implemented.
   3. IPC failed between HAL and its dependent specific implementation.
 
Let's narrow down the problem and start with the driver level part:

a. Check if the V4L2's IOCTL are implemented and supported VIDIOC_STREAMON function.
b. if all IOCTL functions are implemented then check within the (VIDIOC_STREAMON) function if the video streaming channel has been established with the HW correctly.

Please attach your V4L2 drive code here for review.

Hope this help
Chinda

Việt Hoàng

unread,
Feb 25, 2015, 7:31:05 AM2/25/15
to android...@googlegroups.com
Hi Ckkeo,
I comeback for fix that error. Now, no error relative with any V4L2 's IOCTL.
When i click camera app, i cannot get any error but no data from sensor. I certain: it had have data from sensor, i had measure clock from D0-D7, PCLK, HSYN, VSYNC. everything seems standardized with datasheet. I think it cannot get data beacause media pipeline. I change file config omap3_beagle_android_defconfig for disable video via USB by CONFIG_USB_VIDEO_CLASS = false. I get connect seem better:
D/V4L2Camera( 1107): pads for entity 5=
D/V4L2Camera( 1107): (0 INPUT)
D/V4L2Camera( 1107): (1 OUTPUT)
D/V4L2Camera( 1107): (2 OUTPUT)
D/V4L2Camera( 1107): [5:1]===>[6:0]
D/V4L2Camera( 1107):     ACTIVE
D/V4L2Camera( 1107): [5:2]===>[7:0]
D/V4L2Camera( 1107):     INACTIVE
D/V4L2Camera( 1107): [5:1]===>[10:0]
D/V4L2Camera( 1107):     INACTIVE
D/V4L2Camera( 1107): [5:2]===>[13:0]
D/V4L2Camera( 1107):     ACTIVE
D/V4L2Camera( 1107): [5:2]===>[14:0]
D/V4L2Camera( 1107):     ACTIVE
D/V4L2Camera( 1107): [5:2]===>[15:0]
D/V4L2Camera( 1107):     ACTIVE

D/V4L2Camera( 1107): pads for entity 16=
D/V4L2Camera( 1107): (0 OUTPUT)
D/V4L2Camera( 1107): [16:0]===>[5:0]
D/V4L2Camera( 1107):     ACTIVE
But that is not enough.
My issue is howto connect Sensor -> CCDC -> Device as configure media pipeline?
I search and find some advise are use media-ctl for that work, following link: http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/537/t/155456
I will build media-ctl then copy file bin media-ctl to /system/bin/ of my filesystem.
Then, i can use media-ctl tool for configure media pipeline.
I need some advise from you for that issue?
Thank you very much,
Hoang Quoc Viet
Vào 03:04:24 UTC+7 Thứ Ba, ngày 18 tháng 11 năm 2014, ckkeo đã viết:
...
sensor_ccdc_device.txt

Hao Nguyen

unread,
Jun 23, 2014, 6:15:55 AM6/23/14
to android...@googlegroups.com

Việt Hoàng

unread,
Sep 8, 2014, 2:57:13 AM9/8/14
to android...@googlegroups.com
i was stuck there. But i can'n find who help me. haizzzz. So sad.

Vào 17:15:55 UTC+7 Thứ hai, ngày 23 tháng sáu năm 2014, Hao Nguyen đã viết:
I am working on panther board and i want to use hi253 camera module in my board. I've read porting guide on http://processors.wiki.ti.com/index.php/TI-Android-DevKit-Camera_Porting_Guide but i didn't still understand. Can anyone give me some infomation relate to my problems? I have recenty worked on embedded kit so i don't have much knowledge about it. Thanks for reading!!

Braganza Roberts

unread,
Sep 8, 2014, 10:55:13 AM9/8/14
to hoangquoc...@gmail.com, android-porting
Can you list out what problems are you facing?


--

keodouangsy.chinda

unread,
Sep 8, 2014, 5:04:40 PM9/8/14
to android...@googlegroups.com
In clear you have to do these below steps:

------------------------- 
The kernel part
------------------------
1 - Integrate the hi253 device driver into your Panther board kernel
      a - Add the driver source code to your kernel
      b - Configure OMAP to recognize your hi253 camera
      c - Enable the Camera Module to your kernel config
  
     The patch for these steps have been provided in the TI's porting guide at this link : http://processors.wiki.ti.com/images/a/aa/0001-camera-sensor-support-mt9v113-for-beagleboard.patch.gz
     All you have to do is apply the patch to your kernel.

2 - Re-build your kernel

    You can refer to this link for How to build the kernel : http://processors.wiki.ti.com/index.php/TI-Android-FroYo-DevKit-V2_UserGuide#Kernel

----------------------
android part
---------------------
3 - Add the Camera HAL interface to your android plateform

Per TI's porting Guide, the patch is here : http://processors.wiki.ti.com/images/6/6c/0001-HAL-camera-support-added-for-beagleboard.patch.gz
Also per TI's porting guide for Froyo release the patch should be applied at <ANDROID_ROOT>/hardware/ti/omap3/camera, to check on your android plateform development source code the V4L2 part.

4 - Re-build the android system and give a try

Hope this clarified a little bit for you.

Chinda


Le 08/09/2014 08:57, Việt Hoàng a écrit :
--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Việt Hoàng

unread,
Sep 9, 2014, 4:14:33 AM9/9/14
to android...@googlegroups.com
@cckeo
Thank you so much.
1. But i was worried about differrent between panther board and beagleboard. Can you show me clearly issue?
2. And on BSP for PantherBoard supported here: http://59.124.231.13/index.php/JAJ_1.0.DEV04_AP_Module_AM37_Jelly_Bean_Release_Notes. On folder <panther-bsp>/hardware/ti/omap3/camera contains HAL camera. is it true?

Regards,
VietHQ
Do your best, the rest you come!


Vào 17:15:55 UTC+7 Thứ hai, ngày 23 tháng sáu năm 2014, Hao Nguyen đã viết:
I am working on panther board and i want to use hi253 camera module in my board. I've read porting guide on http://processors.wiki.ti.com/index.php/TI-Android-DevKit-Camera_Porting_Guide but i didn't still understand. Can anyone give me some infomation relate to my problems? I have recenty worked on embedded kit so i don't have much knowledge about it. Thanks for reading!!

Việt Hoàng

unread,
Sep 9, 2014, 5:04:39 AM9/9/14
to android...@googlegroups.com
Thank you verry much!
I am clearly steps in integrate process.
I was success re-build kernel that add hi-253 driver. But i don't understand about:

 1 -  Is Hi-253 driver compatibility with HAL camera at patch: http://processors.wiki.ti.com/images/6/6c/0001-HAL-camera-support-added-for-beagleboard.patch.gz
or i have to contact with vendors for HAL camera?
Thank you!

Regards,
VietHQ
Do your best, the rest you come!

Vào 04:04:40 UTC+7 Thứ ba, ngày 09 tháng chín năm 2014, ckkeo đã viết:
In clear you have to do these below steps:

keodouangsy.chinda

unread,
Sep 9, 2014, 12:34:09 PM9/9/14
to android...@googlegroups.com

1 - Did you see anything like <panther-bsp>/hardware/ti/omap3/camera folder?
2 - if not then check where are located these below files in the <panther-bsp>/hardware folder because the Ti's HAL patches against these files:
            . CameraHardware.cpp
            . CameraHardware.h
            . V4L2Camera.cpp
            . V4L2Camera.h

     Based on the link you pointed out, it seems that "<panther-bsp>/hardware/ti/omap3/camera" is the right place.
     The question is, does the existing HAL interface on your plateform matches with the TI's patch , otherwise you need to merge the HAL part manually.
 
Just to check to be sure (maybe should be asked earlier):  How do you physically connect the hi253 into your board today?
Bear in mind that the driver will provide a V4L2 interface to the HAL layer.

Chinda
Cố lên, gần song rổi, :-)
--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

keodouangsy.chinda

unread,
Sep 9, 2014, 12:35:40 PM9/9/14
to android...@googlegroups.com
I just answered your other thread!

Did you have any camera comes with your board today?

Check and locate your existing HAL camera source code. (i.e. Did you see any camera folder within the <panther-bsp>/hardware folder ?)
Sure that it's better if you can get the HAL code from the vendor. (make sure that the HAL can drive the V4L2 driver).

Chinda


Le 09/09/2014 11:04, Việt Hoàng a écrit :

Việt Hoàng

unread,
Sep 10, 2014, 12:32:46 AM9/10/14
to android...@googlegroups.com
Thanks for your reply,
My colleague was successful integrated hi-253 camera module on imx6 sabre board. Because the camera's HAL on imx6 sabre board  differrent with Ti camera's HAL. I have more to do right here. I try.
I will verify to you when i done.
Have a nice day.
Viet Hoang

Vào 23:35:40 UTC+7 Thứ ba, ngày 09 tháng chín năm 2014, ckkeo đã viết:

Việt Hoàng

unread,
Sep 12, 2014, 3:50:13 AM9/12/14
to android...@googlegroups.com
I have checked existing HAL camera on Link that I posted. But on file: V4L2camera.cpp only support 3 sensor camera: mt9v113, mt9t111, tvp514x.
1 - On hi253 driver, it register with v4l2 interface with funtion:
        - v4l2_int_device_register(&hi253_int_device);
2 - On mt9v113 driver, it register with v4l2 inter with 2 functions:
        - /*
     * Register as a subdev
     */
    v4l2_i2c_subdev_init(&mt9v113->subdev, client, &mt9v113_ops);
    mt9v113->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;

    /*
     * Register as media entity
     */
    mt9v113->pad.flags = MEDIA_PAD_FLAG_OUTPUT;
    ret = media_entity_init(&mt9v113->subdev.entity, 1, &mt9v113->pad, 0); f
I don't understand about this different. I am stucking here. Can you show me a solution?
Vào 23:35:40 UTC+7 Thứ ba, ngày 09 tháng chín năm 2014, ckkeo đã viết:

Chinda Keodouangsy

unread,
Sep 14, 2014, 11:00:55 PM9/14/14
to android...@googlegroups.com
That's lead to the question I've asked before, as there are some Hardware dependencies:
        -   *** How do you connect the hi253 camera to your board? 
           Check the vendor document to know on which bus (USB, PCI or i2c) the hi253 used to connect to the system.
           Normally the hi253 code should help you to identify the bus used to connect to the system.

 What is for sure is that the mt9v113 does use i2c bus to connect to the system (e.g. your board).





Le 12/09/2014 09:50, Việt Hoàng a écrit :

Việt Hoàng

unread,
Sep 15, 2014, 11:07:54 PM9/15/14
to android...@googlegroups.com


Thanks for your reply!
1. Here this connector I used. Hi253 Camera connect with DM3730 AP Module through I2C Bus and Parallel Interface (CAM D2,...,CAM D9) as above image.
2. Here Source code Hi253 Driver that I use: https://github.com/allwinner-ics/lichee_linux-3.0/blob/master/drivers/media/video/sun4i_csi/device/hi253.c
Have you give me any advise?

Vào 10:00:55 UTC+7 Thứ hai, ngày 15 tháng chín năm 2014, chinda keodouangsy đã viết:
That's lead to the question I've asked before, as there are some Hardware dependencies:

Chinda Keodouangsy

unread,
Sep 17, 2014, 10:47:10 AM9/17/14
to android...@googlegroups.com
OK, your hi253 driver seems to intialize and drive correctly the i2c and the // data bus.
Can you show me your hi253 HAL code? Do you have it?


Le 16/09/2014 05:07, Việt Hoàng a écrit :

Việt Hoàng

unread,
Sep 17, 2014, 9:42:52 PM9/17/14
to android...@googlegroups.com
Hi cckeo,
I don't have hi253 HAL code. I am editing Camera HAL code that supported by TI (or Jorjin, i uncertain): http://59.124.231.13/index.php/JAJ_1.0.DEV04_AP_Module_AM37_Jelly_Bean_Release_Notes. On folder <panther-bsp>/hardware/ti/omap3/camera.
But i am stucking in here. I am reading and trying to understand code but it is difficult with me. Thanks for your share.
Do you have other idea?
Thanks,
Do your best, the rest you come!
Hoang Quoc Viet.

Vào 21:47:10 UTC+7 Thứ tư, ngày 17 tháng chín năm 2014, chinda keodouangsy đã viết:

ckkeo

unread,
Sep 18, 2014, 10:27:52 AM9/18/14
to android...@googlegroups.com
Check the 3 points below:

a- Your camera driver source code came from hi253 and have been patched against <kernel>/drivers/media/<where, which file>?
     You have to look for the "device node" in this code, the HAL layer will need it to open and access to the Hi253 device driver.
  
b- Your plateform driver (in <kernel>/arch/arm/mach-omap2/xxxxx.c) has been patched:
     Check all gpios are correctly mapped for the Hi253.
     Based on your Ti doc for the panther plateform, the i2c should be OK, but you have to check the schematic for the // bus part.

c - You can start implementing the Hi253 HAL layer inspiring from mt9v113 source code:
     - Open the correct V4L2 device node (check how the device driver (#a) is set for it).
     - Open/Close/Read/Write on V4L2 are quite standard, but NOT the ops (ioctl) which should be handle according to the Hi253 specifications in the camera HAL interface.

 Hope this point you to the right direction.
Chinda

Le jeudi 18 septembre 2014 03:42:52 UTC+2, Việt Hoàng a écrit :

Việt Hoàng

unread,
Oct 19, 2014, 4:24:53 AM10/19/14
to android...@googlegroups.com
Hi cckeo,
I have tried to use i2c-tool for detect, get, set register on hi253 camera but it not work. I use this patch for add hi253 Camera on kernel configure: https://gitorious.org/angstrom/angstrom-linux/commit/046dac666301c0df22679424169675045c70defd
Why i can't detect Camera sensor although i have supported Power sequence, MCLK (24MHz) for it ?


Vào 21:27:52 UTC+7 Thứ năm, ngày 18 tháng chín năm 2014, ckkeo đã viết:

ckkeo

unread,
Oct 20, 2014, 2:13:38 PM10/20/14
to android...@googlegroups.com
In order to help, Please provide more details and attach logs file???

Meanwhile, you can check these below points:

  1 - Does the platform layer apply the correct power level to all sections of the Camera HW?
  2 - Are all appropriated ID information (of the camera) being added to the Device Driver, in order, for the "probe" routine  to correctly detecte and intialize the HW.
  3 - Does the Firmeware (if any) have been downloaded successfully into the HW.
  4 - And finally check if the Device Drive has been successfully loaded by the kernel and the driver has initialized the HW without any errors.

Chinda

Việt Hoàng

unread,
Oct 20, 2014, 8:35:13 PM10/20/14
to ck...@neuf.fr, android...@googlegroups.com
Thanks for your reply,
I have attached files include: hi253.c driver and hi253_log, board-omap3beagle.c (file board config) and board-omap3beagle-camera.c (file init camera).
1. My log give error: isp_register_subdev_group: Unable to register subdev hi253
In isp.c file check board_info and give me this error:
subdev = v4l2_i2c_new_subdev_board(&isp->v4l2_int_device, adapter,
                board_info->board_info, NULL, 1);
        if (subdev == NULL) {
            printk(KERN_ERR "%s: Unable to register subdev %s\n",
                __func__, board_info->board_info->type);
            continue;
        }

        if (first)
            sensor = subdev;

2. hi253 driver use struct v4l2_int_device, i think convert to v4l2_subdev. is it should done?
3. in hi253_write_reg function and hi253_read_reg, i can't read or write to register of hi253. I don't have any solution for this. Please help me.
4. When i can sue i2c_tool get, set, dump, detect hi253 camera ? Only support power and clock( MCLK=24Mhz), that i done but i don't use i2cdump, i2cget, i2cset. It give error: Device bussy.
Thanks,
Viet.
2014-10-20 17:38 GMT+07:00 ckkeo <ck...@neuf.fr>:
You received this message because you are subscribed to a topic in the Google Groups "android-porting" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-porting/_QdxW2HACK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-porti...@googlegroups.com.
hi253_log.txt
hi253(viethq).c
board-omap3beagle.c
board-omap3beagle-camera.c

ckkeo

unread,
Oct 27, 2014, 9:15:08 AM10/27/14
to hoangquoc...@gmail.com, android...@googlegroups.com
Hi,
Sorry for the late answer (holiday in France).

Related to your questions:

#1.  In your log file, I saw the message "omap3_init_camera successful!", but I doubt about this message because if it is really successful then you should able to register the sub i2c subdevice with V4l2 device driver. Narrow down the problem by just comment out all the v4l2 staffs in the platform layer, BUT make sur that all th Camera's ID information are set correctly to see if the Device driver will be loaded (because in your log, I don(t see any message from the camera device driver) by the system and the probe function is called (add as much the printk to check).

There might have 2 potential reasons for your fails:

       a. the Camera's gpios are incorrectly set.
            Check the gpios settings.
            Check the i2c has been configured appropriately for your camera device (e.g type, index, clock, etc ...)
 
       b. the Camera has been initialized too early VS the v4l2 core layer within the plat-form driver.
            If this is the case then all the v4l2 registrations need to be done in the Camara's "device driver" initialization and not in the platform.
       
#2. my comments are in the answer #1-b

#3. The reason that you can't read/write is because the Device Driver has not been loaded and initialized (check answer #1).

#4. All your problems lead to the answer in #1.

Tips:
Don't hesitate to add as much printk in your code (on only just for the status success/failed).

Hope this help.
Chinda

Le 21/10/2014 02:30, Việt Hoàng a écrit :

Việt Hoàng

unread,
Nov 5, 2014, 5:27:09 AM11/5/14
to android...@googlegroups.com, hoangquoc...@gmail.com

Hi cckeo,
Thank you for last your reply,
I get error as follow:
E/V4L2Camera( 1110): StartStreaming: Unable to start capture: Broken pipe
E/CameraHardware( 1110): Camera StartStreaming fail: Broken pipe
When i posting driver hi253 camera, i get device /dev/video2. HAL Camera can open device and read/write register on Camera. But i can't streaming video.
I attacted logboot.txt and logcat.txt. Please help me resolve my issue.
Thanks,
Hoang Quoc Viet.
Vào 20:15:08 UTC+7 Thứ hai, ngày 27 tháng mười năm 2014, ckkeo đã viết:
...
logboot7.txt
logcat_5.txt
Reply all
Reply to author
Forward
0 new messages