gst-launch-1.0 is auto-exposure flag broken ?

Tx2 running on R28.2.1 & custom carrier.

Currently trying to have a IMX-185 from leopard to defined exposure.

Pipeline works on Tx1 but auto-exposure=1 seems to be ignored on Tx2.

If it’s indeed not working on R28.2.1 will updating kernels & drivers to R32.x fix the issue ?

Do you mean aelock?
Please have gst-inspect-1.0 nvcamerasrc to check the parameter.

I am sure the r32.1 is working however the nvcamerasrc are replace with nvarguscamerasrc.

gst-launch-1.0 nvcamerasrc wbmode=9 auto-exposure=1 aeLock=1 exposure-time=0.10 fpsRange="60.0 60.0" \ 
! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)60/1' \
! nvvidconv flip-method=0 ! 'video/x-raw(memory:NVMM), format=(string)I420' ! nvoverlaysink -e

same result, the camera is still selecting exposure time, wbmode=9 (none) forced to check that the error isn’t linked to it to balance update (tested with & without auto-exposure flag).

R32 will have us to redo a kernel & drivers, as unless we missed those:

kernel4-9/driver/media/i2c/imx185.c
kernel4-9/driver/media/i2c/imx185_mode_tbls.h

They don’t exist anymore (?).

Could you also confirm that on kernel4-4:

hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-li-mipi-adpt-a00.dtsi

is now(R32):

hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-imx185-a00.dtsi

in the mean-time we are checking on our hardware if we missed an element.

Could you get the log from below command. And try the nvgstcapture-1.0 if can get what you want.

gst-inspect-1.0 nvcamerasrc

~$ gst-inspect-1.0 nvcamerasrc
Factory Details:
  Rank                     primary (256)
  Long-name                Nvidia Camera Source
  Klass                    Video/Capture
  Description              Nvidia Camera Source
  Author                   Jitendra Kumar <jitendrak@nvidia.com>

