Hi, Currently, the vpfe_capture driver assumes that the S_INPUT is always called. I think this is a wrong assumption to make. I looked at the sample capture example in the v4l2 spec. It doesn't do S_INPUT or S_STD. So I guess there should be a default standard and default input set in the driver. In vpfe_probe() current_subdev is initialized to the first sub device i.e. vpfe_cfg->sub_devs[0]. We are setting the default input to first input on the current_subdev and default standard to first standard supported by the sub device in vpfe_initialize_device(). I think we also need to read the sub device hw interface parameters in this function and set it in ccdc after the ccdc device is opened (isif on DM365). i.e after the the call ccdc_dev->hw_ops.open(), call set_hw_if_params() as well to setup the interface for the default sub device. The set_hw_if_params() in s_input() is required when the application switch the input sub device. Please add this change as well to your patch.
Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com ________________________________ From: Raffaele Recalcati [mailto:lamiapost...@gmail.com] Sent: Monday, April 12, 2010 4:46 AM To: Jean-Philippe François Cc: Karicheri, Muralidharan; davinci-linux-open-source Subject: Re: isif - debugging on dm365 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