Re: [PATCHv7 7/9] FMTx: si4713: Add files to handle si4713 i2c device

2009-06-16 Thread Eero Nurkkala
On Tue, 2009-06-16 at 13:22 +0200, ext Hans Verkuil wrote:
 On Tuesday 16 June 2009 13:06:09 Eduardo Valentin wrote:
  On Sun, Jun 14, 2009 at 02:31:55PM +0200, ext Hans Verkuil wrote:
+ if (rval  0)
+ goto exit;
+
+ /* TODO: How to set frequency to measure current signal length
*/
  
   Huh? I don't understand this TODO.
 
  The todo is about the property this device had, to report signal length
 
 'signal length' or 'signal strength'? If it is the former, then I don't 
 understand what you mean with that term.
 
  of a freq. It used to work like: user echoes the freq on sysfs entry.
  when reading the same entry, it reports the signal noise there.
 
  This is something which I still don't know the proper place to put.
 
  I thought in another ext control. But I don't know if this fix into
  the fm tx controls. Maybe I should use a private one ?
 
 I need to understand this better first.
 
 Regards,
 
   Hans
 

Transmitter turns into a receiver and measures the RSSI level of
the frequency. If it's high ( -90 -100dB), it's probably not a good
idea to transmit any on such frequency as the interference is too great.

- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv7 7/9] FMTx: si4713: Add files to handle si4713 i2c device

2009-06-16 Thread Eero Nurkkala
On Tue, 2009-06-16 at 13:50 +0200, Valentin Eduardo (Nokia-D/Helsinki) wrote:

 
 Yes, sorry I've made some really bad phrasing. It is Strength. It is a
 feature to measure Received Signal Strength Indication (RSSI). As mentioned
 by Eero, it's not a good idea to transmit any on freq which the measurement 
 is being done.
 

It can't transmit any while this measuring is taking place - it's not a
good idea to transmit any, if the measurement has been taking place and
it is discovered that there's already a strong radio signal (on freq x).
So it can be used to find out a channel that's good for transmission =)

- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] V4L: Add BCM2048 radio driver

2009-05-19 Thread Eero Nurkkala
On Tue, 2009-05-12 at 09:10 +0200, ext Hans Verkuil wrote:
 On Tuesday 12 May 2009 09:03:42 Eero Nurkkala wrote:
  On Tue, 2009-05-12 at 08:51 +0200, ext Hans Verkuil wrote:
   I recommend that you move the RDS decoder code into an rds library in
   the v4l2-apps directory of the v4l-dvb tree. As you say, the rds
   decoder implementation does not belong in the driver, but it would be
   very nice to have it as a library.
 
  Quick question, is there a RDS decoder library already out there?
  Or would it be the case it needs to be done from the scratch?
 
 Yes, here: http://rdsd.berlios.de/
 
 However, it's badly written and overly complicated. We need something much 
 simpler, doing just the basic decoding.
 

Ok. I checked these libraries. Quickly looking they appear somewhat
complicated as you mentioned. That's written in c++ like convention...

If I'd have time, I'd redo all of that =)

   Such region tables do not belong in a driver IMHO. These too should go
   to a userspace library (libv4l2util? It already contains frequency
   tables for TV).
 
  That's correct. Is there a link to this library?
 
 It's in the v4l2-apps directory of the main v4l-dvb repository.
 
   A more general comment: this driver should be split into two parts: the
   radio tuner core should really be implemented using the tuner API
   similar to the tea5767 radio tuner driver. That way this radio tuner
   driver can be reused when it is placed on e.g. a TV tuner card.
   However, the tuner API is missing functionality for e.g. RDS.
   Alternatively, the core driver can be rewritten as an v4l2_subdev
   driver, again allowing reuse in other drivers.
 
  Hmm. This chip is integrated on Bluetooth silicon, so could you please
  elaborate how it could be reused with a TV tuner? (Maybe I didn't just
  get the point, or if the manufacturer decides to integrate (in the
  future) the chip with TV tuner card, or someone wishes to use other
  manufacturers' TV tuner, but this radio chip at the same time?)
 
 Hmm, I need to think about this. BTW, is there a datasheet of some kind 
 available for this chip?
 

I could try arrange you one if you really wish and need to have one?

 Regards,
 
   Hans
 


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/7] FMTx: si4713: Add files to handle si4713 i2c device

