aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/pvr250
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-10-15 20:12:15 +0800
committeredwin <edwin@FreeBSD.org>2004-10-15 20:12:15 +0800
commit70f15ed6d19caba96fb847de376f46c857086498 (patch)
tree6f0d6cca2ed8a7884919fefb608bad92cbef94a0 /multimedia/pvr250
parentf3e9752971e4081c8abc0d2c19d3120c1317313b (diff)
downloadfreebsd-ports-gnome-70f15ed6d19caba96fb847de376f46c857086498.tar.gz
freebsd-ports-gnome-70f15ed6d19caba96fb847de376f46c857086498.tar.zst
freebsd-ports-gnome-70f15ed6d19caba96fb847de376f46c857086498.zip
Submit a lkm for the cxm device, found in the Hauppauge PVR-250/350
TV cards. This port contains: - Drivers for the Conexant MPEG-2 Codec driver which can be found on the Hauppauge PVR-250/350 TV cards. These drivers are (c) John Wehle <john@feith.com> On FreeBSD 4.x, the device used is /dev/bktr0. On FreeBSD 5.x, the device used is /dev/cxm0 This driver has been successfully tested on: - FreeBSD 4.10 - FreeBSD 5.2.1 - Two simple programs to modify some ioctls on the card: set the channel and set the window size. Note: - The configuration screen is only applicable for the the Philips FQ1216M tuner. For other tuners ignore this section. Select just one entry. - Note: the maintainer of this port has no inside knowledge of the workings of this software. Please don't contact me about cards which don't work. Please contact me about problems with the port, with possible enhancements, with success stories. Author: John Wehle <john@feith.com> Submitted by: edwin@mavetju.org
Diffstat (limited to 'multimedia/pvr250')
-rw-r--r--multimedia/pvr250/Makefile115
-rw-r--r--multimedia/pvr250/distinfo4
-rw-r--r--multimedia/pvr250/files/patch-modules::cxm::cxm::Makefile9
-rw-r--r--multimedia/pvr250/files/patch-modules::cxm::cxm_iic::Makefile9
-rw-r--r--multimedia/pvr250/files/patchtuner-bgaustralia11
-rw-r--r--multimedia/pvr250/files/patchtuner-bgbroadcast11
-rw-r--r--multimedia/pvr250/files/patchtuner-ibroadcast11
-rw-r--r--multimedia/pvr250/files/patchtuner-lbroadcast11
-rw-r--r--multimedia/pvr250/files/patchtuner-usbroadcast11
-rw-r--r--multimedia/pvr250/files/patchtuner-uscable11
-rw-r--r--multimedia/pvr250/pkg-descr28
-rw-r--r--multimedia/pvr250/pkg-message29
-rw-r--r--multimedia/pvr250/pkg-plist2
13 files changed, 262 insertions, 0 deletions
diff --git a/multimedia/pvr250/Makefile b/multimedia/pvr250/Makefile
new file mode 100644
index 000000000000..d36db169173e
--- /dev/null
+++ b/multimedia/pvr250/Makefile
@@ -0,0 +1,115 @@
+#
+# New ports collection makefile for: pvr250
+# Date created: 10 October 2004
+# Whom: Edwin Groothuis <edwin@mavetju.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pvr250
+PORTVERSION= 200408
+CATEGORIES= multimedia
+MASTER_SITES= http://www.mavetju.org/download/adopted/
+DISTFILES= cxm-200408.shar hcwPVRP2.sys
+
+MAINTAINER= edwin@mavetju.org
+COMMENT= Hauppauge PVR-250/260 TV cards driver for the cxm device
+
+WRKSRC= ${WRKDIR}
+
+RESTRICTED_FILES= hcwPVRP2.sys
+RESTRICTED= "This port uses a binary driver which is owned by Hauppauge"
+NO_PACKAGE= ${RESTRICTED}
+NO_CDROM= ${RESTRICTED}
+
+OPTIONS= USBROADCAST "US Broadcast" Off \
+ USCABLE "US Cable" Off \
+ BGBROADCAST "B/G Broadcast" Off \
+ BGAUSTRALIA "B/G Australia" Off \
+ IBROADCAST "I Broadcast" Off \
+ LBROADCAST "L Broadcast" Off
+
+pre-everything::
+ @${ECHO_CMD} "Some tuners (for example the Philips FQ1216M) supports multiple standards."
+ @${ECHO_CMD} "Use the following configuration screen (or 'make config') to choose your local TV channel system if you have such a tuner."
+ @${ECHO_CMD} "At this moment only the Philips FQ1216M is known to do this. If you don't have one, just ignore it. If you have one, select one (1) entry."
+ @sleep 5
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_USBROADCAST)
+EXTRA_PATCHES= ${FILESDIR}/patchtuner-usbroadcast
+.endif
+.if defined(WITH_USCABLE)
+EXTRA_PATCHES= ${FILESDIR}/patchtuner-uscable
+.endif
+.if defined(WITH_BGBROADCAST)
+EXTRA_PATCHES= ${FILESDIR}/patchtuner-bgbroadcast
+.endif
+.if defined(WITH_BGAUSTRALIA)
+EXTRA_PATCHES= ${FILESDIR}/patchtuner-bgaustralia
+.endif
+.if defined(WITH_IBROADCAST)
+EXTRA_PATCHES= ${FILESDIR}/patchtuner-ibroadcast
+.endif
+.if defined(WITH_LBROADCAST)
+EXTRA_PATCHES= ${FILESDIR}/patchtuner-lbroadcast
+.endif
+
+.if ${OSVERSION} < 500000
+PREFIX= /modules
+.else
+PREFIX= /boot/kernel
+.endif
+
+.if !exists(${DISTDIR}/hcwPVRP2.sys)
+BROKEN= You need the file hcwPVRP2.sys from the CD coming with the PVR-250/350 card. Please place this file in ${DISTDIR} and run make again.
+.endif
+
+.if !exists(/usr/src/sys/dev/iicbus/iicbb.c)
+IGNORE= You need the kernel sources installed to build this module.
+.endif
+
+patch-iicbb:
+.if ${OSVERSION} < 500000
+ @if [ -z "`${GREP} cxm_iic /usr/src/sys/dev/iicbus/iicbb.c`" ]; then \
+ ${PATCH} /usr/src/sys/dev/iicbus/iicbb.c ${WRKDIR}/dev/cxm/Patch.iicbb-fbsd4; \
+ ${ECHO_CMD} "Patched /usr/src/sys/dev/iicbus/iicbb.c"; \
+ else \
+ ${ECHO_CMD} "/usr/src/sys/dev/iicbus/iicbb.c was already patched"; \
+ fi
+.else
+ @if [ -z "`${GREP} cxm_iic /usr/src/sys/dev/iicbus/iicbb.c`" ]; then \
+ ${PATCH} /usr/src/sys/dev/iicbus/iicbb.c ${WRKDIR}/dev/cxm/Patch.iicbb-fbsd5; \
+ ${ECHO_CMD} "Patched /usr/src/sys/dev/iicbus/iicbb.c"; \
+ else \
+ ${ECHO_CMD} "/usr/src/sys/dev/iicbus/iicbb.c was already patched"; \
+ fi
+.endif
+
+do-extract:
+ ${MKDIR} ${WRKDIR}
+ cd ${WRKDIR}; \
+ ${SH} ${DISTDIR}/cxm-200408.shar
+
+do-configure:
+ cd ${WRKDIR}/dev/cxm; \
+ ${CC} -Wall -o cxm_extract_fw cxm_extract_fw.c; \
+ ./cxm_extract_fw ${DISTDIR}/hcwPVRP2.sys
+
+do-build:
+ cd ${WRKDIR}/modules/cxm; \
+ ${MAKE}
+
+do-install:
+ ${INSTALL_DATA} ${WRKDIR}/modules/cxm/cxm/cxm.ko ${PREFIX}
+ ${INSTALL_DATA} ${WRKDIR}/modules/cxm/cxm_iic/cxm_iic.ko ${PREFIX}
+.if ${OSVERSION} < 500000
+ cd /dev; \
+ ./MAKEDEV bktr0
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/multimedia/pvr250/distinfo b/multimedia/pvr250/distinfo
new file mode 100644
index 000000000000..71a60e1a3dcb
--- /dev/null
+++ b/multimedia/pvr250/distinfo
@@ -0,0 +1,4 @@
+MD5 (cxm-200408.shar) = a0a766caafef8f93b9adb58d5034cf1c
+SIZE (cxm-200408.shar) = 181292
+MD5 (hcwPVRP2.sys) = aa97703bb05e985418bc29fec5b899b9
+SIZE (hcwPVRP2.sys) = 789824
diff --git a/multimedia/pvr250/files/patch-modules::cxm::cxm::Makefile b/multimedia/pvr250/files/patch-modules::cxm::cxm::Makefile
new file mode 100644
index 000000000000..b06e1e1445f7
--- /dev/null
+++ b/multimedia/pvr250/files/patch-modules::cxm::cxm::Makefile
@@ -0,0 +1,9 @@
+--- modules/cxm/cxm/Makefile.orig Fri Oct 15 20:53:47 2004
++++ modules/cxm/cxm/Makefile Fri Oct 15 20:55:03 2004
+@@ -3,5 +3,6 @@
+ SRCS = cxm.c cxm.h cxm_dec_fw.c cxm_enc_fw.c cxm_audio.c cxm_eeprom.c \
+ cxm_ir.c cxm_tuner.c cxm_video.c opt_cxm.h \
+ bus_if.h device_if.h iicbb_if.h pci_if.h vnode_if.h
++CFLAGS+= -I../../..
+
+ .include <bsd.kmod.mk>
diff --git a/multimedia/pvr250/files/patch-modules::cxm::cxm_iic::Makefile b/multimedia/pvr250/files/patch-modules::cxm::cxm_iic::Makefile
new file mode 100644
index 000000000000..8fd5589aa033
--- /dev/null
+++ b/multimedia/pvr250/files/patch-modules::cxm::cxm_iic::Makefile
@@ -0,0 +1,9 @@
+--- modules/cxm/cxm_iic/Makefile.orig Fri Oct 15 20:55:23 2004
++++ modules/cxm/cxm_iic/Makefile Fri Oct 15 20:55:43 2004
+@@ -2,5 +2,6 @@
+ KMOD = cxm_iic
+ SRCS = cxm_i2c.c cxm.h \
+ opt_cxm.h bus_if.h device_if.h iicbb_if.h pci_if.h
++CFLAGS += -I../../..
+
+ .include <bsd.kmod.mk>
diff --git a/multimedia/pvr250/files/patchtuner-bgaustralia b/multimedia/pvr250/files/patchtuner-bgaustralia
new file mode 100644
index 000000000000..ced226ac7e7d
--- /dev/null
+++ b/multimedia/pvr250/files/patchtuner-bgaustralia
@@ -0,0 +1,11 @@
+--- dev/cxm/cxm_tuner.c.org Fri Oct 15 21:31:06 2004
++++ dev/cxm/cxm_tuner.c Fri Oct 15 21:31:24 2004
+@@ -227,7 +227,7 @@
+ { 48250, { 0x8e, 0xa0 } } },
+ 0, 0,
+ { 0 },
+- { &l_air_channels, NULL } },
++ { &bg_australia_channels, NULL } },
+ { "Philips FI1236 MK2",
+ CXM_TUNER_TV_SYSTEM_MN,
+ { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } },
diff --git a/multimedia/pvr250/files/patchtuner-bgbroadcast b/multimedia/pvr250/files/patchtuner-bgbroadcast
new file mode 100644
index 000000000000..fe56272487bd
--- /dev/null
+++ b/multimedia/pvr250/files/patchtuner-bgbroadcast
@@ -0,0 +1,11 @@
+--- dev/cxm/cxm_tuner.c.org Fri Oct 15 21:31:06 2004
++++ dev/cxm/cxm_tuner.c Fri Oct 15 21:31:24 2004
+@@ -227,7 +227,7 @@
+ { 48250, { 0x8e, 0xa0 } } },
+ 0, 0,
+ { 0 },
+- { &l_air_channels, NULL } },
++ { &bg_air_channels, NULL } },
+ { "Philips FI1236 MK2",
+ CXM_TUNER_TV_SYSTEM_MN,
+ { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } },
diff --git a/multimedia/pvr250/files/patchtuner-ibroadcast b/multimedia/pvr250/files/patchtuner-ibroadcast
new file mode 100644
index 000000000000..a849446ea525
--- /dev/null
+++ b/multimedia/pvr250/files/patchtuner-ibroadcast
@@ -0,0 +1,11 @@
+--- dev/cxm/cxm_tuner.c.org Fri Oct 15 21:31:06 2004
++++ dev/cxm/cxm_tuner.c Fri Oct 15 21:31:24 2004
+@@ -227,7 +227,7 @@
+ { 48250, { 0x8e, 0xa0 } } },
+ 0, 0,
+ { 0 },
+- { &l_air_channels, NULL } },
++ { &i_air_channels, NULL } },
+ { "Philips FI1236 MK2",
+ CXM_TUNER_TV_SYSTEM_MN,
+ { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } },
diff --git a/multimedia/pvr250/files/patchtuner-lbroadcast b/multimedia/pvr250/files/patchtuner-lbroadcast
new file mode 100644
index 000000000000..62481031b8ca
--- /dev/null
+++ b/multimedia/pvr250/files/patchtuner-lbroadcast
@@ -0,0 +1,11 @@
+--- dev/cxm/cxm_tuner.c.org Fri Oct 15 21:31:06 2004
++++ dev/cxm/cxm_tuner.c Fri Oct 15 21:31:24 2004
+@@ -227,7 +227,7 @@
+ { 48250, { 0x8e, 0xa0 } } },
+ 0, 0,
+ { 0 },
+- { &l_air_channels, NULL } },
++ { &l_air_channels, NULL } },
+ { "Philips FI1236 MK2",
+ CXM_TUNER_TV_SYSTEM_MN,
+ { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } },
diff --git a/multimedia/pvr250/files/patchtuner-usbroadcast b/multimedia/pvr250/files/patchtuner-usbroadcast
new file mode 100644
index 000000000000..6ed81cd14d43
--- /dev/null
+++ b/multimedia/pvr250/files/patchtuner-usbroadcast
@@ -0,0 +1,11 @@
+--- dev/cxm/cxm_tuner.c.org Fri Oct 15 21:31:06 2004
++++ dev/cxm/cxm_tuner.c Fri Oct 15 21:31:24 2004
+@@ -227,7 +227,7 @@
+ { 48250, { 0x8e, 0xa0 } } },
+ 0, 0,
+ { 0 },
+- { &l_air_channels, NULL } },
++ { &us_air_channels, NULL } },
+ { "Philips FI1236 MK2",
+ CXM_TUNER_TV_SYSTEM_MN,
+ { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } },
diff --git a/multimedia/pvr250/files/patchtuner-uscable b/multimedia/pvr250/files/patchtuner-uscable
new file mode 100644
index 000000000000..7efe23a85125
--- /dev/null
+++ b/multimedia/pvr250/files/patchtuner-uscable
@@ -0,0 +1,11 @@
+--- dev/cxm/cxm_tuner.c.org Fri Oct 15 21:31:06 2004
++++ dev/cxm/cxm_tuner.c Fri Oct 15 21:31:24 2004
+@@ -227,7 +227,7 @@
+ { 48250, { 0x8e, 0xa0 } } },
+ 0, 0,
+ { 0 },
+- { &l_air_channels, NULL } },
++ { &us_cable_channels, NULL } },
+ { "Philips FI1236 MK2",
+ CXM_TUNER_TV_SYSTEM_MN,
+ { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } },
diff --git a/multimedia/pvr250/pkg-descr b/multimedia/pvr250/pkg-descr
new file mode 100644
index 000000000000..1ef392fc4994
--- /dev/null
+++ b/multimedia/pvr250/pkg-descr
@@ -0,0 +1,28 @@
+This port contains:
+
+- Drivers for the Conexant MPEG-2 Codec driver which can be found
+ on the Hauppauge PVR-250/350 TV cards.
+ These drivers are (c) John Wehle <john@feith.com>
+
+ On FreeBSD 4.x, the device used is /dev/bktr0.
+ On FreeBSD 5.x, the device used is /dev/cxm0
+
+ This driver has been successfully tested on:
+ - FreeBSD 4.10
+ - FreeBSD 5.2.1
+
+- Two simple programs to modify some ioctls on the card: set the
+ channel and set the window size.
+
+Note:
+
+- The configuration screen is only applicable for the the Philips
+ FQ1216M tuner. For other tuners ignore this section. Select just
+ one entry.
+
+- Note: the maintainer of this port has no inside knowledge of the
+ workings of this software. Please don't contact me about cards
+ which don't work. Please contact me about problems with the port,
+ with possible enhancements, with success stories.
+
+Author: John Wehle <john@feith.com>
diff --git a/multimedia/pvr250/pkg-message b/multimedia/pvr250/pkg-message
new file mode 100644
index 000000000000..0400644bf911
--- /dev/null
+++ b/multimedia/pvr250/pkg-message
@@ -0,0 +1,29 @@
+PVR-250/350 - Nearly done!
+
+If you haven't patched /usr/src/sys/dev/iicbus/iicbb.c yet, and
+rebuild a new kernel, and rebooted, these are the following steps:
+
+ - Run "make patch-iicbb". This will enable cxm to use the i2c bus.
+ - Add this to your kernel configuration file:
+ DEVICE iicbus
+ DEVICE iicbb
+ - Rebuild your kernel.
+ - Reboot.
+
+Next step is to load the drivers:
+ - Run "kldload cxm_iic"
+ - Run "kldload cxm"
+
+Check your console (or /var/log/messages if you're running X) and
+you should see something like:
+
+ cxm0: <Conexant iTVC15 MPEG Coder> mem ... irq ... at device ... on pci ...
+ cxm_iic0: <Conexant iTVC15 / iTVC16 I2C cnotroller> on cxm0
+ iicbb0: <I2C bit-banging driver> on cxm_iic0
+ cxm0: Philips FI1236M K2 Tuner
+ cxm0: SAA7115 rev 1 video decoder
+ cxm0: MSP3435G-B6 audio decoder
+ cxm0: IR Remote
+
+To test the card, either do "cat /dev/bktr0 > filename.mpg" (FreeBSD
+4.x) or "cat /dev/cxm0 > filename.mpg" (FreeBSD 5.x).
diff --git a/multimedia/pvr250/pkg-plist b/multimedia/pvr250/pkg-plist
new file mode 100644
index 000000000000..a1933816cf67
--- /dev/null
+++ b/multimedia/pvr250/pkg-plist
@@ -0,0 +1,2 @@
+cxm.ko
+cxm_iic.ko