From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
To: Michael Krufky <mkrufky@linuxtv.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Andy Walls <awalls@md.metrocast.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: [PATCH v6 4/6] tuner-simple: allow setting mono radio mode
Date: Sun, 25 Mar 2018 23:27:43 +0200 [thread overview]
Message-ID: <f28448e8-e819-94cb-9830-f42dbd314858@maciej.szmigiero.name> (raw)
In-Reply-To: <cover.1522012430.git.mail@maciej.szmigiero.name>
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 <mail@maciej.szmigiero.name>
---
drivers/media/tuners/tuner-simple.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/tuners/tuner-simple.c b/drivers/media/tuners/tuner-simple.c
index 36b88f820239..29c1473f2e9f 100644
--- a/drivers/media/tuners/tuner-simple.c
+++ b/drivers/media/tuners/tuner-simple.c
@@ -670,6 +670,7 @@ static int simple_set_radio_freq(struct dvb_frontend *fe,
int rc, j;
struct tuner_params *t_params;
unsigned int freq = params->frequency;
+ bool mono = params->audmode == V4L2_TUNER_MODE_MONO;
tun = priv->tun;
@@ -736,8 +737,8 @@ static int simple_set_radio_freq(struct dvb_frontend *fe,
config |= TDA9887_PORT2_ACTIVE;
if (t_params->intercarrier_mode)
config |= TDA9887_INTERCARRIER;
-/* if (t_params->port1_set_for_fm_mono)
- config &= ~TDA9887_PORT1_ACTIVE;*/
+ if (t_params->port1_set_for_fm_mono && mono)
+ config &= ~TDA9887_PORT1_ACTIVE;
if (t_params->fm_gain_normal)
config |= TDA9887_GAIN_NORMAL;
if (t_params->radio_if == 2)
next prev parent reply other threads:[~2018-03-25 21:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1522012430.git.mail@maciej.szmigiero.name>
2018-03-25 21:27 ` [PATCH v6 1/6] ivtv: zero-initialize cx25840 platform data Maciej S. Szmigiero
2018-03-25 21:27 ` [PATCH v6 2/6] cx25840: add kernel-doc description of struct cx25840_state Maciej S. Szmigiero
2018-03-25 21:27 ` [PATCH v6 3/6] cx25840: add pin to pad mapping and output format configuration Maciej S. Szmigiero
2018-03-25 21:27 ` Maciej S. Szmigiero [this message]
2018-03-25 21:27 ` [PATCH v6 5/6] [media] cxusb: implement Medion MD95700 digital / analog coexistence Maciej S. Szmigiero
2018-03-25 21:28 ` [PATCH v6 6/6] [media] cxusb: add analog mode support for Medion MD95700 Maciej S. Szmigiero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f28448e8-e819-94cb-9830-f42dbd314858@maciej.szmigiero.name \
--to=mail@maciej.szmigiero.name \
--cc=awalls@md.metrocast.net \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mkrufky@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).