I suppose it does not work, because isif_set_hw_if params is only called
if the user applications is doing a VIDIOC_S_INPUT.

based on your log, it seems gstreamer does not do that.

I don't know if the driver or the application should be corrected.
May be there is a command switch to gstreamer that allows to specify an input ?
Raffaele Recalcati a écrit :
Hi Jean-Philippe,

I finally create my patch against f5cef8f45739db4c0c1c346296922cac274c87eb in attachment, but the problem is that isif_set_hw_if_params is not called by gstreamer.

If I set in drivers/media/video/davinci/isif.c (and not in drivers/media/video/davinci/dm365_ccdc.c as I don't have it !!) 'ycswap=YCIN_NOT_SWP' it works !!

The board file has no effect on my gstreamer command:
   gst-launch v4l2src ! video/x-raw-yuv ! filesink location=video_new3.raw
see below for my complete logs.

Here you are the board declaration:
static struct vpfe_subdev_info vpfe_sub_devs[] = {
        {
                .name = "adv7180",
                .grp_id = 0,
                .num_inputs = ARRAY_SIZE(adv7180_inputs),
                .inputs = adv7180_inputs,
                .routes = adv7180_routes,
                .can_route = 1,
                .ccdc_if_params = {
                        .if_type = VPFE_BT656,
                        .hdpol = VPFE_PINPOL_POSITIVE,
                        .vdpol = VPFE_PINPOL_POSITIVE,
                        .ycswap = YCIN_NOT_SWP,
                },
                .board_info = {
                        I2C_BOARD_INFO("adv7180", 0x20),
                        .platform_data = &adv7180_pdata,
                },
        },
};

The patch is very similar to yours, I change only the name of defines because they seem more clear to me.

The complete log (setting ycswap=YCIN_SWP inside isif.c file in order to try to get the correct parameter from my board file) follows:
(isif_set_hw_if_params is not called)

r...@dm365-evm:~# gst-launch v4l2src ! video/x-raw-yuv ! filesink location=video
_new3.raw
Setting pipeline to PAUSED ...
vpfe-capture vpfe-capture: vpfe_open
vpfe-capture vpfe-capture: vpfe_querycap
vpfe-capture vpfe-capture: vpfe_enum_input
vpfe-capture vpfe-capture: vpfe_enum_input
vpfe-capture vpfe-capture: input information not found for the subdev
vpfe-capture vpfe-capture: vpfe_g_std
vpfe-capture vpfe-capture: vpfe_g_input
vpfe-capture vpfe-capture: vpfe_enum_fmt_vid_cap
vpfe-capture vpfe-capture: vpfe_enum_fmt_vid_cap
vpfe-capture vpfe-capture: vpfe_enum_fmt_vid_cap
vpfe-capture vpfe-capture: vpfe_try_fmt_vid_cap
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: vpfe_try_fmt_vid_cap
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
vpfe-capture vpfe-capture: vpfe_try_fmt_vid_cap
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: vpfe_try_fmt_vid_cap
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
vpfe-capture vpfe-capture: vpfe_g_fmt_vid_cap
vpfe-capture vpfe-capture: vpfe_s_fmt_vid_cap
vpfe-capture vpfe-capture: width = 720, height = 480, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
vpfe-capture vpfe-capture: vpfe_g_std
vpfe-capture vpfe-capture: vpfe_reqbufs
vpfe-capture vpfe-capture: vpfe_buffer_setup
vpfe-capture vpfe-capture: count=3, size=1147200
vpfe-capture vpfe-capture: vpfe_querybuf
vpfe-capture vpfe-capture: vpfe_mmap
vpfe-capture vpfe-capture: vpfe_querybuf
vpfe-capture vpfe-capture: vpfe_mmap
vpfe-capture vpfe-capture: vpfe_querybuf
vpfe-capture vpfe-capture: vpfe_mmap
vpfe-capture vpfe-capture: vpfe_qbuf
vpfe-capture vpfe-capture: vpfe_buffer_prepare
vpfe-capture vpfe-capture: vpfe_qbuf
vpfe-capture vpfe-capture: vpfe_buffer_prepare
vpfe-capture vpfe-capture: vpfe_qbuf
vpfe-capture vpfe-capture: vpfe_buffer_prepare
vpfe-capture vpfe-capture: vpfe_streamon
vpfe-capture vpfe-capture: vpfe_buffer_queue
vpfe-capture vpfe-capture: vpfe_buffer_queue
vpfe-capture vpfe-capture: vpfe_buffer_queue
vpfe-capture vpfe-capture: vpfe_calculate_offsets
isif_config_ycbcr - if_type = 0
isif_config_ycbcr - ycswap = 1
isif_config_ycbcr -924
isif_config_ycbcr -927
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
vpfe-capture vpfe-capture: vpfe_poll
New clock: GstSystemClock




2010/4/7 Jean-Philippe François <jp.franc...@cynove.com <mailto:jp.franc...@cynove.com>>

    Raffaele Recalcati a écrit :

        I was adding isif_cfg.y_c_swap variable, but it need a
        modification inside arch/arm/mach-davinci/dm365.c that I think
        is not the right direction.
        I mean, the "isif" platform data is not board related, but it is
        cpu related.


    sensor or decoder connection to the isif is definitely board related.

    the ccdc_if_params field of the vpfe_subdev_info struct is used by
    the ccdc code in the ccdc_set_hw_if_params function.

    Here is a patch that implement an ycswap field.
    It is set in the board file, and used in the ccdc driver.
    It does only include the dm365 ccdc, but it can be extended.






--
www.opensurf.it <http://www.opensurf.it>

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to