Skip to content

Commit

Permalink
V4L/DVB (4934): Usbvision radio requires GainNormal at e register
Browse files Browse the repository at this point in the history
Adds an option to select GainNormal at tda9887 and make usbvision
to use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
mchehab committed Dec 10, 2006
1 parent 3086d6c commit cefccc8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/media/video/tda9887.c
Expand Up @@ -482,6 +482,12 @@ static int tda9887_set_config(struct tuner *t, char *buf)
buf[1] &= ~cQSS;
if (t->tda9887_config & TDA9887_GATING_18)
buf[3] &= ~cGating_36;

if (t->tda9887_config & TDA9887_GAIN_NORMAL) {
radio_stereo.e &= ~cTunerGainLow;
radio_mono.e &= ~cTunerGainLow;
}

return 0;
}

Expand Down
3 changes: 3 additions & 0 deletions drivers/media/video/usbvision/usbvision-core.c
Expand Up @@ -2585,12 +2585,15 @@ static int attach_inform(struct i2c_client *client)
case 0x4b:
{
struct tuner_setup tun_setup;
unsigned int tda9887_conf = TDA9887_GAIN_NORMAL;

tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
tun_setup.type = TUNER_TDA9887;
tun_setup.addr = client->addr;

call_i2c_clients(usbvision, TUNER_SET_TYPE_ADDR, &tun_setup);
call_i2c_clients(usbvision,TDA9887_SET_CONFIG, &tda9887_conf);

break;
}
case 0x42:
Expand Down
1 change: 1 addition & 0 deletions include/media/tuner.h
Expand Up @@ -145,6 +145,7 @@ extern int tuner_debug;
#define TDA9887_DEEMPHASIS_75 (3<<16)
#define TDA9887_AUTOMUTE (1<<18)
#define TDA9887_GATING_18 (1<<19)
#define TDA9887_GAIN_NORMAL (1<<20)

#ifdef __KERNEL__

Expand Down

0 comments on commit cefccc8

Please sign in to comment.