Skip to content

Commit

Permalink
V4L/DVB (10823): saa7134: add DVB support for Avermedia A700 cards
Browse files Browse the repository at this point in the history
Add DVB support for Avermedia DVB-S Pro and
Avermedia DVB-S Hybrid+FM card both labled A700.

They use zl10313 demod (driver mt312) and zl10036 tuner.

[mchehab@redhat.com: change __FUNCTION__ into __func__]
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Matthias Schwarzott authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 68b3289 commit 0457418
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/saa7134/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ config VIDEO_SAA7134_DVB
select DVB_ISL6421 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
select DVB_ZL10036 if !DVB_FE_CUSTOMISE
select DVB_MT312 if !DVB_FE_CUSTOMISE
---help---
This adds support for DVB cards based on the
Philips saa7134 chip.
Expand Down
16 changes: 7 additions & 9 deletions drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -4421,8 +4421,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
/* no DVB support for now */
/* .mpeg = SAA7134_MPEG_DVB, */
.mpeg = SAA7134_MPEG_DVB,
.inputs = { {
.name = name_comp,
.vmux = 1,
Expand All @@ -4441,8 +4440,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
/* no DVB support for now */
/* .mpeg = SAA7134_MPEG_DVB, */
.mpeg = SAA7134_MPEG_DVB,
.inputs = { {
.name = name_comp,
.vmux = 1,
Expand Down Expand Up @@ -6084,15 +6082,15 @@ int saa7134_board_init1(struct saa7134_dev *dev)
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x8c040007, 0x8c040007);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0c0007cd, 0x0c0007cd);
break;
case SAA7134_BOARD_AVERMEDIA_A700_PRO:
case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
/* write windows gpio values */
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
printk("%s: %s: hybrid analog/dvb card\n"
"%s: Sorry, only analog s-video and composite input "
"%s: Sorry, of the analog inputs, only analog s-video and composite "
"are supported for now.\n",
dev->name, card(dev).name, dev->name);
case SAA7134_BOARD_AVERMEDIA_A700_PRO:
/* write windows gpio values */
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
break;
}
return 0;
Expand Down
27 changes: 27 additions & 0 deletions drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@

#include "zl10353.h"

#include "zl10036.h"
#include "mt312.h"

MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_LICENSE("GPL");

Expand Down Expand Up @@ -950,6 +953,17 @@ static struct nxt200x_config kworldatsc110 = {
.demod_address = 0x0a,
};

/* ------------------------------------------------------------------ */

static struct mt312_config avertv_a700_mt312 = {
.demod_address = 0x0e,
.voltage_inverted = 1,
};

static struct zl10036_config avertv_a700_tuner = {
.tuner_address = 0x60,
};

/* ==================================================================
* Core code
*/
Expand Down Expand Up @@ -1376,6 +1390,19 @@ static int dvb_init(struct saa7134_dev *dev)
TUNER_PHILIPS_FMD1216ME_MK3);
}
break;
case SAA7134_BOARD_AVERMEDIA_A700_PRO:
case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
/* Zarlink ZL10313 */
fe0->dvb.frontend = dvb_attach(mt312_attach,
&avertv_a700_mt312, &dev->i2c_adap);
if (fe0->dvb.frontend) {
if (dvb_attach(zl10036_attach, fe0->dvb.frontend,
&avertv_a700_tuner, &dev->i2c_adap) == NULL) {
wprintk("%s: No zl10036 found!\n",
__func__);
}
}
break;
default:
wprintk("Huh? unknown DVB card?\n");
break;
Expand Down

0 comments on commit 0457418

Please sign in to comment.