summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorOliver Endriss <devnull@localhost>2003-05-08 12:23:38 +0000
committerOliver Endriss <devnull@localhost>2003-05-08 12:23:38 +0000
commit67653274d53c65a9df4fa3da530c8d6c38544fc1 (patch)
treeb93bea44523825ff3d6d20ca2c10fa2c0dfee678 /linux/drivers
parentf0994cad92142782ac5a8078d53b9fe5def990b4 (diff)
downloadmediapointer-dvb-s2-67653274d53c65a9df4fa3da530c8d6c38544fc1.tar.gz
mediapointer-dvb-s2-67653274d53c65a9df4fa3da530c8d6c38544fc1.tar.bz2
changed auto-detection of full-featured cards:
| if (crystal chip present) | av7110->adac_type = DVB_ADAC_CRYSTAL; | else if (MSP34xx chip present) | av7110->adac_type = DVB_ADAC_MSP; | else if (av7110->saa->device->subsystem_vendor == 0x110a) | av7110->adac_type = DVB_ADAC_NONE; | else | av7110->adac_type = adac; The adac parameter will only be used if the card cannot be autodetected.
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c50
1 files changed, 28 insertions, 22 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 85d71def9..46cecb814 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -4223,9 +4223,6 @@ int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *p
av7110->debilock=SPIN_LOCK_UNLOCKED;
av7110->debitype=-1;
- /* default ADAC type */
- av7110->adac_type = adac;
-
/* default OSD window */
av7110->osdwin=1;
@@ -4281,12 +4278,15 @@ int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *p
kernel_thread(arm_thread, (void *) av7110, 0);
+ /* set internal volume control to maximum */
+ av7110->adac_type = DVB_ADAC_TI;
SetVolume(av7110, 0xff, 0xff);
+
VidMode(av7110, vidmode);
/* remaining inits according to card and frontend type */
if (i2c_writereg(av7110, 0x20, 0x00, 0x00)==1) {
- printk ("av7110%d: Crystal audio DAC detected\n",
+ printk ("av7110(%d): Crystal audio DAC detected\n",
av7110->dvb_adapter->num);
av7110->adac_type = DVB_ADAC_CRYSTAL;
i2c_writereg(av7110, 0x20, 0x01, 0xd2);
@@ -4297,25 +4297,31 @@ int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *p
/**
* some special handling for the Siemens DVB-C cards...
*/
- } else if ((dev->pci->subsystem_vendor == 0x110a) ||
- ((dev->pci->subsystem_vendor == 0x13c2) &&
- (dev->pci->subsystem_device == 0x1004))) {
- if (i2c_writereg(av7110, 0x80, 0x0, 0x80)==1) {
- i2c_writereg(av7110, 0x80, 0x0, 0);
- printk ("av7110: DVB-C analog module detected, "
- "initializing MSP3400\n");
- av7110->adac_type = DVB_ADAC_MSP;
- dvb_delay(100);
- msp_writereg(av7110, 0x12, 0x0013, 0x0c00);
- msp_writereg(av7110, 0x12, 0x0000, 0x7f00); // loudspeaker + headphone
- msp_writereg(av7110, 0x12, 0x0008, 0x0220); // loudspeaker source
- msp_writereg(av7110, 0x12, 0x0004, 0x7f00); // loudspeaker volume
- msp_writereg(av7110, 0x12, 0x000a, 0x0220); // SCART 1 source
- msp_writereg(av7110, 0x12, 0x0007, 0x7f00); // SCART 1 volume
- msp_writereg(av7110, 0x12, 0x000d, 0x4800); // prescale SCART
- } else
- av7110->adac_type = DVB_ADAC_NONE;
+ } else if (i2c_writereg(av7110, 0x80, 0x0, 0x80)==1) {
+ i2c_writereg(av7110, 0x80, 0x0, 0);
+ printk ("av7110(%d): DVB-C analog module detected, "
+ "initializing MSP3400\n",
+ av7110->dvb_adapter->num);
+ av7110->adac_type = DVB_ADAC_MSP;
+ dvb_delay(100);
+ msp_writereg(av7110, 0x12, 0x0013, 0x0c00);
+ msp_writereg(av7110, 0x12, 0x0000, 0x7f00); // loudspeaker + headphone
+ msp_writereg(av7110, 0x12, 0x0008, 0x0220); // loudspeaker source
+ msp_writereg(av7110, 0x12, 0x0004, 0x7f00); // loudspeaker volume
+ msp_writereg(av7110, 0x12, 0x000a, 0x0220); // SCART 1 source
+ msp_writereg(av7110, 0x12, 0x0007, 0x7f00); // SCART 1 volume
+ msp_writereg(av7110, 0x12, 0x000d, 0x4800); // prescale SCART
+ } else if (dev->pci->subsystem_vendor == 0x110a) {
+ printk("av7110(%d): DVB-C w/o analog module detected\n",
+ av7110->dvb_adapter->num);
+ av7110->adac_type = DVB_ADAC_NONE;
+ } else {
+ av7110->adac_type = adac;
+ printk("av7110(%d): adac type set to %d\n",
+ av7110->dvb_adapter->num, av7110->adac_type);
+ }
+ if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP) {
// switch DVB SCART on
outcom(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
outcom(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1);