aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Schluessler <marco@lordzodiac.de>2006-01-09 12:25:06 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:06 -0500
commit1c13b95c7d22d5c552246b465da4b364ba00ba65 (patch)
treeb04c9da7e2b55cf9d70fcc43d95f8e510f0a8eba
parentf49cc15bbe37b767286fdd7abe65810e750cf70a (diff)
DVB (2440): Fixed mpeg audio on spdif from Nexus-CA card (rev 2.3),
- Fixed mpeg audio on spdif from Nexus-CA card (rev 2.3), definitions for sound chip MSP3415 Signed-off-by: Marco Schluessler <marco@lordzodiac.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r--drivers/media/dvb/ttpci/av7110.c12
-rw-r--r--drivers/media/dvb/ttpci/av7110.h3
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c2
-rw-r--r--drivers/media/dvb/ttpci/av7110_v4l.c2
4 files changed, 13 insertions, 6 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 48b846bcff69..240451dcd8b8 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -133,7 +133,13 @@ static void init_av7110_av(struct av7110 *av7110)
133 /* remaining inits according to card and frontend type */ 133 /* remaining inits according to card and frontend type */
134 av7110->analog_tuner_flags = 0; 134 av7110->analog_tuner_flags = 0;
135 av7110->current_input = 0; 135 av7110->current_input = 0;
136 if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) { 136 if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000a) {
137 printk("dvb-ttpci: MSP3415 audio DAC @ card %d\n",
138 av7110->dvb_adapter.num);
139 av7110->adac_type = DVB_ADAC_MSP34x5;
140 av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 0); // SPDIF on
141 }
142 else if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) {
137 printk ("dvb-ttpci: Crystal audio DAC @ card %d detected\n", 143 printk ("dvb-ttpci: Crystal audio DAC @ card %d detected\n",
138 av7110->dvb_adapter.num); 144 av7110->dvb_adapter.num);
139 av7110->adac_type = DVB_ADAC_CRYSTAL; 145 av7110->adac_type = DVB_ADAC_CRYSTAL;
@@ -156,10 +162,10 @@ static void init_av7110_av(struct av7110 *av7110)
156 else { 162 else {
157 av7110->adac_type = adac; 163 av7110->adac_type = adac;
158 printk("dvb-ttpci: adac type set to %d @ card %d\n", 164 printk("dvb-ttpci: adac type set to %d @ card %d\n",
159 av7110->dvb_adapter.num, av7110->adac_type); 165 av7110->adac_type, av7110->dvb_adapter.num);
160 } 166 }
161 167
162 if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP) { 168 if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP34x0) {
163 // switch DVB SCART on 169 // switch DVB SCART on
164 ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0); 170 ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
165 if (ret < 0) 171 if (ret < 0)
diff --git a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h
index cce00ef293e9..d5550f462062 100644
--- a/drivers/media/dvb/ttpci/av7110.h
+++ b/drivers/media/dvb/ttpci/av7110.h
@@ -98,7 +98,8 @@ struct av7110 {
98 int adac_type; /* audio DAC type */ 98 int adac_type; /* audio DAC type */
99#define DVB_ADAC_TI 0 99#define DVB_ADAC_TI 0
100#define DVB_ADAC_CRYSTAL 1 100#define DVB_ADAC_CRYSTAL 1
101#define DVB_ADAC_MSP 2 101#define DVB_ADAC_MSP34x0 2
102#define DVB_ADAC_MSP34x5 3
102#define DVB_ADAC_NONE -1 103#define DVB_ADAC_NONE -1
103 104
104 105
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index 0696a5a4f855..2d26ff316fe6 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -309,7 +309,7 @@ int av7110_set_volume(struct av7110 *av7110, int volleft, int volright)
309 i2c_writereg(av7110, 0x20, 0x04, volright); 309 i2c_writereg(av7110, 0x20, 0x04, volright);
310 return 0; 310 return 0;
311 311
312 case DVB_ADAC_MSP: 312 case DVB_ADAC_MSP34x0:
313 vol = (volleft > volright) ? volleft : volright; 313 vol = (volleft > volright) ? volleft : volright;
314 val = (vol * 0x73 / 255) << 8; 314 val = (vol * 0x73 / 255) << 8;
315 if (vol > 0) 315 if (vol > 0)
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c
index b5aea4129fa7..e3296b07caac 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -587,7 +587,7 @@ int av7110_init_analog_module(struct av7110 *av7110)
587 587
588 printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n", 588 printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n",
589 av7110->dvb_adapter.num); 589 av7110->dvb_adapter.num);
590 av7110->adac_type = DVB_ADAC_MSP; 590 av7110->adac_type = DVB_ADAC_MSP34x0;
591 msleep(100); // the probing above resets the msp... 591 msleep(100); // the probing above resets the msp...
592 msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); 592 msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1);
593 msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); 593 msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2);