Commit 67129471 authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

V4L/DVB(7879): Adding cx18 Support for mxl5005s

Adding cx18 Support
Signed-off-by: default avatarSteven Toth <stoth@hauppauge.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 94269542
...@@ -11,6 +11,7 @@ config VIDEO_CX18 ...@@ -11,6 +11,7 @@ config VIDEO_CX18
select VIDEO_CX2341X select VIDEO_CX2341X
select VIDEO_CS5345 select VIDEO_CS5345
select DVB_S5H1409 select DVB_S5H1409
select MEDIA_TUNER_MXL5005S
---help--- ---help---
This is a video4linux driver for Conexant cx23418 based This is a video4linux driver for Conexant cx23418 based
PCI combo video recorder devices. PCI combo video recorder devices.
......
...@@ -51,7 +51,8 @@ static const struct cx18_card cx18_card_hvr1600_esmt = { ...@@ -51,7 +51,8 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
.v4l2_capabilities = CX18_CAP_ENCODER, .v4l2_capabilities = CX18_CAP_ENCODER,
.hw_audio_ctrl = CX18_HW_CX23418, .hw_audio_ctrl = CX18_HW_CX23418,
.hw_muxer = CX18_HW_CS5345, .hw_muxer = CX18_HW_CS5345,
.hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | CX18_HW_CS5345, .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | CX18_HW_CS5345
| CX18_HW_DVB,
.video_inputs = { .video_inputs = {
{ CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 },
{ CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 },
......
...@@ -24,25 +24,27 @@ ...@@ -24,25 +24,27 @@
#include "cx18-streams.h" #include "cx18-streams.h"
#include "cx18-cards.h" #include "cx18-cards.h"
#include "s5h1409.h" #include "s5h1409.h"
#include "mxl5005s.h"
/* Wait until the MXL500X driver is merged */
#ifdef HAVE_MXL500X
#include "mxl500x.h"
#endif
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#define CX18_REG_DMUX_NUM_PORT_0_CONTROL 0xd5a000 #define CX18_REG_DMUX_NUM_PORT_0_CONTROL 0xd5a000
#ifdef HAVE_MXL500X static struct mxl5005s_config hauppauge_hvr1600_tuner = {
static struct mxl500x_config hauppauge_hvr1600_tuner = { .i2c_address = 0xC6 >> 1,
.delsys = MXL500x_MODE_ATSC, .if_freq = IF_FREQ_5380000HZ,
.octf = MXL500x_OCTF_CH, .xtal_freq = CRYSTAL_FREQ_16000000HZ,
.xtal_freq = 16000000, .agc_mode = MXL_SINGLE_AGC,
.iflo_freq = 5380000, .tracking_filter = MXL_TF_C_H,
.ref_freq = 322800000, .rssi_enable = MXL_RSSI_ENABLE,
.rssi_ena = MXL_RSSI_ENABLE, .cap_select = MXL_CAP_SEL_ENABLE,
.addr = 0xC6 >> 1, .div_out = MXL_DIV_OUT_4,
.clock_out = MXL_CLOCK_OUT_DISABLE,
.output_load = MXL5005S_IF_OUTPUT_LOAD_200_OHM,
.top = MXL5005S_TOP_25P2,
.mod_mode = MXL_DIGITAL_MODE,
.if_mode = MXL_ZERO_IF,
.AgcMasterByte = 0x00,
}; };
static struct s5h1409_config hauppauge_hvr1600_config = { static struct s5h1409_config hauppauge_hvr1600_config = {
...@@ -55,7 +57,6 @@ static struct s5h1409_config hauppauge_hvr1600_config = { ...@@ -55,7 +57,6 @@ static struct s5h1409_config hauppauge_hvr1600_config = {
.mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK
}; };
#endif
static int dvb_register(struct cx18_stream *stream); static int dvb_register(struct cx18_stream *stream);
...@@ -252,21 +253,18 @@ static int dvb_register(struct cx18_stream *stream) ...@@ -252,21 +253,18 @@ static int dvb_register(struct cx18_stream *stream)
int ret = 0; int ret = 0;
switch (cx->card->type) { switch (cx->card->type) {
/* Wait until the MXL500X driver is merged */
#ifdef HAVE_MXL500X
case CX18_CARD_HVR_1600_ESMT: case CX18_CARD_HVR_1600_ESMT:
case CX18_CARD_HVR_1600_SAMSUNG: case CX18_CARD_HVR_1600_SAMSUNG:
dvb->fe = dvb_attach(s5h1409_attach, dvb->fe = dvb_attach(s5h1409_attach,
&hauppauge_hvr1600_config, &hauppauge_hvr1600_config,
&cx->i2c_adap[0]); &cx->i2c_adap[0]);
if (dvb->fe != NULL) { if (dvb->fe != NULL) {
dvb_attach(mxl500x_attach, dvb->fe, dvb_attach(mxl5005s_attach, dvb->fe,
&hauppauge_hvr1600_tuner, &cx->i2c_adap[0],
&cx->i2c_adap[0]); &hauppauge_hvr1600_tuner);
ret = 0; ret = 0;
} }
break; break;
#endif
default: default:
/* No Digital Tv Support */ /* No Digital Tv Support */
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment