Is it possible to change resolution of sensor capture dynamically by running app.

Hi, all.
We are trying to dynamically change the resolution of video captured by sensor.

At first, we use a character device node to transfer parameters(such as width, height, clk_freq, and pixel_format ...) to driver struct camera_common_data. 

And then call function of tc358748_probe to register above parameters and also change register table of tc358748.

The driver of tc358748 is based on ov5693.

But we failed. We can succeed dynamically changing the register table of tc358748 , and it can taken into effect.  The parameters of struct camera_common_data we change by system app  can't work effective.

At last we learned from this forum  that camera driver is not loadable.

That means method of dynamic change capture resolution of sensor is not possible, right?

Is there a way to change capture resolution dynamically?

Thanks.

I believe it’s possible but it’s could need lot work for the APP.
You need stop stream and then change the resolution then start stream …

Hi, ShaneCCC.

At preset, we just succeed changing the register of tc358748 in driver.

But we can’t make parameters like width, height, clk_freq, and pixel_format work normally in driver.

For example , we originally capture 1080p video. The we want to change to capture 1280x768@25 video.

Now, on system app we just achieve changing relative register table of tc358748, but failure of change camera_common_data parameters in driver.

So we can’t capture normal video.

Have you report both of the sensor mode?
If yes you should be able find it by v4l2-ctl --list-formats-ext

Hi, ShaneCCC

I am sorry for knowing little about v4l2.

That’s to say if I write all sensor mode in Mode tables of sensor_mode_tbls.h,

then I can use v4l2-ctl command to change resolution on system level.

I don’t need to care about default parameters of struct camera_common_data initialed in function tc358748_probe .