Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1248932imm; Fri, 29 Jun 2018 14:20:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcg5q2L9cMF4tjtf4wi5Kc/62WjtrvnuwKCQhsH6ghKzxkNDl3bKr3N+cd2r6uQvKA4Zdcs X-Received: by 2002:a17:902:7e43:: with SMTP id a3-v6mr15777698pln.151.1530307222740; Fri, 29 Jun 2018 14:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530307222; cv=none; d=google.com; s=arc-20160816; b=F5ZI7X4TNeFuGrjjlZD8aJXErKzTCDZCxDHsvKxL5ti2DbUZA4w/IOexBD9HmHophf hIw1cVGZ6d5zxvmtk4mjo4hkj8lVZHe9yOguRvzmuCHwk6B+D6pij07Pihi+C0k43+Sb r2Ig8ud1N4fYTo8U/Yu83Ahmws9lL4GkhfYO96/WWP8VBo2y7JLcHWe8Sqn9mkUpyNGk H+D0PtJoi8KYa+VMRejUUfTme3bbYoonMPyKns0PombIt6ahbIihjt9g7CNmiC+zuLKf /Wp82cp6UL07z01AiQXWdadyjPaw9Y7CEilFLRk/L4o1A+Jtq9ctVB616IpxZ0hQxPUa wzlg== 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=J7LQb1d27a+XtjC+UHQcwqc7WF0tHFv8ZtdgLHN4ZM6xmR01aFPehTyB4zLnCFhURx +qbH9YC0Bmg3//iuCP6MlPMJcbptIjqzPrD9Ulkpq5en9+lcI9KkD1/5NKsa8bYHOE5W RJbyRMxx/uOwqw8Q3rQm77SZ7PWXq3j9NHfbBm5kcDwMCDY+ql2EB7djt30/ek9623dh ZYL16pqaKfc068fmtvH3TxXbq/ZGAq+e1G+91bKu2ACrwM9pdUzRMqtsuX8s5vN05GCk R073i0/y+KzIsimHTsNvtuNg9G9f5TrqWlCUmXpOQK5+w8at9GgKk5NnXoDHh0A8iPXN y/Cw== 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 u190-v6si10667456pfb.325.2018.06.29.14.20.08; Fri, 29 Jun 2018 14:20:22 -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 S1030259AbeF2VAN (ORCPT + 99 others); Fri, 29 Jun 2018 17:00:13 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:59014 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935985AbeF2VAJ (ORCPT ); Fri, 29 Jun 2018 17:00:09 -0400 Received: by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fZ0Uu-00046r-Vq; Fri, 29 Jun 2018 23:00:05 +0200 From: "Maciej S. Szmigiero" To: Michael Krufky , Mauro Carvalho Chehab Cc: Andy Walls , linux-kernel , linux-media@vger.kernel.org, Hans Verkuil Subject: [RESEND][PATCH v6 4/6] tuner-simple: allow setting mono radio mode Date: Fri, 29 Jun 2018 23:00:01 +0200 Message-Id: <74d04548a5c79353d5c5847ea4379dfdbada4ffb.1530305665.git.mail@maciej.szmigiero.name> 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)