Skip to content
Permalink
Browse files

RaspiVid: Print message stating TC358743 drivers are unsupported (#437)

Support requests for the TC358743 are getting annoying, so
state that the drivers are unsupported, and are there on an
as-is basis.
  • Loading branch information
6by9 committed Nov 3, 2017
1 parent d819af5 commit 20ecf5c83dec5b0b084bd3f4dc38c556c3430b1a
Showing with 35 additions and 0 deletions.
  1. +35 −0 host_applications/linux/apps/raspicam/RaspiVid.c
@@ -449,6 +449,39 @@ static void default_status(RASPIVID_STATE *state)
raspicamcontrol_set_defaults(&state->camera_parameters);
}

static void check_camera_model(int cam_num)
{
MMAL_COMPONENT_T *camera_info;
MMAL_STATUS_T status;

// Try to get the camera name
status = mmal_component_create(MMAL_COMPONENT_DEFAULT_CAMERA_INFO, &camera_info);
if (status == MMAL_SUCCESS)
{
MMAL_PARAMETER_CAMERA_INFO_T param;
param.hdr.id = MMAL_PARAMETER_CAMERA_INFO;
param.hdr.size = sizeof(param)-4; // Deliberately undersize to check firmware version
status = mmal_port_parameter_get(camera_info->control, &param.hdr);

if (status != MMAL_SUCCESS)
{
// Running on newer firmware
param.hdr.size = sizeof(param);
status = mmal_port_parameter_get(camera_info->control, &param.hdr);
if (status == MMAL_SUCCESS && param.num_cameras > cam_num)
{
if (!strncmp(param.cameras[cam_num].camera_name, "toshh2c", 7))
{
fprintf(stderr, "The driver for the TC358743 HDMI to CSI2 chip you are using is NOT supported.\n");
fprintf(stderr, "They were written for a demo purposes only, and are in the firmware on an as-is\n");
fprintf(stderr, "basis and therefore requests for support or changes will not be acted on.\n\n");
}
}
}

mmal_component_destroy(camera_info);
}
}

/**
* Dump image state parameters to stderr.
@@ -2516,6 +2549,8 @@ int main(int argc, const char **argv)
dump_status(&state);
}

check_camera_model(state.cameraNum);

// OK, we have a nice set of parameters. Now set up our components
// We have three components. Camera, Preview and encoder.

0 comments on commit 20ecf5c

Please sign in to comment.
You can’t perform that action at this time.