Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760502Ab2EDWlm (ORCPT ); Fri, 4 May 2012 18:41:42 -0400 Received: from smtp-vbr14.xs4all.nl ([194.109.24.34]:4563 "EHLO smtp-vbr14.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757910Ab2EDWlk (ORCPT ); Fri, 4 May 2012 18:41:40 -0400 From: Hans Verkuil To: manjunatha_halli@ti.com Subject: Re: [PATCH V4 4/5] Media: Update docs for V4L2 FM new features Date: Sat, 5 May 2012 00:41:34 +0200 User-Agent: KMail/1.13.7 (Linux/3.4.0-rc3-tschai; KDE/4.7.4; x86_64; ; ) Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Manjunatha Halli References: <1336164542-11014-1-git-send-email-manjunatha_halli@ti.com> <1336164542-11014-5-git-send-email-manjunatha_halli@ti.com> In-Reply-To: <1336164542-11014-5-git-send-email-manjunatha_halli@ti.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201205050041.34232.hverkuil@xs4all.nl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 11099 Lines: 241 Almost perfect :-) Just a few things below and one I noticed in the first patch where you set the maximum length of the various string controls to 0xffff. I wouldn't do that: the control framework will actually allocate 2 * (maximum + 1) bytes of memory for each string control. It wastes a lot of memory and nobody is ever going to pass in a program name that long. On Fri May 4 2012 22:49:01 manjunatha_halli@ti.com wrote: > From: Manjunatha Halli > > The list of new features - > 1) New control class for FM RX > 2) New FM RX CID's - De-Emphasis filter mode and RDS AF switch > 3) New FM TX CID - RDS Alternate frequency set. > > Signed-off-by: Manjunatha Halli > --- > Documentation/DocBook/media/v4l/compat.xml | 3 + > Documentation/DocBook/media/v4l/controls.xml | 77 ++++++++++++++++++++ > Documentation/DocBook/media/v4l/dev-rds.xml | 5 +- > .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 7 ++ > .../DocBook/media/v4l/vidioc-s-hw-freq-seek.xml | 35 +++++++++- > 5 files changed, 124 insertions(+), 3 deletions(-) > > diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml > index bce97c5..df1f345 100644 > --- a/Documentation/DocBook/media/v4l/compat.xml > +++ b/Documentation/DocBook/media/v4l/compat.xml > @@ -2311,6 +2311,9 @@ more information. > Added FM Modulator (FM TX) Extended Control Class: V4L2_CTRL_CLASS_FM_TX and their Control IDs. > > > + Added FM Receiver (FM RX) Extended Control Class: V4L2_CTRL_CLASS_FM_RX and their Control IDs. > + > + > Added Remote Controller chapter, describing the default Remote Controller mapping for media devices. > > > diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml > index b84f25e..b831dd7 100644 > --- a/Documentation/DocBook/media/v4l/controls.xml > +++ b/Documentation/DocBook/media/v4l/controls.xml > @@ -3018,6 +3018,12 @@ to find receivers which can scroll strings sized as 32 x N or 64 x N characters. > with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. > > > + V4L2_CID_RDS_TX_AF_FREQ  > + integer > + > + Sets the RDS Alternate Frequency value which allows a receiver to re-tune to a different frequency providing the same station when the first signal becomes too weak (e.g., when moving out of range). > + > + > V4L2_CID_AUDIO_LIMITER_ENABLED  > boolean > > @@ -3146,6 +3152,77 @@ manually or automatically if set to zero. Unit, range and step are driver-specif > document, from CENELEC. > > > +
> + FM Receiver Control Reference > + > + The FM Receiver (FM_RX) class includes controls for common features of > +FM Reception capable devices. > + > + > + FM_RX Control IDs > + > + > + > + > + > + > + > + > + > + > + ID > + Type > + Description > + > + > + > + > + > + V4L2_CID_FM_RX_CLASS  > + class > + The FM_RX class > +descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a > +description of this control class. > + > + > + V4L2_CID_RDS_AF_SWITCH  > + boolean > + > + Enable or Disable the RDS Alternate frequency feature. When enabled the driver will decode the RDS AF field and tries to switch to this AF frequency once the current frequency RSSI level goes below the threshold. If the frequency is switched, then &VIDIOC-G-FREQUENCY; will return the new frequency. You will need to explain 'RSSI' here. It's not an abbreviation everyone will know. > + > + > + V4L2_CID_TUNE_DEEMPHASIS  > + integer > + > + Configures the de-emphasis value for reception. > +A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies. > +Depending on the region, a time constant of either 50 or 75 useconds is used. The enum v4l2_preemphasis > +defines possible values for pre-emphasis. Here they are: > + > + > + > + > + V4L2_PREEMPHASIS_DISABLED  > + No de-emphasis is applied. > + > + > + V4L2_PREEMPHASIS_50_uS  > + A de-emphasis of 50 uS is used. > + > + > + V4L2_PREEMPHASIS_75_uS  > + A de-emphasis of 75 uS is used. > + > + > + > + > + > + > + > + > +
> + > +
>
> Flash Control Reference > > diff --git a/Documentation/DocBook/media/v4l/dev-rds.xml b/Documentation/DocBook/media/v4l/dev-rds.xml > index 38883a4..8188161 100644 > --- a/Documentation/DocBook/media/v4l/dev-rds.xml > +++ b/Documentation/DocBook/media/v4l/dev-rds.xml > @@ -55,8 +55,9 @@ If the driver only passes RDS blocks without interpreting the data > the V4L2_TUNER_CAP_RDS_BLOCK_IO flag has to be set. If the > tuner is capable of handling RDS entities like program identification codes and radio > text, the flag V4L2_TUNER_CAP_RDS_CONTROLS should be set, > -see Writing RDS data and > -FM Transmitter Control Reference. > +see Writing RDS data, > +FM Transmitter Control Reference > +FM Receiver Control Reference. >
> >
> diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml > index b17a7aa..2a8b44e 100644 > --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml > +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml > @@ -258,6 +258,13 @@ These controls are described in These controls are described in linkend="fm-tx-controls" />. > > + > + V4L2_CTRL_CLASS_FM_RX > + 0x9c0000 > + The class containing FM Receiver (FM RX) controls. > +These controls are described in + linkend="fm-rx-controls" />. > + > > V4L2_CTRL_CLASS_FLASH > 0x9c0000 > diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml > index 18b1a82..14df36b 100644 > --- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml > +++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml > @@ -95,7 +95,12 @@ field and the &v4l2-tuner; index field. > > > __u32 > - reserved[7] > + band > + Configure the FM chip to a specific band before starting seek operation. Please refer table 'Radio Band Types'. > + > + > + __u32 > + reserved[6] > Reserved for future extensions. Applications > must set the array to zero. > > @@ -103,6 +108,34 @@ field and the &v4l2-tuner; index field. > > > > + > + Radio Band Types > + > + &cs-str; > + > + > + FM_BAND_TYPE_ALL  > + All Bands from 65.8 MHz till 108 Mhz or 162.55 MHz if weather band. > + Hmm, I have to thing about that name. And about other related issues as well: what to do if a band isn't supported? How does an application know which bands are in fact supported? It's too late and I'll have to think about this tomorrow. Regards, Hans > + > + FM_BAND_TYPE_EUROPE_US  > + Europe or US band(87.5 Mhz - 108 MHz). > + > + > + FM_BAND_TYPE_JAPAN  > + Japan band(76 MHz - 90 MHz). > + > + > + FM_BAND_TYPE_RUSSIAN  > + OIRT or Russian band(65.8 MHz - 74 MHz). > + > + > + FM_BAND_TYPE_WEATHER  > + Weather band(162.4 MHz - 162.55 MHz). > + > + > + > +
> > > &return-value; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/