aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-20 17:13:07 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-21 10:46:35 -0500
commit6fb65a66a227013ba1825efcf47e3c5df1a39131 (patch)
tree887f0df97560137b7de41fb4843c6879ebd7bf33 /drivers
parent6e5caf8493fabbb1c6aec1cb98adb9667182a1c6 (diff)
[media] drxk: add support for Mpeg output clock drive strength config
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-usb/az6007.c3
-rw-r--r--drivers/media/dvb/frontends/drxk.h4
-rw-r--r--drivers/media/dvb/frontends/drxk_hard.c12
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/dvb/dvb-usb/az6007.c b/drivers/media/dvb/dvb-usb/az6007.c
index 00a0bf1c795e..bf8d20151b05 100644
--- a/drivers/media/dvb/dvb-usb/az6007.c
+++ b/drivers/media/dvb/dvb-usb/az6007.c
@@ -69,6 +69,7 @@ static struct drxk_config terratec_h7_drxk = {
69 .single_master = true, 69 .single_master = true,
70 .no_i2c_bridge = false, 70 .no_i2c_bridge = false,
71 .chunk_size = 64, 71 .chunk_size = 64,
72 .mpeg_out_clk_strength = 0x02,
72 .microcode_name = "dvb-usb-terratec-h7-az6007.fw", 73 .microcode_name = "dvb-usb-terratec-h7-az6007.fw",
73}; 74};
74 75
@@ -278,12 +279,10 @@ static int az6007_led_on_off(struct usb_interface *intf, int onoff)
278{ 279{
279 struct usb_device *udev = interface_to_usbdev(intf); 280 struct usb_device *udev = interface_to_usbdev(intf);
280 int ret; 281 int ret;
281
282 /* TS through */ 282 /* TS through */
283 ret = az6007_write(udev, AZ6007_POWER, onoff, 0, NULL, 0); 283 ret = az6007_write(udev, AZ6007_POWER, onoff, 0, NULL, 0);
284 if (ret < 0) 284 if (ret < 0)
285 err("%s failed with error %d", __func__, ret); 285 err("%s failed with error %d", __func__, ret);
286
287 return ret; 286 return ret;
288} 287}
289 288
diff --git a/drivers/media/dvb/frontends/drxk.h b/drivers/media/dvb/frontends/drxk.h
index 6b0fd2c5dcd6..ca921c77f71f 100644
--- a/drivers/media/dvb/frontends/drxk.h
+++ b/drivers/media/dvb/frontends/drxk.h
@@ -17,6 +17,7 @@
17 * @antenna_gpio: GPIO bit used to control the antenna 17 * @antenna_gpio: GPIO bit used to control the antenna
18 * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1 18 * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1
19 * means that 1=DVBC, 0 = DVBT. Zero means the opposite. 19 * means that 1=DVBC, 0 = DVBT. Zero means the opposite.
20 * @mpeg_out_clk_strength: DRXK Mpeg output clock drive strength.
20 * @microcode_name: Name of the firmware file with the microcode 21 * @microcode_name: Name of the firmware file with the microcode
21 * 22 *
22 * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is 23 * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
@@ -32,7 +33,8 @@ struct drxk_config {
32 bool antenna_dvbt; 33 bool antenna_dvbt;
33 u16 antenna_gpio; 34 u16 antenna_gpio;
34 35
35 int chunk_size; 36 u8 mpeg_out_clk_strength;
37 int chunk_size;
36 38
37 const char *microcode_name; 39 const char *microcode_name;
38}; 40};
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 65703968d8ae..d25b0d20038b 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -91,10 +91,6 @@ bool IsA1WithRomCode(struct drxk_state *state)
91#define DRXK_MPEG_PARALLEL_OUTPUT_PIN_DRIVE_STRENGTH (0x03) 91#define DRXK_MPEG_PARALLEL_OUTPUT_PIN_DRIVE_STRENGTH (0x03)
92#endif 92#endif
93 93
94#ifndef DRXK_MPEG_OUTPUT_CLK_DRIVE_STRENGTH
95#define DRXK_MPEG_OUTPUT_CLK_DRIVE_STRENGTH (0x06)
96#endif
97
98#define DEFAULT_DRXK_MPEG_LOCK_TIMEOUT 700 94#define DEFAULT_DRXK_MPEG_LOCK_TIMEOUT 700
99#define DEFAULT_DRXK_DEMOD_LOCK_TIMEOUT 500 95#define DEFAULT_DRXK_DEMOD_LOCK_TIMEOUT 500
100 96
@@ -659,7 +655,6 @@ static int init_state(struct drxk_state *state)
659 u32 ulGPIOCfg = 0x0113; 655 u32 ulGPIOCfg = 0x0113;
660 u32 ulInvertTSClock = 0; 656 u32 ulInvertTSClock = 0;
661 u32 ulTSDataStrength = DRXK_MPEG_SERIAL_OUTPUT_PIN_DRIVE_STRENGTH; 657 u32 ulTSDataStrength = DRXK_MPEG_SERIAL_OUTPUT_PIN_DRIVE_STRENGTH;
662 u32 ulTSClockkStrength = DRXK_MPEG_OUTPUT_CLK_DRIVE_STRENGTH;
663 u32 ulDVBTBitrate = 50000000; 658 u32 ulDVBTBitrate = 50000000;
664 u32 ulDVBCBitrate = DRXK_QAM_SYMBOLRATE_MAX * 8; 659 u32 ulDVBCBitrate = DRXK_QAM_SYMBOLRATE_MAX * 8;
665 660
@@ -820,7 +815,6 @@ static int init_state(struct drxk_state *state)
820 state->m_DVBCBitrate = ulDVBCBitrate; 815 state->m_DVBCBitrate = ulDVBCBitrate;
821 816
822 state->m_TSDataStrength = (ulTSDataStrength & 0x07); 817 state->m_TSDataStrength = (ulTSDataStrength & 0x07);
823 state->m_TSClockkStrength = (ulTSClockkStrength & 0x07);
824 818
825 /* Maximum bitrate in b/s in case static clockrate is selected */ 819 /* Maximum bitrate in b/s in case static clockrate is selected */
826 state->m_mpegTsStaticBitrate = 19392658; 820 state->m_mpegTsStaticBitrate = 19392658;
@@ -6394,6 +6388,12 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
6394 state->m_DVBCStaticCLK = 1; 6388 state->m_DVBCStaticCLK = 1;
6395 } 6389 }
6396 6390
6391
6392 if (config->mpeg_out_clk_strength)
6393 state->m_TSClockkStrength = config->mpeg_out_clk_strength & 0x07;
6394 else
6395 state->m_TSClockkStrength = 0x06;
6396
6397 if (config->parallel_ts) 6397 if (config->parallel_ts)
6398 state->m_enableParallel = true; 6398 state->m_enableParallel = true;
6399 else 6399 else