英特尔xmm6321平台camera闪光灯相关记录


一、查看硬件闪光灯pin脚

二、修改相关pin脚功能

\linux\kernel\arch\arm\mach-xgold\include\mach\xgold_pinctrl\pcl_hal_cfg_xmm6321a2_es2_rk_tablet_sdk_v1.1.h

/* PCL_PAD_DIF_D7 (52) */
	{ 64, // GPIO_064
		{	{	PCL_HW_GPIO,  PCL_ENABLE | PCL_NO_PUPD | PCL_PUSH_PULL | PCL_DRV_CLASS_E | PCL_RESET_ALL |PCL_GPIO | PCL_GPIO_OUT | PCL_GPIO_D1, },
			{	PCL_HW_GPIO,  PCL_ENABLE | PCL_NO_PUPD | PCL_PUSH_PULL | PCL_DRV_CLASS_E | PCL_RESET_ALL |PCL_GPIO | PCL_GPIO_OUT | PCL_GPIO_D0, },
			{	PCL_HW_GPIO,  PCL_ENABLE | PCL_PU | PCL_PUSH_PULL | PCL_DRV_CLASS_E | PCL_RESET_ALL |PCL_GPIO | PCL_GPIO_IN  | PCL_GPIO_D0, }, }, },

三、控制该pin脚

linux\kernel\arch\arm\plat-xgold\dev-lcd-bl-tablet.c

int xgold_set_flash(int intensity)
{
	int ret;
	unsigned long pcl_state;

	pr_err("%s Enter intensity=%d\n", __func__,intensity);

	intensity ? (pcl_state = pcl_deactivate) : (pcl_state = pcl_activate);

	ret = pin_config_set("xmm6310-pinctrl", "PCL_PAD_DIF_D7",
								pcl_state);
	pr_debug("%s Exit\n", __func__);

	return 0;
}
EXPORT_SYMBOL_GPL(xgold_set_flash);


说明:
1.如果闪两下觉得不妥,可以修改

linux\kernel\drivers\media\video\xgold\xgold-v4l2.c

int update_mi_mp(struct xgold_v4l2_device *xgold_v4l2)
{
	struct xgold_hardware *xgold_hw = &xgold_v4l2->xgold_hw;
	struct marvinconfig *marvin_config = &xgold_hw->marvin_config;
	int ret = 0;

	if (marvin_config->jpeg_config.enable) {
		/* in case of jpeg encoding, we don't have to disable the
		   MI, because the encoding
		   anyway has to be started explicitely */
		if (!marvin_config->jpeg_config.busy) {
			if ((xgold_hw->mp_dma_add ==
				 marvin_config->mi_config.mp.y_base)
				 && (xgold_hw->mp_dma_add !=
				marvin_config->mi_config.null_buff_dma_addr)) {
#ifdef CONFIG_CAMERA_FLASH_SUPPORT
				//if (xgold_hw->xgold_flash_enable == FLASH_ON)
					//xgold_set_flash(1);//去掉此句,
#endif

2.闪光灯延迟时间调整
Y:\work\bak-xmm6321\kitkat\hardware\intel\libcamera_native\Camera.h
#define CAMERA_PRE_SHOT_FLASH_US (1000 * 1000)


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值