newbus questions

Rohit Jalan rohitj at purpe.com
Thu Mar 16 16:49:53 UTC 2006


I maintain a driver for SAA7134 cards which does the same.  
The driver can be downloaded from.

        http://download.purpe.com

SAA7134 cards interface with the PC using PCI and have an onboard
I2C bus to which peripherals and tuners are connected.

The tuner control layer is based entirely in userland using
the iic(4) interface.

rohit --

On Thu, Mar 16, 2006 at 01:59:52PM +0300, Artem 'ZaZooBred' Ignatiev wrote:
> Hello, hackers!
> 
> I need some help regarding newbus architecture. I'm trying to write
> driver for budget DVB cards. 
> 
> I have had written driver for one of those card two years ago, but it
> was very specific regarding tuner that must be present on card. Now
> these cards are EOL-ed, and they are replaced with more recent version
> of card with another tuner. 
> 
> As far as I understand, all such cards have the same architecture: there
> is bridge chip (Philips SAA7146) which interfaces with PC (using PCI)
> and tuner on the card (using I2C), so in terms of newbus Properly
> Written (tm) driver must be split in two parts: driver for the SAA7146
> itself (which will be a ``bus-device'') and drivers for specific tuners
> (which will act as a child device on a SAA7146 "bus").
> 
> I had read arch-handbook and googled, but couldn't find an answer to
> some questions:
> 
> 1. How to create the bus itself, and properly describe its interfaces?
> skeletons of bus-driver and frontend-drivers would be a GREAT help.
> 
> 2. SAA7146 uses I2C to communicate with tuners, and I know that there
> are some I2C-related peaces already in kernel. I would like to reuse
> that code, if possible, but can't figure out where to look and how to
> link it in. 
> 
> 3. Card vendors use different PCI_SUBDEVICE on SAA7146 to indicate which
> tuner is (possibly) used. So, I suppose that "bus"-driver shall provide
> some way to tuner-driver to get this information. How that can be done?
> 
> 4. I would like to have driver, acting like "sound" -- loading one
> driver loads as dependencies all present sub-drivers for tuners, so
> after "bus"-driver identifies card it could try to probe sub-drivers for
> tuner searching for one to match. How is that done? (I suppose it can be
> something like no-op driver, that MODULE_DEPEND(9)s on modules it knows
> about)? 
> 
> Thanks in advance.
> 
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"


More information about the freebsd-hackers mailing list