Hello Gerd,
> > (I remember bttv to be a monolithic block, not using any external
> > i2c-drivers.)
> That was _long_ ago. bttv uses external i2c modules. There are plenty
> of them for various external chips, and I'm working on putting these into
> a single module because they have alot of common code.
Sorry, I did not want to offend you. 8-)
It's just that I did not have a look at the bttv-code for quite a long
time. (And I just downloaded the latest release... ;-)
> Currently bttv simply passes down some v4l ioctls to the command function
> of the i2c chip driver, and if the driver feels it should care it can.
> > - tea6420: audio-matrix switch
Hmm, I cannot use the tea6420 driver that comes with 'bttv' for four
reasons:
1) It uses v4l-ioctls, while my driver is v4l2.
2) It only supports on tea6420 at adress 0x98, while my
"Multimedia eXtension boards" has two tea6420s at
adresses 0x98 and 0x9a.
3) It does not support to exactly specify which input should be
connected to an output.
4) It depends on "bttv" (at least the header file is included).
I don't think it is a good solution to keep the driver so
close to video4linux or bttv. The tea6420 (just like any other
i2c-chipset) can be used in different environments and should
be kept separated from other things.
I decided to attach my tea6420-driver to this mail. It supports
two tea6420s on the same i2c-bus and let's you connect any
input to any output. It is completly independent except from
the i2c-package.
> Gerd
CU,
Michael.

/*
tea6420.h - definitions for the i2c-driver
for the tea6420 by SGS Thomson
Copyright (C) 1998,1999,2000 Michael Hunold <[EMAIL PROTECTED]>
The tea6420 is a bus controlled audio-matrix with 5 stereo inputs,
4 stereo outputs and gain control for each output.
It is cascadable, i.e. it can be found at the adresses 0x98
and 0x9a on the i2c-bus.
For detailed informations download the specifications directly
from SGS Thomson at http://www.st.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __INCLUDED_TEA6420__
#define __INCLUDED_TEA6420__
/* possible addresses */
#define I2C_TEA6420_1 0x4c
#define I2C_TEA6420_2 0x4d
struct audio_multiplex
{
int in; /* input of audio switch */
int out; /* output of audio switch */
int gain; /* gain of connection */
};
#define TEA6420_SWITCH _IOW('t',1,struct audio_multiplex)
#endif