All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chapman <dave@dchapman.com>
To: linux-media@vger.kernel.org
Subject: DVB Modulator API
Date: Mon, 04 Nov 2013 18:48:11 +0000	[thread overview]
Message-ID: <5277EBEB.4060606@dchapman.com> (raw)

Hi all,

Given the recent patches by Maik Broemme adding support for a DVB-C 
modulator, I thought I would mention that I'm working on a driver for a 
DVB-T modulator and would like to open a discussion regarding how to 
integrate modulator support into the existing DVB API and kernel sub-system.

The device I'm working with is a $169 (USD) USB DVB-T modulator based on 
the it9507 ASIC from ITE.  ITE provide a GPL'd Linux driver, but this is 
40K+ lines of code and is based on their generic cross-platform SDK 
supporting a range of devices.

The device can be purchased here in various incarnations:

http://www.idealez.com/hides/product-gallery/en_US/1-0/554

and I have been working on github here:

https://github.com/linuxstb/it9507

The original ITE driver is in the it950x_linux_v13.06.27.1 directory 
there, and my work-in-progress version is in it9507-driver.  ITE have 
also provided me with some documentation, which is in the docs directory.

Some versions of the modulator USB stick come with a demodulator (based 
on the it9133), the output of which can be sent to the modulator 
directly via a TS interface.  The it9507 also has a USB interface.

For initial simplicity (and because I don't own such a device), my 
driver only supports the modulator, but in discussing an API, it's 
obviously useful to be aware of such devices.

The hardware also has hardware PID filtering (allowing both whitelisting 
and blacklisting of data being transferred from the demod to the mod) 
and also the ability to insert SI packets into the modulated stream at 
user-definited intervals.  Again, my driver doesn't support these 
features yet.

Regarding the API, I've looked at the ddbridge driver here:

http://www.metzlerbros.de/dddvb/dddvb-0.9.10.tar.bz2

and from what I can understand, this adds a new "mod0" device to access 
the DVB-C modulator.  The API is as follows:

struct dvb_mod_params {
	__u32 base_frequency;
	__u32 attenuator;
};

struct dvb_mod_channel_params {
	enum fe_modulation modulation;

	__u32 rate_increment;
	
};

#define DVB_MOD_SET              _IOW('o', 208, struct dvb_mod_params)
#define DVB_MOD_CHANNEL_SET      _IOW('o', 209, struct 
dvb_mod_channel_params)

I've no idea what "rate_increment" is.

Looking in the docs/modulator file, there also appears to be some 
ability to redirect data from a demod to a mod via 
/sys/class/ddbridge/ddbridge0/redirect


As a comparison, the current API for my driver can be seen here:

https://github.com/linuxstb/it9507/blob/master/it9507-driver/include/dvbmod.h

My driver is currently not integrated into the DVB subsystem, and as 
such creates /dev/dvbmod%d device.  This is used for the ioctls and also 
for writing the TS to the modulator.

The it9507 driver uses a software attenuation, and the range is 
dependent (but only very slightly - +/- a couple of dB at either end of 
the scale) on the frequency.  So I've currently implemented a 
DVBMOD_GET_RF_GAIN_RANGE ioctl to get the available gain range for a 
specific frequency, but it wouldn't be a big loss to change the driver 
to just limit the gain to the subset that works on all frequencies, 
removing that call from the API.

I haven't had chance yet to seriously consider a generic modulator API, 
but with one modulator driver now being considered for inclusion I 
wanted to make those considering the API aware of my work.

It seems clear however that neither my current API, nor that included 
with the ddbridge DVB-C modulator is generic enough at the moment.

Regards,

Dave.

             reply	other threads:[~2013-11-04 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 18:48 Dave Chapman [this message]
2013-11-04 22:25 ` DVB Modulator API Ralph Metzler

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=5277EBEB.4060606@dchapman.com \
    --to=dave@dchapman.com \
    --cc=linux-media@vger.kernel.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.