2009-05-12 Thread Eero Nurkkala
On Tue, 2009-05-12 at 08:22 +0300, Eero Nurkkala wrote:
   +   /* Australia */
   +   {
   +   .channel_spacing= 20,
   +   .bottom_frequency   = 8750,
   +   .top_frequency  = 10800,
   +   .preemphasis= 1,
   +   .region = 1,
   +   },

Hi,

Australia must be 88.1 - 107.9 with 10 channel spacing.

- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] V4L: Add BCM2048 radio driver

2009-05-12 Thread Eero Nurkkala
On Tue, 2009-05-12 at 08:51 +0200, ext Hans Verkuil wrote:
 
 I recommend that you move the RDS decoder code into an rds library in the 
 v4l2-apps directory of the v4l-dvb tree. As you say, the rds decoder 
 implementation does not belong in the driver, but it would be very nice to 
 have it as a library.
 

Quick question, is there a RDS decoder library already out there?
Or would it be the case it needs to be done from the scratch?


 Such region tables do not belong in a driver IMHO. These too should go to a 
 userspace library (libv4l2util? It already contains frequency tables for 
 TV).

That's correct. Is there a link to this library?

 A more general comment: this driver should be split into two parts: the 
 radio tuner core should really be implemented using the tuner API similar 
 to the tea5767 radio tuner driver. That way this radio tuner driver can be 
 reused when it is placed on e.g. a TV tuner card. However, the tuner API is 
 missing functionality for e.g. RDS. Alternatively, the core driver can be 
 rewritten as an v4l2_subdev driver, again allowing reuse in other drivers.
 

Hmm. This chip is integrated on Bluetooth silicon, so could you please
elaborate how it could be reused with a TV tuner? (Maybe I didn't just
get the point, or if the manufacturer decides to integrate (in the
future) the chip with TV tuner card, or someone wishes to use other
manufacturers' TV tuner, but this radio chip at the same time?)

 I would like to see some input from others on this. I think that it would 
 help the integration of v4l and dvb enormously if dvb starts using the 
 standard i2c kernel API: that API offers all the functionality that dvb 
 needs now that it no longer uses autoprobing. Perhaps a topic for the 
 Plumbers conference later this year?


All comments welcome,

- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] V4L: Add BCM2048 radio driver Makefile and Kconfig dependencies

2009-05-11 Thread ext-eero . nurkkala
From: Eero Nurkkala ext-eero.nurkk...@nokia.com

This adds the Makefile and Kconfig entries for
the BCM2048 radio chip.

Signed-off-by: Eero Nurkkala ext-eero.nurkk...@nokia.com
---
 drivers/media/radio/Kconfig  |   10 ++
 drivers/media/radio/Makefile |1 +
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index 3315cac..c4d8a5d 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -387,6 +387,16 @@ config USB_MR800
  To compile this driver as a module, choose M here: the
  module will be called radio-mr800.
 
+config I2C_BCM2048
+   tristate Broadcom BCM2048 FM Radio Receiver support
+   depends on I2C  VIDEO_V4L2
+   ---help---
+ Say Y here if you want support to BCM2048 FM Radio Receiver.
+ This device driver supports only i2c bus.
+
+ To compile this driver as a module, choose M here: the
+ module will be called radio-bcm2048.
+
 config RADIO_TEA5764
tristate TEA5764 I2C FM radio support
depends on I2C  VIDEO_V4L2
diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
index 0f2b35b..c1575b9 100644
--- a/drivers/media/radio/Makefile
+++ b/drivers/media/radio/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o
 obj-$(CONFIG_USB_DSBR) += dsbr100.o
 obj-$(CONFIG_USB_SI470X) += radio-si470x.o
 obj-$(CONFIG_USB_MR800) += radio-mr800.o
+obj-$(CONFIG_I2C_BCM2048) += radio-bcm2048.o
 obj-$(CONFIG_RADIO_TEA5764) += radio-tea5764.o
 
 EXTRA_CFLAGS += -Isound
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] V4L: Add BCM2048 radio driver

