Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp431669imm; Mon, 2 Jul 2018 14:24:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdzk48wFfYAF0uKCo6w4GwQj2AfeksuiOPfkgKiAM6O1nYsua0GalP6g9IG+MQzBo2OKhhX X-Received: by 2002:a62:3783:: with SMTP id e125-v6mr26825728pfa.232.1530566672249; Mon, 02 Jul 2018 14:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530566672; cv=none; d=google.com; s=arc-20160816; b=LEJsRNkKA4hevNm69dK8vFF+epBsvUZW4qFMp6SIqdSEbU1Pt2CDZyC4jPYVTEBNH4 3Z8UaVm4cr0gSTJyYYy/nDXSLck6JrvwqpwMaF7z1XkY7zphpx2jAedFmVnnds7g0ZVu RKW8Ef/x6pk5arIqh/pizvaqwx/HHEXQ3wrmmgUAXoqNc2+kuSqQE2qHM5Mirh1sgh2Y S/1624R6YNDJgbIZFRkW1du5Eb5opf5aaBKi//lYFLafnqOe60615mJoQjHJXs33t8ec y7RbLa/ZJVibHCW3eopJxMv0QxMvHU3m+eDwnXcexwpfRVymUrGEqWjD4faKnR3QCMMa viVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=44p9Q8a026G/vaVBU29T1gEx5jVT3ujDloOjw8qey2E=; b=Taon2ymIbb6GmDAnGE1h6xhZ6OAYhSI+FJdWMmtJsLOMZMZ9Amk/cqDnbTnI48NeVI FV+A4Wsx+/8f35GFxJXR8HPaeXWcWt3l8ExA0kq0WyPmyEIF3oqupdS6hXu6hm48YFNC oL/CwJVwWggvjis7fCYCBtSJ4Du0bYYJN3GAgwWyyMYhDnpJx5cl9fLue+3YQRv2A7ap OziphtWtiUHCOMECiupVz05mnGH/J8Fl5p/Xc0fGl1JISrQTaIvu8YS/3uKHkPylQsIe APDrTW+2w8Vr4lk3fSUOuq4syA19QpZFN2p/htNNh+YwtEetAiuD4Mf3MYqvudCwcHYw +PsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h91-v6si16566120pld.132.2018.07.02.14.24.17; Mon, 02 Jul 2018 14:24:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133AbeGBVXk (ORCPT + 99 others); Mon, 2 Jul 2018 17:23:40 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:41400 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753384AbeGBVXc (ORCPT ); Mon, 2 Jul 2018 17:23:32 -0400 Received: by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fa6IC-000777-1O; Mon, 02 Jul 2018 23:23:28 +0200 From: "Maciej S. Szmigiero" To: Michael Krufky , Mauro Carvalho Chehab Cc: Andy Walls , linux-kernel , linux-media@vger.kernel.org, Hans Verkuil Subject: [PATCH v7 4/6] tuner-simple: allow setting mono radio mode Date: Mon, 2 Jul 2018 23:23:24 +0200 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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)