forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V4L/DVB: dvb: add support for kworld 340u and ub435-q to em28xx-dvb
This adds support for the KWorld PlusTV 340U and KWorld UB345-Q ATSC sticks, which are really the same device. The sticks have an eMPIA em2870 usb bridge chipset, an LG Electronics LGDT3304 ATSC/QAM demodulator and an NXP TDA18271HD tuner -- early versions of the 340U have a a TDA18271HD/C1, later models and the UB435-Q have a C2. The stick has been tested succesfully with both VSB_8 and QAM_256 signals. Its using lgdt3304 support added to the lgdt3305 driver by a prior patch, rather than the current lgdt3304 driver, as its severely lacking in functionality by comparison (see said patch for details). Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Michael Krufky <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
- Loading branch information
1 parent
1c488ea
commit 7e48b30
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,13 @@ | |
#include "tuner-simple.h" | ||
|
||
#include "lgdt330x.h" | ||
#include "lgdt3305.h" | ||
#include "zl10353.h" | ||
#include "s5h1409.h" | ||
#include "mt352.h" | ||
#include "mt352_priv.h" /* FIXME */ | ||
#include "tda1002x.h" | ||
#include "tda18271.h" | ||
|
||
MODULE_DESCRIPTION("driver for em28xx based DVB cards"); | ||
MODULE_AUTHOR("Mauro Carvalho Chehab <[email protected]>"); | ||
|
@@ -231,6 +233,18 @@ static struct lgdt330x_config em2880_lgdt3303_dev = { | |
.demod_chip = LGDT3303, | ||
}; | ||
|
||
static struct lgdt3305_config em2870_lgdt3304_dev = { | ||
.i2c_addr = 0x0e, | ||
.demod_chip = LGDT3304, | ||
.spectral_inversion = 1, | ||
.deny_i2c_rptr = 1, | ||
.mpeg_mode = LGDT3305_MPEG_PARALLEL, | ||
.tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, | ||
.tpvalid_polarity = LGDT3305_TP_VALID_HIGH, | ||
.vsb_if_khz = 3250, | ||
.qam_if_khz = 4000, | ||
}; | ||
|
||
static struct zl10353_config em28xx_zl10353_with_xc3028 = { | ||
.demod_address = (0x1e >> 1), | ||
.no_tuner = 1, | ||
|
@@ -247,6 +261,17 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = { | |
.mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK | ||
}; | ||
|
||
static struct tda18271_std_map kworld_a340_std_map = { | ||
.atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 0, | ||
.if_lvl = 1, .rfagc_top = 0x37, }, | ||
.qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 1, | ||
.if_lvl = 1, .rfagc_top = 0x37, }, | ||
}; | ||
|
||
static struct tda18271_config kworld_a340_config = { | ||
.std_map = &kworld_a340_std_map, | ||
}; | ||
|
||
static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = { | ||
.demod_address = (0x1e >> 1), | ||
.no_tuner = 1, | ||
|
@@ -572,6 +597,14 @@ static int dvb_init(struct em28xx *dev) | |
} | ||
} | ||
break; | ||
case EM2870_BOARD_KWORLD_A340: | ||
dvb->frontend = dvb_attach(lgdt3305_attach, | ||
&em2870_lgdt3304_dev, | ||
&dev->i2c_adap); | ||
if (dvb->frontend != NULL) | ||
dvb_attach(tda18271_attach, dvb->frontend, 0x60, | ||
&dev->i2c_adap, &kworld_a340_config); | ||
break; | ||
default: | ||
em28xx_errdev("/2: The frontend of your DVB/ATSC card" | ||
" isn't supported yet\n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters