diff options
author | Steve Dibb <beandog@gentoo.org> | 2007-07-17 01:11:12 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2007-07-17 01:11:12 +0000 |
commit | aea19b69ff284d1de44db18dce491fad4553e398 (patch) | |
tree | bc2fd0d5a6dcd1cd3c52d11b6bd491dee1bf3a51 /media-tv | |
parent | Version Bump. (diff) | |
download | gentoo-2-aea19b69ff284d1de44db18dce491fad4553e398.tar.gz gentoo-2-aea19b69ff284d1de44db18dce491fad4553e398.tar.bz2 gentoo-2-aea19b69ff284d1de44db18dce491fad4553e398.zip |
Patch to work with 2.6.21, 2.6.22 kernels (thanks to Alan Hourihane)
(Portage version: 2.1.3_rc8)
Diffstat (limited to 'media-tv')
-rw-r--r-- | media-tv/wis-go7007/ChangeLog | 9 | ||||
-rw-r--r-- | media-tv/wis-go7007/files/digest-wis-go7007-0.9.8-r2 | 3 | ||||
-rw-r--r-- | media-tv/wis-go7007/files/snd.patch | 130 | ||||
-rw-r--r-- | media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff | 8 | ||||
-rw-r--r-- | media-tv/wis-go7007/wis-go7007-0.9.8-r2.ebuild | 109 |
5 files changed, 254 insertions, 5 deletions
diff --git a/media-tv/wis-go7007/ChangeLog b/media-tv/wis-go7007/ChangeLog index ec48fe3618ff..8bca2e801532 100644 --- a/media-tv/wis-go7007/ChangeLog +++ b/media-tv/wis-go7007/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-tv/wis-go7007 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/ChangeLog,v 1.4 2007/05/01 00:34:16 genone Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/ChangeLog,v 1.5 2007/07/17 01:11:12 beandog Exp $ + +*wis-go7007-0.9.8-r2 (17 Jul 2007) + + 17 Jul 2007; Steve Dibb <beandog@gentoo.org> + files/wis-go7007-0.9.8-fix-udev.diff, +files/snd.patch, + +wis-go7007-0.9.8-r2.ebuild: + Patch to work with 2.6.21, 2.6.22 kernels (thanks to Alan Hourihane) 01 May 2007; Marius Mauch <genone@gentoo.org> wis-go7007-0.9.8.ebuild, wis-go7007-0.9.8-r1.ebuild: diff --git a/media-tv/wis-go7007/files/digest-wis-go7007-0.9.8-r2 b/media-tv/wis-go7007/files/digest-wis-go7007-0.9.8-r2 new file mode 100644 index 000000000000..b7c4ef86d812 --- /dev/null +++ b/media-tv/wis-go7007/files/digest-wis-go7007-0.9.8-r2 @@ -0,0 +1,3 @@ +MD5 dbeaceae423972140d6a5107a1f586ec wis-go7007-linux-0.9.8.tar.bz2 136517 +RMD160 d3336efeac890848851506d6079df10d2ffd34a4 wis-go7007-linux-0.9.8.tar.bz2 136517 +SHA256 efd7600d881fc57e0484ddd7f0820c18a3bd98dce8060418dfba1626c8a79b1a wis-go7007-linux-0.9.8.tar.bz2 136517 diff --git a/media-tv/wis-go7007/files/snd.patch b/media-tv/wis-go7007/files/snd.patch new file mode 100644 index 000000000000..26c864671c2d --- /dev/null +++ b/media-tv/wis-go7007/files/snd.patch @@ -0,0 +1,130 @@ +diff -ur wis-go7007-linux-0.9.8.old/kernel/snd-go7007.c wis-go7007-linux-0.9.8/kernel/snd-go7007.c +--- wis-go7007-linux-0.9.8.old/kernel/snd-go7007.c 2007-07-16 19:54:38.736387914 +0100 ++++ wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-07-16 19:56:18.309084853 +0100 +@@ -58,9 +58,9 @@ + MODULE_PARM_DESC(index, "Enable for the go7007 audio driver"); + + struct go7007_snd { +- snd_card_t *card; +- snd_pcm_t *pcm; +- snd_pcm_substream_t *substream; ++ struct snd_card *card; ++ struct snd_pcm *pcm; ++ struct snd_pcm_substream *substream; + spinlock_t lock; + int w_idx; + int hw_ptr; +@@ -68,7 +68,7 @@ + int capturing; + }; + +-static snd_pcm_hardware_t go7007_snd_capture_hw = { ++static struct snd_pcm_hardware go7007_snd_capture_hw = { + .info = (SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | +@@ -89,7 +89,7 @@ + static void parse_audio_stream_data(struct go7007 *go, u8 *buf, int length) + { + struct go7007_snd *gosnd = go->snd_context; +- snd_pcm_runtime_t *runtime = gosnd->substream->runtime; ++ struct snd_pcm_runtime *runtime = gosnd->substream->runtime; + int frames = bytes_to_frames(runtime, length); + + spin_lock(&gosnd->lock); +@@ -119,8 +119,8 @@ + snd_pcm_period_elapsed(gosnd->substream); + } + +-static int go7007_snd_hw_params(snd_pcm_substream_t *substream, +- snd_pcm_hw_params_t *hw_params) ++static int go7007_snd_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *hw_params) + { + struct go7007 *go = snd_pcm_substream_chip(substream); + unsigned int bytes; +@@ -137,7 +137,7 @@ + return 0; + } + +-static int go7007_snd_hw_free(snd_pcm_substream_t *substream) ++static int go7007_snd_hw_free(struct snd_pcm_substream *substream) + { + struct go7007 *go = snd_pcm_substream_chip(substream); + +@@ -148,7 +148,7 @@ + return 0; + } + +-static int go7007_snd_capture_open(snd_pcm_substream_t *substream) ++static int go7007_snd_capture_open(struct snd_pcm_substream *substream) + { + struct go7007 *go = snd_pcm_substream_chip(substream); + struct go7007_snd *gosnd = go->snd_context; +@@ -166,7 +166,7 @@ + return r; + } + +-static int go7007_snd_capture_close(snd_pcm_substream_t *substream) ++static int go7007_snd_capture_close(struct snd_pcm_substream *substream) + { + struct go7007 *go = snd_pcm_substream_chip(substream); + struct go7007_snd *gosnd = go->snd_context; +@@ -175,12 +175,12 @@ + return 0; + } + +-static int go7007_snd_pcm_prepare(snd_pcm_substream_t *substream) ++static int go7007_snd_pcm_prepare(struct snd_pcm_substream *substream) + { + return 0; + } + +-static int go7007_snd_pcm_trigger(snd_pcm_substream_t *substream, int cmd) ++static int go7007_snd_pcm_trigger(struct snd_pcm_substream *substream, int cmd) + { + struct go7007 *go = snd_pcm_substream_chip(substream); + struct go7007_snd *gosnd = go->snd_context; +@@ -200,7 +200,7 @@ + } + } + +-static snd_pcm_uframes_t go7007_snd_pcm_pointer(snd_pcm_substream_t *substream) ++static snd_pcm_uframes_t go7007_snd_pcm_pointer(struct snd_pcm_substream *substream) + { + struct go7007 *go = snd_pcm_substream_chip(substream); + struct go7007_snd *gosnd = go->snd_context; +@@ -208,13 +208,13 @@ + return gosnd->hw_ptr; + } + +-static struct page *go7007_snd_pcm_page(snd_pcm_substream_t *substream, ++static struct page *go7007_snd_pcm_page(struct snd_pcm_substream *substream, + unsigned long offset) + { + return vmalloc_to_page(substream->runtime->dma_area + offset); + } + +-static snd_pcm_ops_t go7007_snd_capture_ops = { ++static struct snd_pcm_ops go7007_snd_capture_ops = { + .open = go7007_snd_capture_open, + .close = go7007_snd_capture_close, + .ioctl = snd_pcm_lib_ioctl, +@@ -226,7 +226,7 @@ + .page = go7007_snd_pcm_page, + }; + +-static int go7007_snd_free(snd_device_t *device) ++static int go7007_snd_free(struct snd_device *device) + { + struct go7007 *go = device->device_data; + +@@ -237,7 +237,7 @@ + return 0; + } + +-static snd_device_ops_t go7007_snd_device_ops = { ++static struct snd_device_ops go7007_snd_device_ops = { + .dev_free = go7007_snd_free, + }; + diff --git a/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff b/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff index 0ea6c4250ada..6712b9c427d3 100644 --- a/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff +++ b/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff @@ -10,11 +10,11 @@ diff -ru wis-go7007-linux-0.9.8-orig/udev/wis-ezusb.rules.in wis-go7007-linux-0. - RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_LR192.hex" -ACTION=="add", BUS=="usb", ENV{PRODUCT}=="eb1/6668/*", \ - RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_StarTrek.hex" -+ACTION=="add", SUBSYSTEM=="usb_device", ATTR{idVendor}=="093b", ATTR{idProduct}=="a002", \ ++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="093b", ATTRS{idProduct}=="a002", \ + RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_PX-M402U.hex -D %N" -+ACTION=="add", SUBSYSTEM=="usb_device", ATTR{idVendor}=="093b", ATTR{idProduct}=="a004", \ ++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="093b", ATTRS{idProduct}=="a004", \ + RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_PX-TV402U.hex -D %N" -+ACTION=="add", SUBSYSTEM=="usb_device", ATTR{idVendor}=="0eb1", ATTR{idProduct}=="6666", \ ++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0eb1", ATTRS{idProduct}=="6666", \ + RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_LR192.hex -D %N" -+ACTION=="add", SUBSYSTEM=="usb_device", ATTR{idVendor}=="0eb1", ATTR{idProduct}=="6668", \ ++ACTION=="add", SUBSYSTEM=="usb_device", ATTRS{idVendor}=="0eb1", ATTRS{idProduct}=="6668", \ + RUN+="@FXLOAD@ -t fx2 -I @FIRMWARE_DIR@/ezusb/hpi_StarTrek.hex -D %N" diff --git a/media-tv/wis-go7007/wis-go7007-0.9.8-r2.ebuild b/media-tv/wis-go7007/wis-go7007-0.9.8-r2.ebuild new file mode 100644 index 000000000000..3ba5b2752d7e --- /dev/null +++ b/media-tv/wis-go7007/wis-go7007-0.9.8-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/wis-go7007-0.9.8-r2.ebuild,v 1.1 2007/07/17 01:11:12 beandog Exp $ + +inherit eutils linux-mod + +MY_PN=${PN}-linux +DESCRIPTION="Linux drivers for go7007 chipsets (Plextor ConvertX PVR)" +HOMEPAGE="http://oss.wischip.com/" +SRC_URI="http://oss.wischip.com/${MY_PN}-${PV}.tar.bz2" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="alsa" +DEPEND="|| ( >=sys-fs/udev-103 sys-apps/hotplug ) + sys-apps/hotplug-base + sys-apps/fxload" + +S=${WORKDIR}/${MY_PN}-${PV} + +pkg_setup() { + BUILD_TARGETS="all" + BUILD_PARAMS="KERNELSRC=${KERNEL_DIR}" + CONFIG_CHECK="HOTPLUG MODULES KMOD FW_LOADER I2C VIDEO_DEV SOUND SND USB + USB_DEVICEFS USB_EHCI_HCD" + + if use alsa; then + CONFIG_CHECK="${CONFIG_CHECK} SND_MIXER_OSS SND_PCM_OSS" + fi + + #if ! kernel_is 2 6 16; then + # eerror "These drivers will only work with a 2.6.16 kernel" + # #die "Needs a different kernel" + #fi + + linux-mod_pkg_setup + MODULE_NAMES="go7007(extra:${S}:${S}/kernel) + go7007-usb(extra:${S}:${S}/kernel) + snd-go7007(extra:${S}:${S}/kernel) + wis-ov7640(extra:${S}:${S}/kernel) + wis-sony-tuner(extra:${S}:${S}/kernel) + wis-tw9903(extra:${S}:${S}/kernel) + wis-uda1342(extra:${S}:${S}/kernel) + wis-saa7113(extra:${S}:${S}/kernel) + wis-saa7115(extra:${S}:${S}/kernel)" +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch "${FILESDIR}/${P}-fix-udev.diff" + if kernel_is ge 2 6 17; then + epatch "${FILESDIR}/${P}-kernel-2.6.17.diff" + fi + if kernel_is ge 2 6 21; then + epatch "${FILESDIR}/snd.patch" + fi +} + +src_compile() { + cd ${S} + linux-mod_src_compile || die "failed to build driver " +} + +src_install() { + cd ${S}/apps + make KERNELDIR=${KERNEL_DIR} DESTDIR=${D} PREFIX=/usr install || die "failed to install" + cd ${S} + dodir ${ROOT}/lib/modules + insinto ${ROOT}/lib/modules + dodoc README README.saa7134 RELEASE-NOTES + cd ${S}/kernel + linux-mod_src_install || die "failed to install modules" + + insinto ${KERNEL_DIR}/include/linux + doins ${S}/include/*.h + insinto ${ROOT}/lib/firmware + doins ${S}/firmware/*.bin + insinto ${ROOT}/lib/firmware/ezusb + doins ${S}/firmware/ezusb/*.hex + insinto ${ROOT}/etc/udev/rules.d + doins ${S}/udev/wis-ezusb.rules + + exeinto ${ROOT}/usr/bin + use alsa && doexe ${S}/apps/gorecord + doexe ${S}/apps/modet +} + +pkg_postinst() { + linux-mod_pkg_postinst + + elog "" + elog "For more information on how to use the Plextor devices with Gentoo" + elog "you can follow this thread for tips and tricks:" + elog "http://forums.gentoo.org/viewtopic-t-306559-highlight-.html" + elog "" + elog "Also, the unofficial Gentoo wiki has a HOWTO page:" + elog "http://gentoo-wiki.com/HARDWARE_go7007" + elog "" + ewarn "Don't forget to add your modules to /etc/modules.autoload.d/kernel.2.6" + ewarn "so they will load on startup:" + ewarn "" + ewarn "snd_go7007" + ewarn "go7007" + ewarn "go7007_usb" + ewarn "wis_saa7115" + ewarn "wis_uda1342" + ewarn "wis_sony_tuner" +} |