All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Valentin <eduardo.valentin@nokia.com>
To: ext Hans Verkuil <hverkuil@xs4all.nl>
Cc: Trent Piepho <xyzzy@speakeasy.org>,
	Eduardo Valentin <edubezval@gmail.com>,
	"Valentin Eduardo (Nokia-D/Helsinki)"
	<eduardo.valentin@nokia.com>,
	ext Mauro Carvalho Chehab <mchehab@infradead.org>,
	"Nurkkala Eero.An (EXT-Offcode/Oulu)"
	<ext-Eero.Nurkkala@nokia.com>,
	"Aaltonen Matti.J (Nokia-D/Tampere)" <matti.j.aaltonen@nokia.com>,
	ext Douglas Schilling Landgraf <dougsland@gmail.com>,
	Linux-Media <linux-media@vger.kernel.org>
Subject: Re: [PATCHv7 2/9] v4l2: video device: Add V4L2_CTRL_CLASS_FM_TX controls
Date: Tue, 16 Jun 2009 13:52:34 +0300	[thread overview]
Message-ID: <20090616105234.GB16092@esdhcp037198.research.nokia.com> (raw)
In-Reply-To: <200906141859.13982.hverkuil@xs4all.nl>

On Sun, Jun 14, 2009 at 06:59:13PM +0200, ext Hans Verkuil wrote:
> On Sunday 14 June 2009 18:23:41 Trent Piepho wrote:
> > On Sun, 14 Jun 2009, Eduardo Valentin wrote:
> > > >> +/* FM Modulator class control IDs */
> > > >> +#define V4L2_CID_FM_TX_CLASS_BASE      (V4L2_CTRL_CLASS_FM_TX | 0x900)
> > > >> +#define V4L2_CID_FM_TX_CLASS                 (V4L2_CTRL_CLASS_FM_TX | 1)
> > > >> +
> > > >> +#define V4L2_CID_RDS_ENABLED                 (V4L2_CID_FM_TX_CLASS_BASE + 1)
> > > >> +#define V4L2_CID_RDS_PI                              (V4L2_CID_FM_TX_CLASS_BASE + 2)
> > > >> +#define V4L2_CID_RDS_PTY                     (V4L2_CID_FM_TX_CLASS_BASE + 3)
> > > >> +#define V4L2_CID_RDS_PS_NAME                 (V4L2_CID_FM_TX_CLASS_BASE + 4)
> > > >> +#define V4L2_CID_RDS_RADIO_TEXT                      (V4L2_CID_FM_TX_CLASS_BASE + 5)
> > > >
> > > > I think these RDS controls should be renamed to V4L2_CID_RDS_TX_. This makes
> > > > it clear that these controls relate to the RDS transmitter instead of a
> > > > receiver. I would not be surprised to see similar controls appear for an RDS
> > > > receiver in the future.
> > 
> > So there should there be different controls to set the same thing, one set
> > for tx and another for rx?
> 
> Sure. Say some RDS decoder stores the PI in a register. I can imagine that
> we add a V4L2_CID_RDS_RX_PI control for that. Whereas a V4L2_CID_RDS_TX_PI
> control will return the PI sent out by the encoder.
> 
> Currently no such controls exist (or are needed) for an RDS decoder, but I
> wouldn't be surprised at all if we need them at some point in the future.
> 
> > 
> > > >> +#define V4L2_CID_PREEMPHASIS                 (V4L2_CID_FM_TX_CLASS_BASE + 17)
> > > >> +enum v4l2_fm_tx_preemphasis {
> > > >> +     V4L2_FM_TX_PREEMPHASIS_DISABLED         = 0,
> > > >> +     V4L2_FM_TX_PREEMPHASIS_50_uS            = 1,
> > > >> +     V4L2_FM_TX_PREEMPHASIS_75_uS            = 2,
> > > >> +};
> > > >
> > > > I suggest renaming this to V4L2_CID_FM_TX_PREEMPHASIS. There is already a
> > > > similar V4L2_CID_MPEG_EMPHASIS control and others might well appear in the
> > > > future, so I think this name should be more specific to the FM_TX API.
> > 
> > The cx88 driver could get support for setting the fm preemphasis via a
> > control.  I added support via a module option, but a control would be
> > better.  You're saying it shouldn't use this fm preemphasis control?
> 
> Correct. This set the pre-emphasis when transmitting. For receiving you want
> a separate control. Although the enum should be made generic. So FM_TX can be
> removed from the enum.
> 
> Why should we have one rx and one tx control for this? Because you can have
> both receivers and transmitters in one device and you want independent control
> of the two.

