Skip to content

Commit 010b876

Browse files
maciejsszmigieromchehab
authored andcommitted
media: tuner-simple: allow setting mono radio mode
For some types of tuners (Philips FMD1216ME(X) MK3 currently) we know that letting TDA9887 output port 1 remain high (inactive) will switch FM radio to mono mode. Let's make use of this functionality - nothing changes for the default stereo radio mode. Tested on a Medion 95700 board which has a FMD1216ME tuner. Signed-off-by: Maciej S. Szmigiero <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent af16d0a commit 010b876

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/media/tuners/tuner-simple.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ static int simple_set_radio_freq(struct dvb_frontend *fe,
670670
int rc, j;
671671
struct tuner_params *t_params;
672672
unsigned int freq = params->frequency;
673+
bool mono = params->audmode == V4L2_TUNER_MODE_MONO;
673674

674675
tun = priv->tun;
675676

@@ -736,8 +737,8 @@ static int simple_set_radio_freq(struct dvb_frontend *fe,
736737
config |= TDA9887_PORT2_ACTIVE;
737738
if (t_params->intercarrier_mode)
738739
config |= TDA9887_INTERCARRIER;
739-
/* if (t_params->port1_set_for_fm_mono)
740-
config &= ~TDA9887_PORT1_ACTIVE;*/
740+
if (t_params->port1_set_for_fm_mono && mono)
741+
config &= ~TDA9887_PORT1_ACTIVE;
741742
if (t_params->fm_gain_normal)
742743
config |= TDA9887_GAIN_NORMAL;
743744
if (t_params->radio_if == 2)

0 commit comments

Comments
 (0)