From: "Pali Rohár" <pali.rohar@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: "Mauro Carvalho Chehab" <mchehab@osg.samsung.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Pavel Machek" <pavel@ucw.cz>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
"Pali Rohár" <pali.rohar@gmail.com>,
"Jan Roemisch" <maxx@spaceboyz.net>
Subject: [PATCH v2] radio-bcm2048: Fix region selection
Date: Tue, 9 Jun 2015 13:44:33 +0200 [thread overview]
Message-ID: <1433850273-32223-1-git-send-email-pali.rohar@gmail.com> (raw)
In-Reply-To: <557189C8.7040203@xs4all.nl>
From: Jan Roemisch <maxx@spaceboyz.net>
This patch fixes region selection for lower bottom_frequency in BCM2048 FM
receiver. It also removes "Japan wide band" region since this is impossible
to do just like that.
Signed-off-by: Jan Roemisch <maxx@spaceboyz.net>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
---
drivers/staging/media/bcm2048/radio-bcm2048.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index e9d0691..134e2af 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -342,14 +342,6 @@ static struct region_info region_configs[] = {
.deemphasis = 50,
.region = 3,
},
- /* Japan wide band */
- {
- .channel_spacing = 10,
- .bottom_frequency = 76000,
- .top_frequency = 108000,
- .deemphasis = 50,
- .region = 4,
- },
};
/*
@@ -741,6 +733,18 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region)
mutex_lock(&bdev->mutex);
bdev->region_info = region_configs[region];
+
+ if (region_configs[region].bottom_frequency < 87500)
+ bdev->cache_fm_ctrl |= BCM2048_BAND_SELECT;
+ else
+ 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 ||
--
1.7.10.4
prev parent reply other threads:[~2015-06-09 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 21:32 [PATCH] " Pali Rohár
2015-05-15 22:51 ` Greg Kroah-Hartman
2015-06-05 11:36 ` Hans Verkuil
2015-06-05 12:01 ` Pali Rohár
2015-06-09 11:44 ` Pali Rohár [this message]
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=1433850273-32223-1-git-send-email-pali.rohar@gmail.com \
--to=pali.rohar@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maxx@spaceboyz.net \
--cc=mchehab@osg.samsung.com \
--cc=pavel@ucw.cz \
/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
all inboxes | Powered by JetHome®