using critcal_enter() and critical_exit() to attempt to replace spl*()
calls. The critical section was calling selrecord(), which locks an
MTX_DEF mutex, which is not legal in a critical section.
Tested by: Stefan Ehmann <shoesoft@gmx.net> and "make universe"
Approved by: re (scottl)
found only many tv-cards.
We currently use more ore less evil hacks (slow_msp_audio sysctl) to
configure the various variants of these chips in order to have
stereo autodetection work. Nevertheless, this doesn't always work
even though it _should_, according to the specs.
This is, for example, the case for some popular Hauppauge models sold
sold in Germany.
However, the Linux driver always worked for me and others. Looking at
the sourcecode you will find that the linux-driver uses a very much
enhanced approach to program the various msp34xx chipset variants,
which is also found in the specs for these chips.
This is a port of the Linux MSP34xx code, written by Gerd Knorr
<kraxel@bytesex.org>, who agreed to re-release his code under a
BSD license for this port.
A new config option "BKTR_NEW_MSP34XX_DRIVER" is added, which is required
to enable the new driver. Otherwise the old code is used.
The msp34xx.c file is diff-reduced to the linux-driver to make later
modifications easier, thus it doesn't follow style(9) in most cases.
Approved by: roger (committing this, no time to test/review),
keichii (code review)
Fixes bugs in devfs when unloading and reloading
Syncs with NetBSD changes
Submitted by: Alexander Langer <alex@big.endian.de>
Submitted by: Thomas Klausner <wiz@netbsd.org>
Submitted by: Daniel O'Connor" <doconnor@gsoft.com.au>
Main change is the addition of the bktr_mem module.
This holds onto the bktr driver's contiguously allocated memory
when the bktr driver is unloaded and reloaded.
This has to be done because it is virtually impossible to get
contiguous memory once a system is running.
Also tidied up the use of SMBUS, added a new Hauppauge tuner type (0x2c)
and a new Flyvideo vendor ID.
This merges in changes from NetBSD which ensure bktr0
(actually bktr%d) is printed at the start of any output lines.
Submitted by: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
- The driver now uses bus_space() and runs on NetBSD 1.4.2
Submitted by Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
- Remove startup quirks for video and vbi capture for PAL users.
PAL TV users can now run FXTV and Alevt in any order.
- Add support for cable channels >100
Submitted by Scott Presnell <srp@zgi.com>
- New MSP3410/3415 setup code added. This is experimental.
Please set the sysctl hw.bt848.slow_msp_audio to 1 for this.
Submitted by Frank Nobis<fn@radio-do.de>
Update AverMedia GPIO values
Submitted by: AverMedia
Add support for WinTV Theater Dolby Surround Sound DPL3518A chip
Submitted by: Frank Nobis <fn@radio-do.de>
Make PLL mode the default for Bt878s. You no longer need options BKTR_USE_PLL
New Features:
Greatly improved VBI capture support. (mainly for the AleVT port)
Supports select() on /dev/vbi
Improved RISC program for RGB+VBI capture to capture both evenodd
VBI data even when only capturing even only (or odd only) video
Based on code from Juha Nurmela <Juha.Nurmela@quicknet.inet.fi>
Support for Hauppauge 627 and Temic 4006
Submitted by: Maurice Castro <maurice@atum.castro.aus.net>
Bug Fix:
Fix bug in AverMedia card detection.
Change number of VBI lines from 16 to 12 for NTSC formats.
Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP.
New features
MSP3430G DBX initialisation from Matt Brown <matt@dqc.org>
STB Bt878 card identification.
Hauppauge Model Number identification.
Changes to probeCard() for better eeprom identification.
Experimental TDA9850 initialisation code, from Linux bttv.
Cross Platform Changes
The driver has been reorgainsed based ideas from Brad Parker's port to Linux
to seperate OS Dependant and Independant sections.
I have backends for FreeBSD 2.2.x/3.x and 4.x newbus, BSDI, OpenBSD and NetBSD.
This commit has FreeBSD 2.2.8/2.2-stable/3.x and FreeBSD 4.x newbus backends.
Some code submitted by: Juha.Nurmela@quicknet.inet.fi
Matt Brown <matt@dqc.org>
Brad Parker <brad@parker.boston.ma.us>
Some code obtained from: Linux bttv driver
Also removed the BSDI support (for now)
This allows the driver to be loaded/unloaded as a KLD
and loaded in the boot loader phase whithout making a custom kernel.
This will allow software teletext/intercast/subtitles decoding
while watching a TV station.
Based on code from Hiroki Mori <mori@infocity.co.jp> but reworked by
myself.
Added PR kern/7177 for SECAM Video Highway Xtreme with single crystal
PLL configuration submitted by Vsevolod Lobko <seva@alex-ua.com>.
In kernel configuration file add
options OVERRIDE_CARD=2
options OVERRIDE_TUNER=11
options BKTR_USE_PLL
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
Normally the full 640x480 (768x576 PAL) image is grabbed. This ioctl
allows a smaller area from anywhere within the video image to be
grabbed, eg a 400x300 image from (50,10).
See restrictions in BT848SCAPAREA.
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
submitted ioctl to clear the video buffer
prior to starting video capture
Amancio : clean up yuv12 so that it does not
affect rgb capture. Basically, fxtv after
capturing in yuv12 mode , switching to rgb
would cause the video capture to be too bright.
1.32 disable inverse gamma function for rgb and yuv
capture. fixed meteor brightness ioctl it now
converts the brightness value from unsigned to
signed.
1.33 added sysctl: hw.bt848.tuner, hw.bt848.reverse_mute,
hw.bt848.card
card takes a value from 0 to bt848_max_card
tuner takes a value from 0 to bt848_max_tuner
reverse_mute : 0 no effect, 1 reverse tuner
mute function some tuners are wired reversed :(
1. Takeshi Ohashi <ohashi@atohasi.mickey.ai.kyutech.ac.jp> submitted
code to support bktr_read . /usr/src/share/examples/rgb24.c now works 8)
2. Flemming Jacobsen <fj@schizo.dk.tfs.com> submitted code to support
radio available with in some bt848 based cards;additionally, wrote
code to correctly recognized his bt848 card.
3. Roger Hardiman <roger@cs.strath.ac.uk> submitted various fixes to smooth
out the microcode and made all modes consistent.
4. Added supported for yuv12 so we know can capture raw streams and feed it
to mpeg_encoder . The upshot is that we can now mpeg encode more and save
nearly 100 percent of the disk requirements previously for programs such
as fxtv first save the raw video image to disk then converted to a
format suitable for mpeg_encode.
This make the Miro PCTV work for me, including audio, and should
hopefully fix the other audio problems some people have been having.
Reviewed by: ahasty & Luigi Rizzo (freebsd-multimedia)
This driver includes the following patches submitted by:
1.0 Hideyuki Suzuki <hideyuki@sat.t.u-tokyo.ac.jp>
Japanese Cable support
2.0 Keith Sklower <sklower@CS.Berkeley.EDU>
Minor update to the BSDI section so it compiles cleanly on BSDI
3.0 Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
ioctl interface to select video format , NTSC, PAL, etc...
Added [SR]RGBMASKs ioctl for byte swapping.
1.16 4/20/97 Randall Hopper <rhh@ct.picker.com>
Generalized RGBMASK ioctls for general pixel
format setting [SG]ACTPIXFMT, and added query API
to return driver-supported pix fmts GSUPPIXFMT.
1.17 4/21/97 hasty@rah.star-gate.com
Clipping support added.
1.18 4/23/97 Clean up after failed CAP_SINGLEs where bt
interrupt isn't delivered, and fixed fixing
CAP_SINGLEs that for ODD_ONLY fields.
Submitted by: individuals in above log messages.
Randall Hopper <rhh@ct.picker.com> GHUE/GBRIGHT bug
Louis Mamakos made a new bt848 struct, including massive changes to the entire
body of code, substituting array offsets with struct members.
Randall Hopper aadded fixes of BT848_GHUE & BT848_GBRIG.
I (fsmp):
added polled hardware i2c routines,
removed all existing software i2c routines.
added eeprom support.
Michael submitted code to activate the audio muxes.
fsmp:
extended those changes for different boards.
auto-detection of board types.
auto-detection of tuner types.
auto-detection of stereo option.