From patchwork Fri May 15 21:32:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 6416781 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A1AF9F318 for ; Fri, 15 May 2015 21:33:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABBB620584 for ; Fri, 15 May 2015 21:33:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6DB42056E for ; Fri, 15 May 2015 21:33:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992603AbbEOVdC (ORCPT ); Fri, 15 May 2015 17:33:02 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:34251 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992579AbbEOVdA (ORCPT ); Fri, 15 May 2015 17:33:00 -0400 Received: by wguv19 with SMTP id v19so65885323wgu.1; Fri, 15 May 2015 14:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=g0PlhbERAwWlQ87zdWHuo/p21i2XlRCnG+WIHtrGaJQ=; b=FY/EYbnp022v3+/GzcHKJnzMyrOtUGMAKOTs+GP84Av/PiOzsN3OeQJHhZX8Z5oPBm F+ns3oK6hu/wRrXUk9sOT2LLAuqjUbVaL117w7r78wq6VchONfltRhHHxpEL/LXfM8zq u6VJw7Hd/NzDZzmKjklvVW/eV12fzfM8P8JgJrULpgq/z/QW58Pxf9AfF9Xx29mUwWS4 jYzE/sRgUiyVGbHaTqxEltHzAH23CpeLFCNDDkm1tel1KLOYHXKEtFULz1vadOil6QBz Uld+6RvlWnsCLbQCoFiVkSFtjA+9RZIUBj1PrsB/otoS6Jo2hJ4adjx+jF1TYx9oqgPv 12Lg== X-Received: by 10.180.77.83 with SMTP id q19mr914593wiw.89.1431725578938; Fri, 15 May 2015 14:32:58 -0700 (PDT) Received: from Pali-Latitude.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id bz11sm5121889wib.2.2015.05.15.14.32.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 14:32:58 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , Pavel Machek Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, maxx , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH] radio-bcm2048: Fix region selection Date: Fri, 15 May 2015 23:32:51 +0200 Message-Id: <1431725571-7417-1-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: maxx This actually fixes region selection for BCM2048 FM receiver. To select the japanese FM-band an additional bit in FM_CTRL register needs to be set. This might not sound so important but it enables at least me to listen to some 'very interesting' radio transmission below normal FM-band. Patch writen by maxx@spaceboyz.net Signed-off-by: Pali Rohár Cc: maxx@spaceboyz.net --- drivers/staging/media/bcm2048/radio-bcm2048.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index aeb6c3c..1482d4b 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -739,7 +739,20 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region) return -EINVAL; mutex_lock(&bdev->mutex); + bdev->region_info = region_configs[region]; + + bdev->cache_fm_ctrl &= ~BCM2048_BAND_SELECT; + if (region > 2) { + bdev->cache_fm_ctrl |= BCM2048_BAND_SELECT; + err = bcm2048_send_command(bdev, BCM2048_I2C_FM_CTRL, + bdev->cache_fm_ctrl); + if (err) { + mutex_unlock(&bdev->mutex); + goto done; + } + } + mutex_unlock(&bdev->mutex); if (bdev->frequency < region_configs[region].bottom_frequency ||