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

2009-05-21 Thread Hans Verkuil
On Tuesday 19 May 2009 10:09:09 Eero Nurkkala wrote:
 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

Yes, I'd really like to see it. I'm willing to sign an NDA if necessary.

Regards,

Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG
--
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 0/2] V4L: Add BCM2048 radio driver

2009-05-12 Thread Hans Verkuil
On Monday 11 May 2009 08:41:17 ext-eero.nurkk...@nokia.com wrote:
 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.

I've made an RFC which describes the finishing touches for the RDS API:

http://www.mail-archive.com/linux-media%40vger.kernel.org/msg02498.html

I should have some time next week to finally implement this in the v4l-dvb 
tree.

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.

 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

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).

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.

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?

Regards,

Hans


 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



-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
--
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


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

2009-05-12 Thread Hans Verkuil
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.

  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?

Regards,

Hans

  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



-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
--
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