2009-05-11 Thread ext-eero . nurkkala
From: Eero Nurkkala ext-eero.nurkk...@nokia.com

This patchset adds the BCM2048 radio driver code.
BCM2048 is radio is integrated in the BCM2048 chipset
that contains the Bluetooth also.

There's quite some sysfs entries introduced here;
But only a very few of them is meant to be used besides
debugging/experimental purposes:

rds (rds switch, off/on)
fm_search_rssi_threshold (threshold for V4L2_CAP_HW_FREQ_SEEK)
region (current region information)
region_bottom_frequency
region_top_frequency

Unlike V4L2 suggests, the code has also a reference
implementation for a partial RDS decoder; I understand that
this should be done in userspace. However, the decoded
RDS data may be read off from the sysfs nodes also:

rds_pi (RDS PI code)
rds_rt (RDS Radio Text)
rds_ps (RDS PS)

It would be nice to know, how RDS enabling/disabling takes
place in V4L2.

Below is the list of all sysfs entries; However, like mentioned,
only the above (8) sysfs nodes should be used along with the
V4L2. The sysfs nodes below, with the exception of the 8 ones
above, should only be used for debugging/experiments only.
And they do a good job for such purposes ;)

audio_route (DAC, I2S)
dac_output (OFF, LEFT, RIGHT, LEFT/RIGHT)
fm_af_frequency (Alternate Frequency)
fm_best_tune_mode (Best tune mode; tuning method)
fm_carrier_error (FM carrier error)
fm_deemphasis (De-emphasis)
fm_frequency (frequency)
fm_hi_lo_injection (Injection control)
fm_rds_flags (RDS IRQ flags)
fm_rds_mask (RDS IRQ Mask)
fm_rssi (Current channel RSSI level)
fm_search_mode_direction (UP, DOWN)
fm_search_rssi_threshold (HW seek threshold search level)
fm_search_tune_mode (stop all, preset, hw seek, AF jump)
mute (off, on)
power_state (off, on)
rds (off, on)
rds_b_block_mask (RDS b block IRQ mask)
rds_b_block_match (RDS b block IRQ match)
rds_data (Raw RDS data for debugging)
rds_pi (RDS PI code)
rds_pi_mask (RDS PI mask)
rds_pi_match (RDS PI match)
rds_ps (RDS PS)
rds_rt (RDS radiotext)
rds_wline (RDS FIFO watermark level)
region
region_bottom_frequency
region_top_frequency

All comments are very welcome! Like mentioned, I'm aware of
the somewhat ugly set of syfs nodes. For debugging/experiments,
I would guess they're not that bad; but for real usage, they
should be integrated into the V4L2?

Eero Nurkkala (2):
  V4L: Add BCM2048 radio driver
  V4L: Add BCM2048 radio driver Makefile and Kconfig dependencies

 drivers/media/radio/Kconfig |   10 +
 drivers/media/radio/Makefile|1 +
 drivers/media/radio/radio-bcm2048.c | 2613 +++
 include/media/radio-bcm2048.h   |   30 +
 4 files changed, 2654 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/radio/radio-bcm2048.c
 create mode 100644 include/media/radio-bcm2048.h


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/7] v4l2: video device: Add V4L2_CTRL_CLASS_FMTX controls

2009-05-11 Thread Eero Nurkkala
On Mon, 2009-05-11 at 11:31 +0200, Valentin Eduardo (Nokia-D/Helsinki) wrote:
 +enum v4l2_fmtx_preemphasis {
 + V4L2_FMTX_PREEMPHASIS_75_uS = 0,
 + V4L2_FMTX_PREEMPHASIS_50_uS = 1,
 + V4L2_FMTX_PREEMPHASIS_DISABLED  = 2,
 +};

Hello there,

Would it make more sense to make:
V4L2_FMTX_PREEMPHASIS_DISABLED as zero (false). In my opinion,
that would be more clear.

- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/7] FMTx: si4713: Add files to handle si4713 i2c device

