I used this pipeline, hoping to set the exposure time specifically to 50 ms through the exposuretimerange="min max"
property.
gst-launch-1.0 nvarguscamerasrc sensor-id=2 sensor-mode=0 exposuretimerange="50000000 50000000" ! nvvidconv ! xvimagesink
I also tried limiting the exposure time to a range instead of specific value, but always above 22 ms. For example, 40 ms to 50 ms with the following pipeline.
gst-launch-1.0 nvarguscamerasrc sensor-id=2 sensor-mode=0 exposuretimerange="40000000 50000000" ! nvvidconv ! xvimagesink
The results are interesting:
- The exposure time does not stay fixed to 50 ms or within the 40-50 ms range. Instead, it varies depending on light conditions.
- The gain value is incremented even though the exposure time has not reached its maximum value.
- The exposure times can go above 50 ms when the room is dark enough, but not with unitary gain.
- The behavior described above only happens when using the
exposuretimerange
property for different values; if the property is not used, then exposure times will not go above 22 ms.
See these logs that the driver’s controls print to the dmesg when limited to min = max = 50 ms
. In the logs you can see that the exposure value requested by the ISP (value
) is stuck at 33 ms, then gain is progressively increased to 8 and then the requested exposure times reach values around 70 ms.
[ 469.227816] ar0820 42-0072: ar0820_set_gain: value 1
[ 469.231109] ar0820 42-0072: ar0820_set_exposure: value= 33330 us, pixclk= 156000000 Hz, ti= 5199480, llpck= 4440, n= 1, cit= 292
[ 469.231118] ar0820 42-0072: ar0820_start_streaming
[ 470.022444] ar0820 42-0072: ar0820_set_gain: value 2
[ 470.073413] ar0820 42-0072: ar0820_set_exposure: value= 33329 us, pixclk= 156000000 Hz, ti= 5199324, llpck= 4440, n= 1, cit= 292
[ 470.172212] ar0820 42-0072: ar0820_set_gain: value 3
[ 470.222402] ar0820 42-0072: ar0820_set_gain: value 4
[ 470.225826] ar0820 42-0072: ar0820_set_exposure: value= 33330 us, pixclk= 156000000 Hz, ti= 5199480, llpck= 4440, n= 1, cit= 292
[ 470.272235] ar0820 42-0072: ar0820_set_gain: value 5
[ 470.322160] ar0820 42-0072: ar0820_set_gain: value 6
[ 470.374285] ar0820 42-0072: ar0820_set_exposure: value= 33329 us, pixclk= 156000000 Hz, ti= 5199324, llpck= 4440, n= 1, cit= 292
[ 470.422241] ar0820 42-0072: ar0820_set_gain: value 7
[ 470.425451] ar0820 42-0072: ar0820_set_exposure: value= 33330 us, pixclk= 156000000 Hz, ti= 5199480, llpck= 4440, n= 1, cit= 292
[ 470.472269] ar0820 42-0072: ar0820_set_gain: value 8
[ 470.475586] ar0820 42-0072: ar0820_set_exposure: value= 35273 us, pixclk= 156000000 Hz, ti= 5502588, llpck= 4440, n= 1, cit= 309
[ 470.523697] ar0820 42-0072: ar0820_set_exposure: value= 38114 us, pixclk= 156000000 Hz, ti= 5945784, llpck= 4440, n= 1, cit= 334
[ 470.573741] ar0820 42-0072: ar0820_set_exposure: value= 40683 us, pixclk= 156000000 Hz, ti= 6346548, llpck= 4440, n= 1, cit= 357
[ 470.623598] ar0820 42-0072: ar0820_set_exposure: value= 45037 us, pixclk= 156000000 Hz, ti= 7025772, llpck= 4440, n= 1, cit= 395
[ 470.673928] ar0820 42-0072: ar0820_set_exposure: value= 47337 us, pixclk= 156000000 Hz, ti= 7384572, llpck= 4440, n= 1, cit= 415
[ 470.723824] ar0820 42-0072: ar0820_set_exposure: value= 47487 us, pixclk= 156000000 Hz, ti= 7407972, llpck= 4440, n= 1, cit= 417
[ 470.773823] ar0820 42-0072: ar0820_set_exposure: value= 47640 us, pixclk= 156000000 Hz, ti= 7431840, llpck= 4440, n= 1, cit= 418
[ 470.823778] ar0820 42-0072: ar0820_set_exposure: value= 47765 us, pixclk= 156000000 Hz, ti= 7451340, llpck= 4440, n= 1, cit= 419
[ 470.873721] ar0820 42-0072: ar0820_set_exposure: value= 47842 us, pixclk= 156000000 Hz, ti= 7463352, llpck= 4440, n= 1, cit= 420
[ 470.926039] ar0820 42-0072: ar0820_set_exposure: value= 48055 us, pixclk= 156000000 Hz, ti= 7496580, llpck= 4440, n= 1, cit= 422
[ 474.573726] ar0820 42-0072: ar0820_set_exposure: value= 44223 us, pixclk= 156000000 Hz, ti= 6898788, llpck= 4440, n= 1, cit= 388
[ 474.623710] ar0820 42-0072: ar0820_set_exposure: value= 41679 us, pixclk= 156000000 Hz, ti= 6501924, llpck= 4440, n= 1, cit= 366
[ 474.673368] ar0820 42-0072: ar0820_set_exposure: value= 40290 us, pixclk= 156000000 Hz, ti= 6285240, llpck= 4440, n= 1, cit= 353
[ 474.727136] ar0820 42-0072: ar0820_set_exposure: value= 39496 us, pixclk= 156000000 Hz, ti= 6161376, llpck= 4440, n= 1, cit= 346
[ 474.773359] ar0820 42-0072: ar0820_set_exposure: value= 39019 us, pixclk= 156000000 Hz, ti= 6086964, llpck= 4440, n= 1, cit= 342
[ 474.823540] ar0820 42-0072: ar0820_set_exposure: value= 39016 us, pixclk= 156000000 Hz, ti= 6086496, llpck= 4440, n= 1, cit= 342
[ 474.873533] ar0820 42-0072: ar0820_set_exposure: value= 39858 us, pixclk= 156000000 Hz, ti= 6217848, llpck= 4440, n= 1, cit= 350
[ 476.623180] ar0820 42-0072: ar0820_set_exposure: value= 43710 us, pixclk= 156000000 Hz, ti= 6818760, llpck= 4440, n= 1, cit= 383
[ 476.673212] ar0820 42-0072: ar0820_set_exposure: value= 51754 us, pixclk= 156000000 Hz, ti= 8073624, llpck= 4440, n= 1, cit= 454
[ 476.723242] ar0820 42-0072: ar0820_set_exposure: value= 63025 us, pixclk= 156000000 Hz, ti= 9831900, llpck= 4440, n= 1, cit= 553
[ 476.773781] ar0820 42-0072: ar0820_set_gain: value 9
[ 476.777372] ar0820 42-0072: ar0820_set_exposure: value= 66660 us, pixclk= 156000000 Hz, ti= 10398960, llpck= 4440, n= 1, cit= 585
[ 476.885188] ar0820 42-0072: ar0820_set_gain: value 11
[ 476.988647] ar0820 42-0072: ar0820_set_gain: value 12
[ 477.090378] ar0820 42-0072: ar0820_set_exposure: value= 66659 us, pixclk= 156000000 Hz, ti= 10398804, llpck= 4440, n= 1, cit= 585
[ 477.188733] ar0820 42-0072: ar0820_set_gain: value 11
[ 477.292571] ar0820 42-0072: ar0820_set_exposure: value= 66660 us, pixclk= 156000000 Hz, ti= 10398960, llpck= 4440, n= 1, cit= 585
[ 477.789928] ar0820 42-0072: ar0820_set_exposure: value= 66659 us, pixclk= 156000000 Hz, ti= 10398804, llpck= 4440, n= 1, cit= 585
[ 477.890267] ar0820 42-0072: ar0820_set_exposure: value= 66660 us, pixclk= 156000000 Hz, ti= 10398960, llpck= 4440, n= 1, cit= 585
[ 482.888555] ar0820 42-0072: ar0820_set_gain: value 12
[ 482.988321] ar0820 42-0072: ar0820_set_gain: value 15
[ 483.092341] ar0820 42-0072: ar0820_set_gain: value 16
[ 483.096154] ar0820 42-0072: ar0820_set_exposure: value= 66976 us, pixclk= 156000000 Hz, ti= 10448256, llpck= 4440, n= 1, cit= 588
[ 483.190176] ar0820 42-0072: ar0820_set_exposure: value= 67217 us, pixclk= 156000000 Hz, ti= 10485852, llpck= 4440, n= 1, cit= 590
[ 483.290390] ar0820 42-0072: ar0820_set_exposure: value= 67428 us, pixclk= 156000000 Hz, ti= 10518768, llpck= 4440, n= 1, cit= 592
[ 483.390495] ar0820 42-0072: ar0820_set_exposure: value= 67751 us, pixclk= 156000000 Hz, ti= 10569156, llpck= 4440, n= 1, cit= 595
[ 483.490890] ar0820 42-0072: ar0820_set_exposure: value= 68118 us, pixclk= 156000000 Hz, ti= 10626408, llpck= 4440, n= 1, cit= 598
[ 483.590979] ar0820 42-0072: ar0820_set_exposure: value= 68474 us, pixclk= 156000000 Hz, ti= 10681944, llpck= 4440, n= 1, cit= 601
[ 483.691156] ar0820 42-0072: ar0820_set_exposure: value= 68851 us, pixclk= 156000000 Hz, ti= 10740756, llpck= 4440, n= 1, cit= 604
[ 483.791848] ar0820 42-0072: ar0820_set_exposure: value= 69300 us, pixclk= 156000000 Hz, ti= 10810800, llpck= 4440, n= 1, cit= 608
[ 483.891778] ar0820 42-0072: ar0820_set_exposure: value= 69831 us, pixclk= 156000000 Hz, ti= 10893636, llpck= 4440, n= 1, cit= 613
[ 483.992743] ar0820 42-0072: ar0820_set_exposure: value= 70406 us, pixclk= 156000000 Hz, ti= 10983336, llpck= 4440, n= 1, cit= 618
[ 484.092868] ar0820 42-0072: ar0820_set_exposure: value= 71014 us, pixclk= 156000000 Hz, ti= 11078184, llpck= 4440, n= 1, cit= 623
[ 484.193447] ar0820 42-0072: ar0820_set_exposure: value= 71780 us, pixclk= 156000000 Hz, ti= 11197680, llpck= 4440, n= 1, cit= 630
[ 484.294124] ar0820 42-0072: ar0820_set_exposure: value= 72554 us, pixclk= 156000000 Hz, ti= 1131842
So we seem to have taken a step forward, but the cause of the issue is still not clear. Evidently, the ISP’s autoexposure can request values greater than 22 ms, which we could not do before, but only when using the exposuretimerange
property (and this range is not even respected).
Does this give you more clues towards the issue?