diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-06-01 11:45:06 -0700 |
---|---|---|
committer | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-06-01 11:45:06 -0700 |
commit | 3bacdff92946dfcac98d79d4f3a0486e9f4ff5ea (patch) | |
tree | 9aab88c54a1a8a12e518dbafa83f660b6999592b | |
parent | bc0db4c9957781446c80972f27bfe497584d605b (diff) | |
download | ps3-utils-3bacdff92946dfcac98d79d4f3a0486e9f4ff5ea.tar.gz |
Add support for HDMI RGB Full Range.
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | ps3videomode.c | 58 |
2 files changed, 44 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index cda7f40..9306614 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -AC_INIT(ps3-utils, 2.0.0, geoffrey.levand@am.sony.com) +AC_INIT(ps3-utils, 2.0.1, geoffrey.levand@am.sony.com) # Setup the prefix options. AC_PREFIX_DEFAULT(/usr/local) @@ -43,7 +43,9 @@ AM_INIT_AUTOMAKE AC_SUBST(DESTDIR) AC_CHECK_HEADERS([asm/ps3av.h]) -AC_CHECK_DECLS([PS3AV_MODE_RGB, PS3AV_MODE_FULL, PS3AV_MODE_DITHER, PS3AV_MODE_HDCP_OFF], [], [], [#include <asm/ps3av.h>]) +AC_CHECK_DECLS([PS3AV_MODE_RGB, PS3AV_MODE_FULL, PS3AV_MODE_WHITE, \ + PS3AV_MODE_COLOR, PS3AV_MODE_DITHER, PS3AV_MODE_HDCP_OFF], [], [], + [#include <asm/ps3av.h>]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile ]) diff --git a/ps3videomode.c b/ps3videomode.c index 1330d4c..eb21699 100644 --- a/ps3videomode.c +++ b/ps3videomode.c @@ -1,18 +1,21 @@ /* - * Copyright (C) 2006 Sony Computer Entertainment Inc. + * PS3 video mode utility. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published - * by the Free Software Foundation; version 2 of the License. + * Copyright (C) 2007 Sony Computer Entertainment Inc. + * Copyright 2007 Sony Corp. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if defined(HAVE_CONFIG_H) @@ -28,13 +31,26 @@ #include <stdint.h> #include <sys/ioctl.h> -#if defined(HAVE_ASM_PS3AV_H) && defined(HAVE_DECL_PS3AV_MODE_DITHER) && HAVE_DECL_PS3AV_MODE_DITHER +#if defined(HAVE_ASM_PS3AV_H) #include <asm/ps3av.h> -#else -#define PS3AV_MODE_DITHER 0x0800 -#define PS3AV_MODE_FULL 0x0080 -#define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */ -#define PS3AV_MODE_RGB 0x0020 +#endif +#if !defined(HAVE_DECL_PS3AV_MODE_RGB) +#define PS3AV_MODE_RGB 0x0020 +#endif +#if !defined(HAVE_DECL_PS3AV_MODE_FULL) +#define PS3AV_MODE_FULL 0x0080 +#endif +#if !defined(HAVE_DECL_PS3AV_MODE_WHITE) +#define PS3AV_MODE_WHITE 0x0200 +#endif +#if !defined(HAVE_DECL_PS3AV_MODE_COLOR) +#define PS3AV_MODE_COLOR 0x0400 +#endif +#if !defined(HAVE_DECL_PS3AV_MODE_DITHER) +#define PS3AV_MODE_DITHER 0x0800 +#endif +#if !defined(HAVE_DECL_PS3AV_MODE_HDCP_OFF) +#define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 doesn't support this */ #endif #define FB_NAME "/dev/fb0" @@ -47,6 +63,7 @@ struct option long_options[] = { { "video" , 1, NULL, 'v' }, /* video mode */ { "rgb" , 0, NULL, 'r' }, /* RGB color space */ { "full" , 0, NULL, 'f' }, /* full screen mode */ + { "color" , 0, NULL, 'c' }, /* HDMI full range */ { "dither", 0, NULL, 'd' }, /* dither ON */ { "hdcp" , 0, NULL, 'H' }, /* HDCP OFF, Retail PS3 product doesn't support this */ { NULL , 0, NULL, 0 } @@ -62,6 +79,7 @@ static void usage(void) " --help, -h print this message\n" " --video, -v <ID> set video mode ID\n" " --full, -f use full screen mode\n" + " --color, -c use HDMI full range\n" " --dither,-d use dither ON mode\n" "\n" "Video mode ID:\n" @@ -90,7 +108,7 @@ int main(int argc, char *argv[]) int vid = -1; int opt = 0; - while((c = getopt_long(argc, argv, "hv:rfdH", long_options, NULL)) + while((c = getopt_long(argc, argv, "hv:rfcdH", long_options, NULL)) != EOF) { switch(c) { case 'v': @@ -102,6 +120,10 @@ int main(int argc, char *argv[]) case 'f': opt |= PS3AV_MODE_FULL; break; + case 'c': + opt |= PS3AV_MODE_COLOR; + opt |= PS3AV_MODE_WHITE; + break; case 'd': opt |= PS3AV_MODE_DITHER; break; |