.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 0,
+ .tda829x_conf = { .lna_cfg = 0 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 1,
+ .tda829x_conf = { .lna_cfg = 1 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x000200000,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 1,
+ .tda829x_conf = { .lna_cfg = 1 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200100,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 3,
+ .tda829x_conf = { .lna_cfg = 3 },
.mpeg = SAA7134_MPEG_DVB,
.ts_type = SAA7134_MPEG_TS_SERIAL,
.ts_force_val = 1,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 3,
+ .tda829x_conf = { .lna_cfg = 3 },
.mpeg = SAA7134_MPEG_DVB,
.ts_type = SAA7134_MPEG_TS_SERIAL,
.gpiomask = 0x0800100, /* GPIO 21 is an INPUT */
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.gpiomask = 1 << 21,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 0,
+ .tda829x_conf = { .lna_cfg = 0 },
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv, /* FIXME: analog tv untested */
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.gpiomask = 0x020200000,
.inputs = {{
.name = name_tv,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 0,
+ .tda829x_conf = { .lna_cfg = 0 },
.gpiomask = 0x020200000,
.inputs = {{
.name = name_tv,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 0,
+ .tda829x_conf = { .lna_cfg = 0 },
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = { {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.gpiomask = 1 << 21,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 2,
+ .tda829x_conf = { .lna_cfg = 2 },
.gpiomask = 1 << 21,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 0,
+ .tda829x_conf = { .lna_cfg = 0 },
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = { {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
- .tuner_config = 0,
+ .tda829x_conf = { .lna_cfg = 0 },
.mpeg = SAA7134_MPEG_DVB,
.ts_type = SAA7134_MPEG_TS_PARALLEL,
.inputs = {{
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
- .tuner_config = 3,
+ .tda829x_conf = { .lna_cfg = 3 },
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x02050000,
if ((dev->tuner_type != TUNER_ABSENT) && (dev->tuner_type != UNSET)) {
tun_setup.type = dev->tuner_type;
tun_setup.addr = dev->tuner_addr;
- tun_setup.config = saa7134_boards[dev->board].tuner_config;
+ tun_setup.config = &saa7134_boards[dev->board].tda829x_conf;
tun_setup.tuner_callback = saa7134_tuner_callback;
tun_setup.mode_mask = mode_mask;
bool standby; /* Standby mode */
unsigned int type; /* chip type id */
- unsigned int config;
+ void *config;
const char *name;
};
* @c: i2c_client descriptoy
* @type: type of the tuner (e. g. tuner number)
* @new_mode_mask: Indicates if tuner supports TV and/or Radio
- * @new_config: an optional parameter ranging from 0-255 used by
- a few tuners to adjust an internal parameter,
- like LNA mode
+ * @new_config: an optional parameter used by a few tuners to adjust
+ internal parameters, like LNA mode
* @tuner_callback: an optional function to be called when switching
* to analog mode
*
* by tun_setup structure. It contains several per-tuner initialization "magic"
*/
static void set_type(struct i2c_client *c, unsigned int type,
- unsigned int new_mode_mask, unsigned int new_config,
+ unsigned int new_mode_mask, void *new_config,
int (*tuner_callback) (void *dev, int component, int cmd, int arg))
{
struct tuner *t = to_tuner(i2c_get_clientdata(c));
}
t->type = type;
- /* prevent invalid config values */
- t->config = new_config < 256 ? new_config : 0;
+ t->config = new_config;
if (tuner_callback != NULL) {
tuner_dbg("defining GPIO callback\n");
t->fe.callback = tuner_callback;
break;
case TUNER_PHILIPS_TDA8290:
{
- struct tda829x_config cfg = {
- .lna_cfg = t->config,
- };
if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter,
- t->i2c->addr, &cfg))
+ t->i2c->addr, t->config))
goto attach_failed;
break;
}
case TUNER_NXP_TDA18271:
{
struct tda18271_config cfg = {
- .config = t->config,
.small_i2c = TDA18271_03_BYTE_CHUNK_INIT,
};
struct tuner *t = to_tuner(sd);
struct i2c_client *c = v4l2_get_subdevdata(sd);
- tuner_dbg("Calling set_type_addr for type=%d, addr=0x%02x, mode=0x%02x, config=0x%02x\n",
+ tuner_dbg("Calling set_type_addr for type=%d, addr=0x%02x, mode=0x%02x, config=%p\n",
tun_setup->type,
tun_setup->addr,
tun_setup->mode_mask,