Is There a parameter for enable/disable the TX2 on-board camera?

Not sure what you want to do…

If you want to disable the onboard camera for saving power I cannot give good advices.

If you just want to use the onboard camera:

Note that sensor OV5693 is sending bayer frames in several resolutions, mainly:
1. 2592 x 1944 @30fps (4:3)
2. 2592 x 1458 @30fps (16:9)
3. 1280 x 720 @120fps (16:9)
4. 1920 x 1080 @30fps (16:9)

There are several ways for using it:

  • With gstreamer : use plugin nvcamerasrc as video source. This plugin will autoconfigure the camera (first frames may be dark), debayer frames, scale if requested, and provide as I420 or NV12 format into NVMM memory (for ISP or GPU access). For example
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), format=I420, width=640, height=480, framerate=30/1' ! nvvidconv ! 'video/x-raw' ! xvimagesink

This pipeline uses plugin nvvidconv for sending into cpu memory to be used by video sink plugin xvimagesink. There are other video sink plugins you might try such as nveglglessink or nvoverlaysink. Searching this forum you can find many examples. AFAIK, you cannot use v4l2src plugin, because this plugin only accepts 8 bits bayer frames and currently only 10bits bayer frames can be received from CSI with onboard camera, although it may work with USB cameras sending 8 bits rggb frames.

  • With V4L2 API. This is not the easy way. If you want to have full control from bayer frames you may get it but I suspect some (maybe a lot) extra work. For a quick look at what you can get, I would suggest to install qv4l2 and v4l-utils:
sudo apt-get install qv4l2 v4l-utils

and try first qv4l2. Note that you have to select 10 bits modes (BG10 is a bit yellow, while RG10 is very blue). For resolution use 720p or 1080p.
Start capture, colors may be weird, you will have to go to camera control tabfolder and adjust the gain manually for getting it.

Note also the control just below gain: the bypass mode should be 0. If you activate it, then it may interfere with nvcamera-deamon that is used by nvcamerasrc gstreamer plugin and would lead to failures. Note that nvcamera-deamon activates it, so be sure to deactivate it for using V4L interface after nvcamera-deamon is no longer used.

If you want to get frames from command line, you may use something like:

v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=BG10 --stream-mmap -d /dev/video0 --set-ctrl bypass_mode=0

or if you want save 300 first frames to file:

v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=BG10 --stream-mmap -d /dev/video0 --set-ctrl bypass_mode=0 --stream-count=300 --stream-to=ov5693.raw

Note the latter command with 300 frames would use more than 600MB on your disk.

  • With tegra multimedia API. Have a look to samples in your /home/nvidia directory.