diff options
author | Jan Roemisch <maxx@spaceboyz.net> | 2015-06-09 13:44:33 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-07-06 13:25:47 +0200 |
commit | e6cf0c409b40349f46427f9fc56f6ce4ec640a5d (patch) | |
tree | 228f56708a508c1e2246bf075501e4312763bfb6 /drivers/staging | |
parent | [media] SOLO6x10: Remove dead code (diff) | |
download | linux-e6cf0c409b40349f46427f9fc56f6ce4ec640a5d.tar.xz linux-e6cf0c409b40349f46427f9fc56f6ce4ec640a5d.zip |
[media] radio-bcm2048: Fix region selection
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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/bcm2048/radio-bcm2048.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 8bc68e2b4052..fb55e5941445 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 || |