Plugin Details:
  Name                     nvcamera
  Description              Nvidia Video Capture Component 
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvcamera.so
  Version                  1.2.0
  License                  Proprietary
  Source module            nvcamera
  Binary package           NvCamera
  Origin URL               http://nvidia.com

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseSrc
                         +----GstNvCameraSrc

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
                 format: { I420, NV12, UYVY }
              framerate: [ 0/1, 2147483647/1 ]


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_nvcamerasrc_change_state

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "nvcamerasrc0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  blocksize           : Size in bytes to read per buffer (-1 = default)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4096 
  num-buffers         : Number of buffers to output before sending EOS (-1 = unlimited)
                        flags: readable, writable
                        Integer. Range: -1 - 2147483647 Default: -1 
  typefind            : Run typefind before negotiating
                        flags: readable, writable
                        Boolean. Default: false
  do-timestamp        : Apply current stream time to buffers
                        flags: readable, writable
                        Boolean. Default: true
  queue-size          : Number of buffers for the driver to enqueue
                        flags: readable, writable
                        Integer. Range: 10 - 100 Default: 10 
  wbmode              : White balance affects the color temperature of the photo
                        flags: readable, writable
                        Enum "GstNvCamWBMode" Default: 1, "auto"
                           (0): off              - GST_NVCAM_WB_MODE_OFF
                           (1): auto             - GST_NVCAM_WB_MODE_AUTO
                           (2): incandescent     - GST_NVCAM_WB_MODE_INCANDESCENT
                           (3): fluorescent      - GST_NVCAM_WB_MODE_FLUORESCENT
                           (4): warm-fluorescent - GST_NVCAM_WB_MODE_WARM_FLUORESCENT
                           (5): daylight         - GST_NVCAM_WB_MODE_DAYLIGHT
                           (6): cloudy-daylight  - GST_NVCAM_WB_MODE_CLOUDY_DAYLIGHT
                           (7): twilight         - GST_NVCAM_WB_MODE_TWILIGHT
                           (8): shade            - GST_NVCAM_WB_MODE_SHADE
                           (9): manual           - GST_NVCAM_WB_MODE_MANUAL
  scene-mode          : property to set scene mode
                        flags: readable, writable
                        Enum "GstNvCamSceneMode" Default: 0, "face-priority"
                           (0): face-priority    - GST_NVCAM_SCENE_MODE_FACE_PRIORITY
                           (1): action           - GST_NVCAM_SCENE_MODE_ACTION
                           (2): portrait         - GST_NVCAM_SCENE_MODE_PORTRAIT
                           (3): landscape        - GST_NVCAM_SCENE_MODE_LANDSCAPE
                           (4): night            - GST_NVCAM_SCENE_MODE_NIGHT
                           (5): night-portrait   - GST_NVCAM_SCENE_MODE_NIGHT_PORTRAIT
                           (6): theatre          - GST_NVCAM_SCENE_MODE_THEATRE
                           (7): beach            - GST_NVCAM_SCENE_MODE_BEACH
                           (8): snow             - GST_NVCAM_SCENE_MODE_SNOW
                           (9): sunset           - GST_NVCAM_SCENE_MODE_SUNSET
                           (10): steady-photo     - GST_NVCAM_SCENE_MODE_STEADYSHOT
                           (11): fireworks        - GST_NVCAM_SCENE_MODE_FIREWORKS
                           (12): sports           - GST_NVCAM_SCENE_MODE_SPORTS
                           (13): party            - GST_NVCAM_SCENE_MODE_PARTY
                           (14): candle-light     - GST_NVCAM_SCENE_MODE_CANDLE_LIGHT
                           (15): barcode          - GST_NVCAM_SCENE_MODE_BARCODE
  color-effect        : property to set color effect
                        flags: readable, writable
                        Enum "GstNvCamColorEffectMode" Default: 1, "off"
                           (1): off              - GST_NVCAM_COLOR_EFFECT_OFF
                           (2): mono             - GST_NVCAM_COLOR_EFFECT_MONO
                           (3): negative         - GST_NVCAM_COLOR_EFFECT_NEGATIVE
                           (4): solarize         - GST_NVCAM_COLOR_EFFECT_SOLARIZE
                           (5): sepia            - GST_NVCAM_COLOR_EFFECT_SEPIA
                           (6): posterize        - GST_NVCAM_COLOR_EFFECT_POSTERIZE
                           (7): aqua             - GST_NVCAM_COLOR_EFFECT_AQUA
  auto-exposure       : property to set auto exposure mode
                        flags: readable, writable
                        Enum "GstNvCamAutoExposureMode" Default: 2, "on"
                           (1): off              - GST_NVCAM_AUTO_EXPOSURE_OFF
                           (2): on               - GST_NVCAM_AUTO_EXPOSURE_ON
                           (3): OnAutoFlash      - GST_NVCAM_AUTO_EXPOSURE_AUTOFLASH
                           (4): OnAlwaysFlash    - GST_NVCAM_AUTO_EXPOSURE_ALWAYSFLASH
                           (5): OnFlashRedEye    - GST_NVCAM_AUTO_EXPOSURE_AUTO_RED_EYE
  flash               : property to set flash mode
                        flags: readable, writable
                        Enum "GstNvCamFlashMode" Default: 0, "off"
                           (0): off              - GST_NVCAM_FLASH_OFF
                           (1): on               - GST_NVCAM_FLASH_ON
                           (2): torch            - GST_NVCAM_FLASH_TORCH
                           (3): auto             - GST_NVCAM_FLASH_AUTO
  flicker             : property to select flicker detection and avoidance mode
                        flags: readable, writable
                        Enum "GstNvCamFlickerMode" Default: 3, "auto"
                           (0): off              - GST_NVCAM_FLICKER_OFF
                           (1): 50Hz             - GST_NVCAM_FLICKER_50HZ
                           (2): 60Hz             - GST_NVCAM_FLICKER_60HZ
                           (3): auto             - GST_NVCAM_FLICKER_AUTO
  contrast            : property to adjust contrast value
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:               0 
  saturation          : property to adjust saturation value
                        flags: readable, writable
                        Float. Range:               0 -               2 Default:               1 
  tnr-strength        : property to adjust temporal noise reduction strength
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:               0 
  tnr-mode            : property to select temporal noise reduction mode
                        flags: readable, writable
                        Enum "GstNvCamTNRMode" Default: 0, "NoiseReduction_Off"
                           (0): NoiseReduction_Off - GST_NVCAM_NR_OFF
                           (1): NoiseReduction_Fast - GST_NVCAM_NR_FAST
                           (2): NoiseReduction_HighQuality - GST_NVCAM_NR_HIGHQUALITY
  edge-enhancement    : property to adjust edge enhnacement value
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:              -1 
  trigger             : property to fire pre capture trigger
                        flags: readable, writable
                        Enum "GstNvCamCaptureTrigger" Default: 0, ""
                           (1): idle             - GST_NVCAM_TRIGGER_IDLE
                           (2): start            - GST_NVCAM_TRIGGER_START
  intent              : property to select capture intent
                        flags: readable, writable
                        Enum "GstNvCamCaptureIntent" Default: 1, "preview"
                           (1): preview          - GST_NVCAM_INTENT_PREVIEW
                           (2): still            - GST_NVCAM_INTENT_STILL
                           (3): video            - GST_NVCAM_INTENT_VIDEO
                           (4): video-snapshot   - GST_NVCAM_INTENT_VIDEO_SNAPSHOT
                           (5): zsl              - GST_NVCAM_INTENT_ZSL
  sensor-id           : Set the id of camera sensor to use. Default 0.)
                        flags: readable, writable
                        Integer. Range: 0 - 255 Default: 0 
  enable-exif         : Return Exif data with captured frame
                        flags: readable, writable
                        Boolean. Default: false
  enable-meta         : Return Sensor meta data with captured frame
                        flags: readable, writable
                        Boolean. Default: false
  aeRegion            : Property to set region of interest for auto exposure.
			 Use GArray, with values of ROI coordinates (top,left,bottom,right)
			 and weight in that order, to set the property.
                        flags: readable, writable
                        Boxed pointer of type "GArray"
  wbRegion            : Property to set region of interest for white balance.
			 Use GArray, with values of ROI coordinates (top,left,bottom,right)
			 and weight in that order, to set the property.
                        flags: readable, writable
                        Boxed pointer of type "GArray"
  fpsRange            : Property to set FPS range.
			 Use string with values of FPS Range (low, high)
			 in that order, to set the property.
                        flags: readable, writable
                        String. Default: null
  exposure-time       : Property to adjust exposure time.
			 This property will have effect only when Exposure mode is Off.
                        flags: readable, writable
                        Float. Range:               0 -    3.402823e+38 Default:           0.033 
  wbManualMode        : Property to set manual mode of White balance.
			 This property will have effect only when wbMode is manual.
                        flags: readable, writable
                        Enum "GstNvCamWBManualMode" Default: 0, "off"
                           (0): off              - GST_NVCAM_WB_MANUAL_OFF
                           (1): reset            - GST_NVCAM_WB_MANUAL_RESET
                           (2): restore          - GST_NVCAM_WB_MANUAL_RESTORE
                           (3): external-gains   - GST_NVCAM_WB_MANUAL_EXTGAINS
  wbGains             : Property to set external white balance Gains.
			 Use GArray, with values of WB gains (R, GR, GB, B)
			 in that order, to set the property.
			 This will have effect only when wbMode is manual.
                        flags: readable, writable
                        Boxed pointer of type "GArray"
  aeLock              : Property to lock auto exposure.
                        flags: readable, writable
                        Boolean. Default: false
  callback            : Property to set user callback. It is required if user wants 
			 to change capture settings per frame. Provide address 
			 of GstNvCamSrcCallbacks type struct as value. 

                        flags: writable
                        Pointer. Write only
  dump-bayer          : Dump raw bayer data in still capture mode.
                        flags: readable, writable
                        Boolean. Default: false
  num-sensors         : Property to get number of sensors.
			 Returns GArray containing number of sensors {usb,csi}

                        flags: readable
                        Boxed pointer of type "GArray"
  surface-layout      : Set the surface layout. Default 0. (0=Blocklinear, 1=Pitch)
                        flags: readable, writable
                        Integer. Range: 0 - 1 Default: 0 
  orientation         : Sensor orientation value. This must be accessed after PAUSED state.
                        flags: readable
                        Integer. Range: 0 - 360 Default: -1 

Element Actions:
  "start-capture" :  void user_function (GstElement* object);
  "stop-capture" :  void user_function (GstElement* object);

here is the log of the command

@Elleryn
I try your command on TX2 with r28.2.1 by using reference ov5693 without problem to set the auto-exposure=1

@ShabeCCC did you actually see the a difference in the output image ?

We can set auto-exposure to off, BUT when setting time-exposure to 0.3 or 0.003 we get the exact same output (i.e. the image should be darker on lower exposure).

Could you confirm on our side that the issue is thus definitely on our driver/camera ?

Thank you

Yes, the image is darker on low light environment.
Can you try on reference sensor board to verify?

@ShaneCCC

I will do so now.
Monday I don’t have the board power supply in this office.