media: i2c: jaguar1: fix compile error and add enum_frame_interval api

Change-Id: I93832e248ee6c2c2efc761d2a3bd2e7cea793fae
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
This commit is contained in:
Jianwei Fan
2023-03-16 03:49:00 +00:00
committed by Tao Huang
parent 3193e78fe5
commit ca99cd1152
2 changed files with 21 additions and 13 deletions

View File

@@ -481,7 +481,6 @@ static int jaguar1_enum_frame_sizes(struct v4l2_subdev *sd,
return 0;
}
static int jaguar1_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_config *cfg)
{
@@ -492,6 +491,22 @@ static int jaguar1_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
return 0;
}
static int jaguar1_enum_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_frame_interval_enum *fie)
{
if (fie->index >= ARRAY_SIZE(jaguar1_framesizes))
return -EINVAL;
fie->code = jaguar1_formats[0].code;
fie->width = jaguar1_framesizes[fie->index].width;
fie->height = jaguar1_framesizes[fie->index].height;
fie->interval = jaguar1_framesizes[fie->index].max_fps;
return 0;
}
static int jaguar1_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *fmt)
@@ -738,6 +753,7 @@ static const struct v4l2_subdev_video_ops jaguar1_video_ops = {
static const struct v4l2_subdev_pad_ops jaguar1_subdev_pad_ops = {
.enum_mbus_code = jaguar1_enum_mbus_code,
.enum_frame_size = jaguar1_enum_frame_sizes,
.enum_frame_interval = jaguar1_enum_frame_interval,
.get_fmt = jaguar1_get_fmt,
.set_fmt = jaguar1_set_fmt,
.get_mbus_config = jaguar1_g_mbus_config,
@@ -938,6 +954,10 @@ static int jaguar1_probe(struct i2c_client *client,
sd = &jaguar1->subdev;
v4l2_i2c_subdev_init(sd, client, &jaguar1_subdev_ops);
ret = jaguar1_initialize_controls(jaguar1);
if (ret) {
dev_err(dev, "Failed to initialize controls jaguar1\n");
return ret;
}
__jaguar1_power_on(jaguar1);
ret = jaguar1_init(i2c_adapter_id(client->adapter));

View File

@@ -204,18 +204,6 @@ void video_input_eq_val_set(video_equalizer_info_s *pvin_eq_set)
__eq_clk_set_value( pvin_eq_set, &eq_value.eq_clk );
__eq_timing_b_set_value( pvin_eq_set, &eq_value.eq_timing_b );
if( AHD20_SD_H960_2EX_Btype_NT_SINGLE_ENDED || AHD20_SD_H960_2EX_Btype_NT_DIFFERENTIAL )
{
}
else if( AHD20_SD_H960_2EX_Btype_PAL_SINGLE_ENDED || AHD20_SD_H960_2EX_Btype_PAL_DIFFERENTIAL )
{
}
else
{
}
printk("[drv_eq]ch::%d >>> fmt::%s\n", ch, eq_value.name);
}
}