Skip to content

Commit

Permalink
V4L/DVB (4205): Merge tda9887 module into tuner.
Browse files Browse the repository at this point in the history
Most uses a tda988[5/6/7] IF demodulator as part of the device.
Having this as a separate stuff makes harder to configure it, since there
are some tda9887 options that are tuner-dependent and should be bound into
tuner-types structures.
This patch merges tda9887 module into tuner. More work is required to make
tuner-types to properly use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 0ccac4a commit 1539623
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 395 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
zr36067-objs := zoran_procfs.o zoran_device.o \
zoran_driver.o zoran_card.o
tuner-objs := tuner-core.o tuner-types.o tuner-simple.o \
mt20xx.o tda8290.o tea5767.o
mt20xx.o tda8290.o tea5767.o tda9887.o

msp3400-objs := msp3400-driver.o msp3400-kthreads.o

Expand Down Expand Up @@ -60,7 +60,7 @@ obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
obj-$(CONFIG_VIDEO_DPC) += saa7111.o dpc7146.o
obj-$(CONFIG_TUNER_3036) += tuner-3036.o

obj-$(CONFIG_VIDEO_TUNER) += tuner.o tda9887.o
obj-$(CONFIG_VIDEO_TUNER) += tuner.o
obj-$(CONFIG_VIDEO_BUF) += video-buf.o
obj-$(CONFIG_VIDEO_BUF_DVB) += video-buf-dvb.o
obj-$(CONFIG_VIDEO_BTCX) += btcx-risc.o
Expand Down
13 changes: 12 additions & 1 deletion drivers/media/video/em28xx/em28xx-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,19 @@ static int attach_inform(struct i2c_client *client)
struct em28xx *dev = client->adapter->algo_data;

switch (client->addr << 1) {
case 0x86:
case 0x43:
case 0x4b:
{
struct tuner_setup tun_setup;

tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
tun_setup.type = TUNER_TDA9887;
tun_setup.addr = client->addr;

em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf);
break;
}
case 0x42:
dprintk1(1,"attach_inform: saa7114 detected.\n");
break;
Expand All @@ -453,6 +463,7 @@ static int attach_inform(struct i2c_client *client)
case 0xba:
dprintk1(1,"attach_inform: tvp5150 detected.\n");
break;

default:
dprintk1(1,"attach inform: detected I2C address %x\n", client->addr << 1);
dev->tuner_addr = client->addr;
Expand Down
Loading

0 comments on commit 1539623

Please sign in to comment.