Introduction | Drivers (DVB/ATSC hardware) | iTele (viewer app) | Mpegitor | Forums
MultiMedia Input device drivers for Mac
In order to use Mac Digital TV / HDTV applications such as iTele, you need a driver that is a member of the MMInput family of device drivers. This family has been created to support multimedia input devices such as Digital TV cards. It is called the 'MultiMedia Input Family' because its use is not restricted to Digital TV applications alone: DVB and its cousins like ATSC promise all sorts of other media goodies, such as interactive TV shows (vote with your remote), IP over the air (internet downloads), data channels (weather/stockmarket), near video on demand (movie starts every half hour), and many others. Hopefully the MMInputFamily will eventually be adopted by writers of commercial drivers or Apple, but we could be waiting a while for that.
Therefore, support for multimedia input devices is provided by the MMInputFamily kernel extension, which is contained in this package:
An important element of the package is the Userspace Driver Market daemon, allowing new drivers to be written in userspace, and allowing existing kernel drivers to be published over the local network.
Note: Please read the instructions displayed when you run the installer, do not just click through them! You may need to download some additional firmware.
Supported Devices
Included in the package are drivers for many DVB and ATSC devices. They are constructed from the PrincipalMMInputs and TypicalDVBFrontends kernel extensions. Below is a list of most of the devices that can be driven; OEM versions of these devices will also work:
The following included drivers are in various stages of development:
The package also includes another kernel extension called PhilipsSAA7146, which is required by cards that include the chip of that name. I have separated it out because my driver could be reused for other (non-DVB) cards that also use this chip. The same thing goes for the ConexantCX2388X extension, which has drivers for both the ConexantCX2388X and the Conexant Fusion 878 / Brooktree BT8X8.
How It Came To Pass
The TechnoTrend PCI driver was created with the DPandA DVB-T card, which was the first DVB-T card available in Australia - I bought it and put it in my Mac, and a couple of weekends later I actually got it to work :). The USB driver was created over ssh with a Hauppauge Nova-t USB - thanks to David Paterson for letting me crash his Mac - only twice 'tho! :). The satellite USB box driver was made possible thanks to the combination of a loan of a DVB-S box from a Eutelsat, and the patience of my good friend Phill who let me plug it into his dish. The satellite PCI card driver was able to be developed at great speed thanks to the generosity of Apple Australia. The DVICO FusionHDTV DVB-T driver was sponsored by Mark Hosking with hardware and Chris Pascoe with his linux driver. The DVICO FusionHDTV 3 ATSC driver was facilitated by DVICO themselves with some technical info, and the brave tester Kevin bought one for his Mac in Korea.
I should note here that CI slots for decoding encrypted signals on TechnoTrend DVB-S cards are not currently supported - that means that you will only be able to watch the free-to-air satellite broadcasts with those devices. This is not an issue for the USB boxes since that is all they can do anyway, but you can get PCI cards with these extra slots. The existing drivers will probably work with such a card but the CI slot will not be enabled. Also the analogue input on the DVICO FusionHDTV cards is also not currrently supported.
Not-yet-supported Devices
The cards and boxes listed above are currently the only supported ones. There has to be a good reason for me to add support for a new device. But that shouldn't stop anyone else from writing a driver...
If there are any keen driver developers out there, then please download the CVS repository linked to from the main page and get to it. Don't hesitate to email me if you have any problems or questions - in fact it'd be great if you'd let me know what you were attempting in case someone else is already doing it. Note that the license for this code is a BSD-like 'do what you want with it' licence, as described on the main page. Of course the license for any drivers you develop using MMInputFamily can be whatever you want it to be.
Now that the FusionHDTV 3 ATSC driver has been properly tested and confirmed to work, I have completed the list of drivers that I personally wanted to write. If you have another device that you would like to see supported, and you're not willing or able to write a driver for it yourself, then by all means please make your case - if you make it easy for me then I could well be inclined to help out :) My intention now is to turn more of my efforts towards adding features to the userspace software side of things, as well as cleaning up a few loose ends in the existing drivers like remote control support, sleeping while recording, analogue inputs, etc.
MMInputFamily driver contents
This section contains information that may interest other driver developers (hello? anyone out there? ;-). I have also written a more extensive driver architecture walkthrough that people writing their own MMInputFamily drivers should read. It is still a work in progress but it has more details than the introductory sections below.
MMInput
This is an IOService object that your driver object should derive from. It's got a dozen virtual methods that you have to implement. It's all copiously documented in the header file (which is actually shared with userspace), so just read that and you'll be away. Being at version 0.5 it's likely to change a little, but it'll probably only be a rearranging of enums - I've already rewritten it about half a dozen times before the first release.
With MMInput you get the MMInputClient (an IOKit User Client object) for free, so your driver will work with iTele and any other application that uses MMInputLib (the userspace device interface library).
Generic I²C interfaces
I have found two Apple I²C interfaces: one is very specific and seems to be for power management and other motherboard stuff, and the other is more general but it is hidden in the IOGraphics subdirectory of open source Darwin (i.e. not in the headers you get with the Developer package, and certainly not documented) and I only discovered it well after I got everything working with my own classes. It uses the good-old nasty parameter block approach too, so I'm not going to move to it unless someone can give me a good reason.
So if you have an I²C subsystem on your card, then you might consider using I2CNub from MMInputFamily. I2CNub is an IOService object that accepts simple (and complex) commands and uses an I2CPipe to communicate with its devices. It uses standard IOKit driver matching and the IOI2CAddressMatch property to find a client. All you have to do is implement a couple of simple virtual methods in I2CPipe and all your present and future I²C worries are taken care of. See the header file for doxygen-style documentation.
I2CNub.hpp also has some funky macros which allow you to talk to your I²C chip as if it were a memory-mapped structure from C++, e.g. myChip.flagRegister &= ~0x06
. See the TechnoTrendDVB drivers for examples. Related to this is another header file 'FTypes.hpp' containing the classes LEUInt32 and LEUInt16, which let you deal with little endian integers from C++ just like you do with their big endian cousins. It's pretty efficient under gcc too (and not too bad under CodeWarrior).
IOResourceFile
This is a utility class that allows IOKit drivers to read resource files from the Resources directory of their bundle. Try as I might I couldn't find an Apple-sanctioned way of doing this - or of reading any file in the kernel. In fact it was hard enough to find any examples of this kind of thing at all. In bsd terms this class wraps up the ugly xnu vnode stuff. And funnels <shudder> ... if you don't know what these are then believe me you don't want to :). I think that quite a few people might find this class handy.
DVBFrontend
This is a class that frontend drivers for DVB device chips (e.g. I2CNub clients) might want to derive from. It contains virtual methods for doing frontend stuff like tuning to a given set of parameters. The idea is that MMInput drivers can look through their (say) I²C clients, and do a typesafe downcast (using Apple's OSMetaType stuff) to DVBFrontend, and then call generic methods on them, without caring what the specific frontend driver actually is. This is used by TechnoTrendDVB, but it's not particularly precious to me and certainly you don't have to use it in your drivers - but it might be useful if your device is set up like this.
Change Log
New in v0.8.5
- Download the MultiMedia Input Family and Drivers v0.8.5 package from 1/11/2006
- Support for TwinHan MagicBox Pro digital input (using ULi M9207 chip). Finally!
- Detection of DVICO FusionHDTV Lite. May not work yet.
- Fixed bug where LGDT330X driver went back to 8VSB on every tuning request if Consellation parameter absent.
- ... more changelog to come when I have time to go through the commits.
New in v0.8.4
- Download the MultiMedia Input Family and Drivers v0.8.4 package from 17/5/2006
- Ported all drivers and UDMarket to the Intel X86 architecture. Was irritating but straightforward. (Mustn't have been too hard since I managed to get it working without an Intel machine to test it on.) The full complement of BEUInt32, LEUInt32 and plain-old UInt32 plus other sizes are now available in FTypes.hpp using funky assembler inlines for speed.
- Change above required updating to XCode 2.2 and gcc 4.0. Since the latest gcc mangles ObjC qualifiers differently (it's a bug), some hacks were required to keep the wire protocol unchanged. I believe I have succeeded here, i.e. older versions of iTele (incl over network) should remain compatible with these new drivers.
- MMInputShims in UDMarket now listen for sleep notifications. Before the system goes to sleep, they withdraw their goods from the market, deactivate their device and invalidate any remaining clients. When the system wakes back up, they vend their goods on the market again. This means that finally a system with active devices will survive sleep, even if they are streaming! The withdrawal/revending is necessary for remote clients (who aren't sleeping with us), and although it's a little annoying for local clients it's actually a whole lot saner and a case that the clients (i.e. iTele) should deal with anyway.
- Beta version of support for the LGDT3303 as found in the FusionHDTV 5 ATSC PCI card and USB box (LGH064F tuner only).
- The LGDT330X driver now supports selecting between 8VSB and QAM64/256 by setting the Constellation tuning parameter (to a number: 64/256=QAM; other=VSB).
- Beta driver for the TwinHan MagicBox Pro (using ULi M9207). Having problems talking to the tuner.
- Support for the UltraView DVB-T Lite PCI board.
- Attempted to get TT-Budget 1500 to work but gave up and had to return card. Some architectural improvements in the TDA1004X driver resulted from this at any rate.
- Attempted to update to the latest firmwares for the DVICO FusionHDTV USB DVB-T box. I may still have selected the wrong one however since there are multiple versions inside the Windows driver now.
- Made a dummy PCI driver called DeepSleeper to attach to unused ConexantCX2388X PCI functions, since in Mac OS X 10.4.2 (and possibly later systems too) deep sleep is no longer possible unless all functions are matched. Very annoying.
New in v0.8.3
- Download the MultiMedia Input Family and Drivers v0.8.3 package from 26/8/2005
- Detects different warm USB product id in version 3 of DVICO's FusionHDTV USB firmwares.
- MMInputShim translates known boolean tuning parameters back into booleans since Distributed Objects clobbers them with ints, and the kernel + plists discriminate between the two types even if Foundation for the most part does not. This was the cause of many tuning problems in early v0.8 packages.
New in v0.8.2
- Download the MultiMedia Input Family and Drivers v0.8.2 package from 14/8/2005
- UDMarket doesn't call hostWithAddress on new connections as this goes to DNS even if given a dotted-decimal address, which can block for ages and was the cause of many connection problems.
- UDMarket removes illegal characters from goods + host names before registering the Bonjour service name from them, also really makes sure they amount to less than 64 characters now.
- Fixed bug in UDMarket with multicast streaming: didn't tell local retriever when it was live.
- Fixed bug in UDMarket with multicast streaming: udp packet receiver path in general retrieve function was stuck disabled at startup.
- UDMarket driver MMInputShim traps errors in connection reply instead of crashing.
- First version of framework to support devices that can do CA descrambling.
- Added details of latest (v3.00.01) FusionHDTV USB2 Windows firmware file.
New in v0.8.1
- Download the MultiMedia Input Family and Drivers v0.8.1 package from 1/6/2005
- Fixed problem in udmarket with very short timeout for client ping being carried over to timeout for client requests if the request was received while we were waiting for the ping response. Drivers that take a few seconds to activate such as the TDA1004X on old Nova Ts, or anything that needs firmware, were timing out on a callback back to the client during handling of a request when the udmarket was in the middle of trying to ping that client.
- Now udmarket attempts to ensure that names that are registered with Bonjour are no longer than 63 characters, if possible, by trying all the machine names and addresses until a short enough name is found.
New in v0.8.0 (Userspace Driver Market)
- Download the MultiMedia Input Family and Drivers v0.8.0 package from 28/5/2005
- Now features the Userspace Driver Market which allows drivers to be discovered, matched and dynamically loaded in userspace as they already are in the kernel. Market Drivers may then vend their goods using Bonjour and Distributed Objects to any interested parties on the LAN. The built-in data streamer uses shared memory locally and multicast UDP to remote machines.
- Including a Market Driver called MMInputShim, that matches to kernel MMInput drivers and offers them as an MMInputProtocol to the world.
- Removed IOResourceFile as it was the only thing breaking Panther/Jaguar vs Tiger compatibility, and its prefix never gained the acceptance it implied. Now using UDMResourceFile in the new UDMUtils kext for reading firmware files. UDMResourceFile relies on a Market Driver called ResourceFileRelay to load the files in userspace and provide their contents to the kernel. IOResourceFile read the files directly in the kernel as so was more susceptible to kernel API changes (and which some Apple people disapproved of strongly).
- The STV0299 chip dirver now accepts DiSEqCSend tuning parameters as OSData objects instead of OSString objects, since they are binary data.
New in v0.7.3T (Tiger time final)
New in v0.7.3Tb2 (Tiger time 2)
New in v0.7.3Tb1 (Tiger time)
New in v0.7.2 (Latest Ultraview tweak)
- Download the MultiMedia Input Family and Drivers v0.7.2 package from 19/4/2005 (never released on this page)
- Added support for new Ultraview DVB-T Plus (FusionHDTV Plus clone) that has a different PCI ID.
- Fixed bug in MagicBox II / tinyUSB2 driver where illegal EHCI transactions wouldn't time out on some USB chipsets.
New in v0.7.1 (USB2 for Australia: MagicBox II, tinyUSB2, FusionHDTV USB 'Bluebird')
- Download the MultiMedia Input Family and Drivers v0.7.1 package from 30/3/2005
- New driver for the TwinHan MagicBox II box. Basically tested.
- New driver for the DigitalNow tinyUSB2 box. Basically tested.
- New driver for the DVICO FusionHDTV USB 'Bluebird' box. Basically tested. This one was reverse engineered from scratch in < 24 hours :). The hardest part was finding the firmware for the FX2, and then fixing the bugs in it with just the binary to go on. DVICO messed up the configuration descriptor somehow and returned the whole thing offset by one byte, which IOKit doesn't like! The patch is applied in the driver after reading the firmware before uploading it to the FX2.
- Frontend driver for the ATI / NxtWave NXT2002 8VSB demod chip. This ought to allow the BBTI/TechniSat Air2PC-ATSC-PCI to work. Completely untested.
- Improved the installer ReadMe and the fixed bugs copying DEC firmware. Also providing links to firmware source for each device, and only mentioning leaving the archive unextracted on the Desktop, even 'tho putting just the firmware file there still works.
- Removed a whole lot of old drivers that were accidentally left in the 0.7.0 package!
- Turned off PID_FILTER flag in CinergyT2 driver since it is unnecessary, and it can't do PID filtering anyway.
New in v0.7.0 (DEC 2000-T, TerraTec Cinergy T2, FusionHDTV DVB-S, TechniSat SkyStar2, TwinHan DTV Ter, and general consolidation)
- Download the MultiMedia Input Family and Drivers v0.7.0 package from 27/2/2005
- Big rearrangement of MMInput-specific drivers. They are now divided into two kexts, one for drivers that inherit from MMInput and thus expose their device: 'PrincipalMMInputs', and one for DVBFrontend I²C chip drivers: 'TypicalDVBFrontends'.
- New driver for the TerraTec Cinergy T2 (Qanu) USB2 box. Well tested.
- Finally got the DVICO FusionHDTV DVB-S PCI driver working!
- Fixed bugs in the DVICO FusionHDTV Lite driver which I thought had none but actually did.
- New driver for the TwinHan DTV Ter PCI card. It's based on a Fusion 878.
- The DEC-2000T driver now works however it is not yet usable with iTele and requires help to load. The installer will copy the firmware file into the right place in the kext if found on the Desktopduring installation.
- The TechniSat SkyStar2 driver now works although it locks up after a few channel changes.
- Fixed some bugs in the VLSI VES1820 driver but it is still not working for current testers.
- The ConexantCX2388X driver now reads a BurstThreshold property to allow debugging of the problem where filling prevents audio from working on some motherboards.
- The DVICO MMInput drivers now set some nice names into their PCI nub's properties so the card shows up with the right name in iTele and in System Profiler.
- Improved I²C driver unloading so clients are not left hanging when their provider terminates.
- MMInput drivers can now indicate to userspace that their blobs will be unsynced. The resyncing is now done in MMInputLib instead of each driver doing it in the kernel themselves.
New in v0.6.9 (FusionHDTV DVB-T Lite+BT8X8, old Nova-T USB, FusionHDTV Gold-T, betas galore)
- Download the MultiMedia Input Family and Drivers v0.6.9 package from 27/11/2004
- Working drivers for DVICO FusionHDTV DVB-T Lite PCI cards, which use the Brooktree/Conexant Fusion BT878A.
- Beta driver for FusionHDTV DVB-S card. Can't get a lock with it yet.
- Working driver for the Conexant CX22700 demod chip, used on older Nova-T USB boxes.
- Beta driver for the TechnoTrend DEC 2000-T. Almost working.
- Alpha driver for the VLSI VES1820 demod used on TechnoTrend DVB-C cards. Never executed.
- Added DiSEqC support (both normal and mini) to the STV0299 driver, used on TechnoTrend Nova-S USB and PCI devices. Never executed.
- Added much extra checking to the TechnoTrend USB driver trying to track down a bug which turned out to be Apple's bug fixed in 10.3.6 and not mine. I was not impressed.
- Beta driver for TechniSat SkyStar 2 and AirStar 2. Can't get a lock with it yet.
- Beta driver for the new DVICO FusionHDTV DVB-T Plus. Never tested.
- Working driver for the new DVICO FusionHDTV 3 Gold-T (ATSC/QAM).
- Rearranged Zarlink MT352 driver to be more easily configurable. Would be even better if the gcc I'm using supported C99. Gradually moving towards an IOPersonality-based driver configuration system. Not quite there yet, especially with the MT352 which monopolises its tuner and won't let anyone else talk to it.
- Expanded MMInput's I2C system with macros for registers addressed by more than 1 byte. Also improved teardown procedure to avoid dangling nubs.
New in v0.6.8 (New Hauppauge drivers)
New in v0.6.7 (Tested DVICO FusionHDTV 3 ATSC driver :)
New in v0.6.6 (DVICO FusionHDTV 3 ATSC driver)
New in v0.6.5b1 (DVICO FusionHDTV DVB-T driver)
New in v0.6.4 (DVB-S over PCI driver)
- Download the MultiMedia Input Family and Drivers v0.6.4 package from 31/7/2004.
- Support for TechnoTrend budget DVB-S PCI cards. Now I support one of each! (PCI,USB)x(Terrestrial,Satellite)
- Much faster usb driver initialisation
- Turning off power to the LNB when usb driver is deactivated (pci sat driver has this too)
New in v0.6.3 (DVB-S over USB driver)
- Download the MultiMedia Input Family and Drivers v0.6.3 package from 26/7/2004.
- Support for TechnoTrend budget DVB-S USB boxes, the first supported DVB-S device!
- Lock on usb driver I2CPipe to prevent concurrent access from different chip drivers.
- Fixed usb rescheduling on error and action on blob checksum failure (happens due to bad reception not bad usb bus - a little bad reception made that obvious!)
- Works in Jaguar again (specified too high version of USB driver)
- Destroying nubs in reverse order to creation so unloading should work again
- Works with latest firmware on TechnoTrend's website (v2.17d pci+usb/v1.5 bda)
New in v0.6.0 (USB driver)
New in v0.5.2 (fixes for G5s):
- Download the MultiMedia Input Family and Drivers v0.5.2 package.
- Keeping IOMemoryDescriptors in PhilipsSAA7146DMABuffer around and prepared, as this is what maps memory from the 64 bit G5 processor bus address space into the 32 bit PCI IO address space. So the DMA no longer spews over the whole of RAM on G5s when you start receiving :)
- Not calling IOMemoryDescriptor::getPhysicalAddress64, as it seems to not be present on some OSs...?
- Updating existing drivers rebuilds the kextcache. Still need to restart 'tho :(
New in v0.5.1 (fixes for panic under Panther):
New in v0.5:
- Download the MultiMedia Input Family and Drivers v0.5 package.
- Now with our very own driver family: MMInputFamily!
- No more driving cards from userspace through a huge OS security hole
- TechnoTrend driver even loads firmware by reading in appropriate part from Windows DLL (not easy in the kernel!)
- SAA7146 I²C bus rate turns out to be a division of the PCI bus clock, so bigger is slower. Whoops :) Much faster now.
- Basic power management (at least survives sleep and wake). Still may crash on wake if you were streaming on sleep, although I tried to make it work.
- We have an installer, using a package! Goodbye sudo from Terminal. Easier than I expected too ('just works'), 'tho a little quirky.
Original v0.1:
Back to DVB pageLast updated 15/6/2006 by John Dalgliesh