summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-07-16 18:01:14 -0700
committerGeoff Levand <geoffrey.levand@am.sony.com>2007-07-16 18:01:14 -0700
commit26ad9a4d111154028ce8aaffbb3216cb6b9f7fa1 (patch)
treeb05f95cf2f99ed59583ab3feaba89d8507230625
parent57c7ee5034eceac9b643ee13abe21221f62f1396 (diff)
downloadps3-utils-26ad9a4d111154028ce8aaffbb3216cb6b9f7fa1.tar.gz
lib/ps3-av.h: new file, move HAVE_DECL_PS3AV_MODE's to libps3-av.h.
-rw-r--r--configure.ac5
-rw-r--r--lib/configure.ac5
-rw-r--r--lib/ps3-av.h47
-rw-r--r--ps3-video-mode.c22
4 files changed, 53 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index 6648126..8bca71a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,11 +42,6 @@ AM_INIT_AUTOMAKE
AC_SUBST(DESTDIR)
-AC_CHECK_HEADERS([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/lib/configure.ac b/lib/configure.ac
index 7acd06c..d012f2b 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -44,6 +44,11 @@ AM_INIT_AUTOMAKE
AC_SUBST(DESTDIR)
+AC_CHECK_HEADERS([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/lib/ps3-av.h b/lib/ps3-av.h
new file mode 100644
index 0000000..1d0e202
--- /dev/null
+++ b/lib/ps3-av.h
@@ -0,0 +1,47 @@
+/*
+ * PS3 AV settings.
+ *
+ * Copyright (C) 2006 Sony Computer Entertainment Inc.
+ * Copyright 2006 Sony Corp.
+ *
+ * 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.
+ *
+ * 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(_B9AAF29B_E200_4804_82F1_A8EAC824F1F5_H)
+#define _B9AAF29B_E200_4804_82F1_A8EAC824F1F5_H
+
+#if defined(HAVE_ASM_PS3AV_H)
+#include <asm/ps3av.h>
+#endif
+
+#if !defined(HAVE_DECL_PS3AV_MODE_RGB) || !HAVE_DECL_PS3AV_MODE_RGB
+#define PS3AV_MODE_RGB 0x0020
+#endif
+#if !defined(HAVE_DECL_PS3AV_MODE_FULL) || !HAVE_DECL_PS3AV_MODE_FULL
+#define PS3AV_MODE_FULL 0x0080
+#endif
+#if !defined(HAVE_DECL_PS3AV_MODE_WHITE) || !HAVE_DECL_PS3AV_MODE_WHITE
+#define PS3AV_MODE_WHITE 0x0200
+#endif
+#if !defined(HAVE_DECL_PS3AV_MODE_COLOR) || !HAVE_DECL_PS3AV_MODE_COLOR
+#define PS3AV_MODE_COLOR 0x0400
+#endif
+#if !defined(HAVE_DECL_PS3AV_MODE_DITHER) || !HAVE_DECL_PS3AV_MODE_DITHER
+#define PS3AV_MODE_DITHER 0x0800
+#endif
+#if !defined(HAVE_DECL_PS3AV_MODE_HDCP_OFF) || !HAVE_DECL_PS3AV_MODE_HDCP_OFF
+#define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 doesn't support this */
+#endif
+
+#endif
diff --git a/ps3-video-mode.c b/ps3-video-mode.c
index 4d66775..249617c 100644
--- a/ps3-video-mode.c
+++ b/ps3-video-mode.c
@@ -31,27 +31,7 @@
#include <stdint.h>
#include <sys/ioctl.h>
-#if defined(HAVE_ASM_PS3AV_H)
-#include <asm/ps3av.h>
-#endif
-#if !defined(HAVE_DECL_PS3AV_MODE_RGB) || !HAVE_DECL_PS3AV_MODE_RGB
-#define PS3AV_MODE_RGB 0x0020
-#endif
-#if !defined(HAVE_DECL_PS3AV_MODE_FULL) || !HAVE_DECL_PS3AV_MODE_FULL
-#define PS3AV_MODE_FULL 0x0080
-#endif
-#if !defined(HAVE_DECL_PS3AV_MODE_WHITE) || !HAVE_DECL_PS3AV_MODE_WHITE
-#define PS3AV_MODE_WHITE 0x0200
-#endif
-#if !defined(HAVE_DECL_PS3AV_MODE_COLOR) || !HAVE_DECL_PS3AV_MODE_COLOR
-#define PS3AV_MODE_COLOR 0x0400
-#endif
-#if !defined(HAVE_DECL_PS3AV_MODE_DITHER) || !HAVE_DECL_PS3AV_MODE_DITHER
-#define PS3AV_MODE_DITHER 0x0800
-#endif
-#if !defined(HAVE_DECL_PS3AV_MODE_HDCP_OFF) || !HAVE_DECL_PS3AV_MODE_HDCP_OFF
-#define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 doesn't support this */
-#endif
+#include "ps3-av.h"
#define PS3_UTILS_APP_NAME "ps3-video-mode"