Yes, agreed here. There is the possibility to have receiver and transmitter
both in the same device. So, I think it is better to have separated controls.

> 
> It is my believe that the other fm_tx controls are unambiguously transmitter
> related, so I don't think they need a TX prefix. It doesn't hurt if someone
> can double check that, though.

hmm.. I see no problem removing the fmtx prefix of the preemphasis
enum. But, if it is becoming a generic enum, better to check if its
meaning is the same of existing emphasis enum for mpeg.

> 
> Regards,
> 
> 	Hans
> 
> -- 
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Eduardo Valentin

  reply	other threads:[~2009-06-16 10:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12 17:30 [PATCHv7 0/9] FM Transmitter (si4713) and another changes Eduardo Valentin
2009-06-12 17:30 ` [PATCHv7 1/9] v4l2-subdev.h: Add g_modulator callbacks to subdev api Eduardo Valentin
2009-06-12 17:30   ` [PATCHv7 2/9] v4l2: video device: Add V4L2_CTRL_CLASS_FM_TX controls Eduardo Valentin
2009-06-12 17:30     ` [PATCHv7 3/9] v4l2: video device: Add FM_TX controls default configurations Eduardo Valentin
2009-06-12 17:30       ` [PATCHv7 4/9] v4l2-ctl: Add support for FM TX controls Eduardo Valentin
2009-06-12 17:30         ` [PATCHv7 5/9] v4l2-spec: Add documentation description for FM TX extended control class Eduardo Valentin
2009-06-12 17:30           ` [PATCHv7 6/9] FMTx: si4713: Add files to add radio interface for si4713 Eduardo Valentin
2009-06-12 17:30             ` [PATCHv7 7/9] FMTx: si4713: Add files to handle si4713 i2c device Eduardo Valentin
2009-06-12 17:30               ` [PATCHv7 8/9] FMTx: si4713: Add Kconfig and Makefile entries Eduardo Valentin
2009-06-12 17:30                 ` [PATCHv7 9/9] FMTx: si4713: Add document file Eduardo Valentin
2009-06-14 12:31               ` [PATCHv7 7/9] FMTx: si4713: Add files to handle si4713 i2c device Hans Verkuil
2009-06-16 11:06                 ` Eduardo Valentin
2009-06-16 11:22                   ` Hans Verkuil
2009-06-16 11:30                     ` Eero Nurkkala
2009-06-16 11:50                       ` Eduardo Valentin
2009-06-16 12:05                         ` Eero Nurkkala
2009-06-14 11:14             ` [PATCHv7 6/9] FMTx: si4713: Add files to add radio interface for si4713 Hans Verkuil
2009-06-14 11:22               ` Eduardo Valentin
2009-06-14 10:41           ` [PATCHv7 5/9] v4l2-spec: Add documentation description for FM TX extended control class Hans Verkuil
2009-06-14 10:46             ` Eduardo Valentin
2009-06-14 10:46     ` [PATCHv7 2/9] v4l2: video device: Add V4L2_CTRL_CLASS_FM_TX controls Hans Verkuil
2009-06-14 10:50       ` Eduardo Valentin
2009-06-14 16:23         ` Trent Piepho
2009-06-14 16:59           ` Hans Verkuil
2009-06-16 10:52             ` Eduardo Valentin [this message]
2009-06-16 11:18               ` Hans Verkuil
2009-06-16 11:51                 ` Eduardo Valentin
2009-06-16 18:06               ` Trent Piepho
2009-06-14 11:37 ` [PATCHv7 0/9] FM Transmitter (si4713) and another changes Hans Verkuil
2009-06-16 10:47   ` Eduardo Valentin
2009-06-16 11:01     ` Hans Verkuil
2009-06-16 11:07       ` Eduardo Valentin
2009-06-18  6:34         ` Hans Verkuil

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=20090616105234.GB16092@esdhcp037198.research.nokia.com \
    --to=eduardo.valentin@nokia.com \
    --cc=dougsland@gmail.com \
    --cc=edubezval@gmail.com \
    --cc=ext-Eero.Nurkkala@nokia.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=matti.j.aaltonen@nokia.com \
    --cc=mchehab@infradead.org \
    --cc=xyzzy@speakeasy.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.