static unsigned int show_i2c = 0;
/* insmod options used at runtime => read/write */
+static unsigned int tuner_debug_old = 0;
int tuner_debug = 0;
static unsigned int tv_range[2] = { 44, 958 };
module_param(addr, int, 0444);
module_param(no_autodetect, int, 0444);
module_param(show_i2c, int, 0444);
+/* Note: tuner_debug is deprecated and will be removed in 2.6.17 */
+module_param_named(tuner_debug,tuner_debug_old, int, 0444);
module_param_named(debug,tuner_debug, int, 0644);
module_param_string(pal, pal, sizeof(pal), 0644);
module_param_string(secam, secam, sizeof(secam), 0644);
i2c_master_send(c, buffer, 4);
default_tuner_init(c);
break;
+ case TUNER_LG_TDVS_H062F:
+ /* Set the Auxiliary Byte. */
+ buffer[2] &= ~0x20;
+ buffer[2] |= 0x18;
+ buffer[3] = 0x20;
+ i2c_master_send(c, buffer, 4);
+ default_tuner_init(c);
+ break;
case TUNER_PHILIPS_TD1316:
buffer[0] = 0x0b;
buffer[1] = 0xdc;
i2c_master_send(c,buffer,4);
default_tuner_init(c);
break;
- case TUNER_TDA9887:
- tda9887_tuner_init(c);
- break;
default:
default_tuner_init(c);
break;
{
struct tuner *t = i2c_get_clientdata(c);
- tuner_dbg("set addr for type %i\n", t->type);
-
if ( t->type == UNSET && ((tun_setup->addr == ADDR_UNSET &&
(t->mode_mask & tun_setup->mode_mask)) ||
tun_setup->addr == c->addr)) {
/* ---------------------------------------------------------------------- */
-/* static vars: used only in tuner_attach and tuner_probe */
+/* static var Used only in tuner_attach and tuner_probe */
static unsigned default_mode_mask;
/* During client attach, set_type is called by adapter's attach_inform callback.
t->radio_if2 = 10700 * 1000; /* 10.7MHz - FM radio */
t->audmode = V4L2_TUNER_MODE_STEREO;
t->mode_mask = T_UNINITIALIZED;
- t->tuner_status = tuner_status;
+ if (tuner_debug_old) {
+ tuner_debug = tuner_debug_old;
+ printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n");
+ printk(KERN_ERR "tuner: use the debug option instead.\n");
+ }
if (show_i2c) {
unsigned char buffer[16];
case 0x4b:
/* If chip is not tda8290, don't register.
since it can be tda9887*/
- if (tda8290_probe(&t->i2c) == 0) {
- tuner_dbg("chip at addr %x is a tda8290\n", addr);
- } else {
- /* Default is being tda9887 */
- t->type = TUNER_TDA9887;
- t->mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
- t->mode = T_STANDBY;
- goto register_client;
+ if (tda8290_probe(&t->i2c) != 0) {
+ tuner_dbg("chip at addr %x is not a tda8290\n", addr);
+ kfree(t);
+ return 0;
}
break;
case 0x60:
case TUNER_SET_STANDBY:
if (check_mode(t, "TUNER_SET_STANDBY") == EINVAL)
return 0;
- t->mode = T_STANDBY;
if (t->standby)
t->standby (client);
break;
-#ifdef CONFIG_VIDEO_V4L1
case VIDIOCSAUDIO:
if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
return 0;
/* Should be implemented, since bttv calls it */
tuner_dbg("VIDIOCSAUDIO not implemented.\n");
break;
+ /* --- v4l ioctls --- */
+ /* take care: bttv does userspace copying, we'll get a
+ kernel pointer here... */
case VIDIOCSCHAN:
{
static const v4l2_std_id map[] = {
? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
return 0;
}
-#endif
- case TDA9887_SET_CONFIG:
- if (t->type == TUNER_TDA9887) {
- int *i = arg;
- t->tda9887_config = *i;
- set_freq(client, t->tv_freq);
- }
- break;
- /* --- v4l ioctls --- */
- /* take care: bttv does userspace copying, we'll get a
- kernel pointer here... */
case VIDIOC_S_STD:
{
v4l2_std_id *id = arg;
{
struct v4l2_frequency *f = arg;
- if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
- == EINVAL)
- return 0;
switch_v4l2();
+ if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode)
+ || (V4L2_TUNER_DIGITAL_TV == f->type
+ && V4L2_TUNER_DIGITAL_TV != t->mode)) {
+ if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
+ == EINVAL)
+ return 0;
+ }
set_freq(client,f->frequency);
break;
switch_v4l2();
tuner->type = t->mode;
- if (t->get_afc)
- tuner->afc=t->get_afc(client);
if (t->mode == V4L2_TUNER_ANALOG_TV)
tuner->capability |= V4L2_TUNER_CAP_NORM;
if (t->mode != V4L2_TUNER_RADIO) {
break;
}
case VIDIOC_LOG_STATUS:
- if (t->tuner_status)
- t->tuner_status(client);
+ tuner_status(client);
break;
}