Hi,
I am modifying the saLoopBackScale.c example application to include a read_EDID function so that I can scale and output the connected display's preferred resolution. I am trying to use the ioctl calls described in the TI81XX_PSP_HDMI_User Guide (http://processors.wiki.ti.com/index.php/TI81XX_PSP_HDMI_Driver_User_Guide):
- TI81XXHDMI_GET_STATUS- Get current status, whether streaming or not, whether a sync detected or not.
- TI81XXHDMI_READ_EDID - Used to read the EDID of the HDMI sync.
This seems like it should be a simple implementation, but so far each ioctl fails (returns -1).
The existing code in saLoopBackScale.c opens the hdmi display driver (/dev/video1):
disp.fd = open((const char *)DISPLAY_DEVICE, mode);
if (disp.fd == -1) {
printf("failed to open display device\n");
return -1;
}
Then I try to use the disp.fd for my TI81XX_GET_STATUS ioctl
if (ioctl(disp.fd, TI81XXHDMI_GET_STATUS, hdmi_status)) {
printf("Failed to get HDMI status.\n");
exit(2);
}
but this always fails (hdmi_status is an unsigned char). I've tried opening /sys/devices/platform/vpss/display0 instead of /dev/video1 but still with no success.
Can anyone point me in the right direction on this, or to more documentation on these functions?
Thanks in advance,
Aaron