2009-05-11 Thread Eero Nurkkala
On Mon, 2009-05-11 at 11:31 +0200, Valentin Eduardo (Nokia-D/Helsinki)
wrote:
 +/*
 + * Values for region specific configurations
 + * (spacing, bottom and top frequencies, preemphasis)
 + */
 +static struct region_info region_configs[] = {
 +   /* USA */
 +   {
 +   .channel_spacing= 20,
 +   .bottom_frequency   = 8750,
 +   .top_frequency  = 10800,
 +   .preemphasis= 0,
 +   .region = 0,
 +   },
 +   /* Australia */
 +   {
 +   .channel_spacing= 20,
 +   .bottom_frequency   = 8750,
 +   .top_frequency  = 10800,
 +   .preemphasis= 1,
 +   .region = 1,
 +   },
 +   /* Europe */
 +   {
 +   .channel_spacing= 10,
 +   .bottom_frequency   = 8750,
 +   .top_frequency  = 10800,
 +   .preemphasis= 1,
 +   .region = 2,
 +   },
 +   /* Japan */
 +   {
 +   .channel_spacing= 10,
 +   .bottom_frequency   = 7600,
 +   .top_frequency  = 9000,
 +   .preemphasis= 1,
 +   .region = 3,
 +   },
 +   /* Japan wide band */
 +   {
 +   .channel_spacing= 10,
 +   .bottom_frequency   = 7600,
 +   .top_frequency  = 10800,
 +   .preemphasis= 1,
 +   .region = 4,
 +   },
 +};
 +

Hi,

I took a quick peek;

For USA, the correct range appears as:
USA: 87.9 - 107.9

Some more to add:

China: 92 - 108 Mhz
Korea: 88 - 108 Mhz
(Europe?Middle east? Israel: 87.5 - 108)

But please do double check these before changing ;)

- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/7] FMTx: si4713: Add files to handle si4713 i2c device

2009-05-11 Thread Eero Nurkkala
On Tue, 2009-05-12 at 08:15 +0300, Eero Nurkkala wrote:
 On Mon, 2009-05-11 at 11:31 +0200, Valentin Eduardo (Nokia-D/Helsinki)
 wrote:
  +/*
  + * Values for region specific configurations
  + * (spacing, bottom and top frequencies, preemphasis)
  + */
  +static struct region_info region_configs[] = {
  +   /* USA */
  +   {
  +   .channel_spacing= 20,
  +   .bottom_frequency   = 8750,
  +   .top_frequency  = 10800,
  +   .preemphasis= 0,
  +   .region = 0,
  +   },
  +   /* Australia */
  +   {
  +   .channel_spacing= 20,
  +   .bottom_frequency   = 8750,
  +   .top_frequency  = 10800,
  +   .preemphasis= 1,
  +   .region = 1,
  +   },
  +   /* Europe */
  +   {
  +   .channel_spacing= 10,
  +   .bottom_frequency   = 8750,
  +   .top_frequency  = 10800,
  +   .preemphasis= 1,
  +   .region = 2,
  +   },
  +   /* Japan */
  +   {
  +   .channel_spacing= 10,
  +   .bottom_frequency   = 7600,
  +   .top_frequency  = 9000,
  +   .preemphasis= 1,
  +   .region = 3,
  +   },
  +   /* Japan wide band */
  +   {
  +   .channel_spacing= 10,
  +   .bottom_frequency   = 7600,
  +   .top_frequency  = 10800,
  +   .preemphasis= 1,
  +   .region = 4,
  +   },
  +};
  +
 
 Hi,
 
 I took a quick peek;
 
 For USA, the correct range appears as:
 USA: 87.9 - 107.9
 
 Some more to add:
 
 China: 92 - 108 Mhz
 Korea: 88 - 108 Mhz
 (Europe?Middle east? Israel: 87.5 - 108)
 
 But please do double check these before changing ;)
 
 - Eero

..And South America goes as USA (should we denote is as North America
instead?).

See, North America also has, in addition to USA,:
Canada, Bahamas, Barbaros, Saint Kitts and Nevis, Trinidad and Tobago,
Antigua and Barbuda, Costa Rica, Mexico, Grenada, Belize, Panama,
Dominical Republic, Saint Vincent and the Grenadines, Dominica, Saint
Lucia, El Salvador, Jamaica, Guatemala, Cuba, Hondura, Nicaragua and
Haiti)


- Eero

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html