Re: [PATCH RFCv2] add DTMB support for DVB API
On Saturday 14 January 2012 16:31:16 Antti Palosaari wrote: > Version 2. I have made some changes from feedback got and > what I myself found better. I will add documentation later > after API issues are resolved. > Thanks to Andreas, Patrick and Mauro. > > Cc: Patrick Boettcher > Cc: Andreas Oberritter > Cc: Mauro Carvalho Chehab > Signed-off-by: Antti Palosaari > --- > drivers/media/dvb/dvb-core/dvb_frontend.c | 14 +++--- > drivers/media/dvb/dvb-core/dvb_frontend.h |2 ++ > drivers/media/dvb/frontends/atbm8830.c|2 +- > drivers/media/dvb/frontends/lgs8gl5.c |2 +- > drivers/media/dvb/frontends/lgs8gxx.c |2 +- > include/linux/dvb/frontend.h | 22 > +++--- include/linux/dvb/version.h | > 2 +- > 7 files changed, 36 insertions(+), 10 deletions(-) > > diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c > b/drivers/media/dvb/dvb-core/dvb_frontend.c > index b15db4f..abdc203 100644 > --- a/drivers/media/dvb/dvb-core/dvb_frontend.c > +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c > @@ -177,7 +177,7 @@ static enum dvbv3_emulation_type dvbv3_type(u32 > delivery_system) > case SYS_DVBT: > case SYS_DVBT2: > case SYS_ISDBT: > - case SYS_DMBTH: > + case SYS_DTMB: > return DVBV3_OFDM; > case SYS_ATSC: > case SYS_DVBC_ANNEX_B: > @@ -989,6 +989,7 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND > + 1] = { > _DTV_CMD(DTV_CODE_RATE_LP, 1, 0), > _DTV_CMD(DTV_GUARD_INTERVAL, 1, 0), > _DTV_CMD(DTV_TRANSMISSION_MODE, 1, 0), > + _DTV_CMD(DTV_INTERLEAVING, 1, 0), > > _DTV_CMD(DTV_ISDBT_PARTIAL_RECEPTION, 1, 0), > _DTV_CMD(DTV_ISDBT_SOUND_BROADCASTING, 1, 0), > @@ -1039,6 +1040,7 @@ static struct dtv_cmds_h > dtv_cmds[DTV_MAX_COMMAND + 1] = { > _DTV_CMD(DTV_GUARD_INTERVAL, 0, 0), > _DTV_CMD(DTV_TRANSMISSION_MODE, 0, 0), > _DTV_CMD(DTV_HIERARCHY, 0, 0), > + _DTV_CMD(DTV_INTERLEAVING, 0, 0), > > _DTV_CMD(DTV_ENUM_DELSYS, 0, 0), > }; > @@ -1316,6 +1318,9 @@ static int dtv_property_process_get(struct > dvb_frontend *fe, > case DTV_HIERARCHY: > tvp->u.data = c->hierarchy; > break; > + case DTV_INTERLEAVING: > + tvp->u.data = c->interleaving; > + break; > > /* ISDB-T Support here */ > case DTV_ISDBT_PARTIAL_RECEPTION: > @@ -1503,7 +1508,7 @@ static int set_delivery_system(struct > dvb_frontend *fe, u32 desired_system) >* The DVBv3 or DVBv5 call is requesting a different system. So, >* emulation is needed. >* > - * Emulate newer delivery systems like ISDBT, DVBT and DMBTH > + * Emulate newer delivery systems like ISDBT, DVBT and DTMB >* for older DVBv5 applications. The emulation will try to use >* the auto mode for most things, and will assume that the desired >* delivery system is the last one at the ops.delsys[] array > @@ -1625,6 +1630,9 @@ static int dtv_property_process_set(struct > dvb_frontend *fe, > case DTV_HIERARCHY: > c->hierarchy = tvp->u.data; > break; > + case DTV_INTERLEAVING: > + c->interleaving = tvp->u.data; > + break; > > /* ISDB-T Support here */ > case DTV_ISDBT_PARTIAL_RECEPTION: > @@ -1896,7 +1904,7 @@ static int dtv_set_frontend(struct dvb_frontend > *fe) case SYS_DVBT: > case SYS_DVBT2: > case SYS_ISDBT: > - case SYS_DMBTH: > + case SYS_DTMB: > fepriv->min_delay = HZ / 20; > fepriv->step_size = fe->ops.info.frequency_stepsize * 2; > fepriv->max_drift = (fe->ops.info.frequency_stepsize * > 2) + 1; > diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h > b/drivers/media/dvb/dvb-core/dvb_frontend.h > index d63a821..fb2d57c 100644 > --- a/drivers/media/dvb/dvb-core/dvb_frontend.h > +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h > @@ -353,6 +353,8 @@ struct dtv_frontend_properties { > > fe_delivery_system_tdelivery_system; > > + fe_interleaving_t interleaving; > + > /* ISDB-T specifics */ > u8 isdbt_partial_reception; > u8 isdbt_sb_mode; > diff --git a/drivers/media/dvb/frontends/atbm8830.c > b/drivers/media/dvb/frontends/atbm8830.c > index a2261ea..4e11dc4 100644 > --- a/drivers/media/dvb/frontends/atbm8830.c > +++ b/drivers/media/dvb/frontends/atbm8830.c > @@ -428,7 +428,7 @@ static int atbm8830_i2c_gate_ctrl(struct > dvb_frontend *fe, int enable) > } > > static struct dvb_frontend_ops atbm8830_ops = { > - .delsys = { SYS_DMBTH }, > + .delsys = { SYS_DTMB }, > .info = { > .name = "AltoBeam ATBM8830/8831 DMB-TH", > .frequency_min = 47400, > diff --git a/drivers/media/dvb/frontends/lgs8gl5.c > b/drivers/media/dvb/frontends/lgs8gl5.c > ind
Re: [PATCH RFCv2] add DTMB support for DVB API
Em 14-01-2012 13:35, Antti Palosaari escreveu: > On 01/14/2012 05:31 PM, Antti Palosaari wrote: >> +typedef enum fe_interleaving { >> + INTERLEAVING_NONE, >> + INTERLEAVING_240, >> + INTERLEAVING_720, >> +} fe_interleaving_t; > > Checkpatch didn't like that, but I left it as all the others are similar. I > am happy to fix it too if there is idea what it should be. > > WARNING: do not add new typedefs > #165: FILE: include/linux/dvb/frontend.h:225: > +typedef enum fe_interleaving { Just use: enum fe_interleaving { ... }; having a typedef here won't help at all, as the DVBv5 API uses "u32" for the types. So, a typecast will happen anyway every time this is used. Regards, Mauro. -- 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 RFCv2] add DTMB support for DVB API
On 01/14/2012 05:31 PM, Antti Palosaari wrote: +typedef enum fe_interleaving { + INTERLEAVING_NONE, + INTERLEAVING_240, + INTERLEAVING_720, +} fe_interleaving_t; Checkpatch didn't like that, but I left it as all the others are similar. I am happy to fix it too if there is idea what it should be. WARNING: do not add new typedefs #165: FILE: include/linux/dvb/frontend.h:225: +typedef enum fe_interleaving { Antti -- http://palosaari.fi/ -- 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 RFCv2] add DTMB support for DVB API
Version 2. I have made some changes from feedback got and what I myself found better. I will add documentation later after API issues are resolved. Thanks to Andreas, Patrick and Mauro. Cc: Patrick Boettcher Cc: Andreas Oberritter Cc: Mauro Carvalho Chehab Signed-off-by: Antti Palosaari --- drivers/media/dvb/dvb-core/dvb_frontend.c | 14 +++--- drivers/media/dvb/dvb-core/dvb_frontend.h |2 ++ drivers/media/dvb/frontends/atbm8830.c|2 +- drivers/media/dvb/frontends/lgs8gl5.c |2 +- drivers/media/dvb/frontends/lgs8gxx.c |2 +- include/linux/dvb/frontend.h | 22 +++--- include/linux/dvb/version.h |2 +- 7 files changed, 36 insertions(+), 10 deletions(-) diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index b15db4f..abdc203 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -177,7 +177,7 @@ static enum dvbv3_emulation_type dvbv3_type(u32 delivery_system) case SYS_DVBT: case SYS_DVBT2: case SYS_ISDBT: - case SYS_DMBTH: + case SYS_DTMB: return DVBV3_OFDM; case SYS_ATSC: case SYS_DVBC_ANNEX_B: @@ -989,6 +989,7 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { _DTV_CMD(DTV_CODE_RATE_LP, 1, 0), _DTV_CMD(DTV_GUARD_INTERVAL, 1, 0), _DTV_CMD(DTV_TRANSMISSION_MODE, 1, 0), + _DTV_CMD(DTV_INTERLEAVING, 1, 0), _DTV_CMD(DTV_ISDBT_PARTIAL_RECEPTION, 1, 0), _DTV_CMD(DTV_ISDBT_SOUND_BROADCASTING, 1, 0), @@ -1039,6 +1040,7 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { _DTV_CMD(DTV_GUARD_INTERVAL, 0, 0), _DTV_CMD(DTV_TRANSMISSION_MODE, 0, 0), _DTV_CMD(DTV_HIERARCHY, 0, 0), + _DTV_CMD(DTV_INTERLEAVING, 0, 0), _DTV_CMD(DTV_ENUM_DELSYS, 0, 0), }; @@ -1316,6 +1318,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe, case DTV_HIERARCHY: tvp->u.data = c->hierarchy; break; + case DTV_INTERLEAVING: + tvp->u.data = c->interleaving; + break; /* ISDB-T Support here */ case DTV_ISDBT_PARTIAL_RECEPTION: @@ -1503,7 +1508,7 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system) * The DVBv3 or DVBv5 call is requesting a different system. So, * emulation is needed. * -* Emulate newer delivery systems like ISDBT, DVBT and DMBTH +* Emulate newer delivery systems like ISDBT, DVBT and DTMB * for older DVBv5 applications. The emulation will try to use * the auto mode for most things, and will assume that the desired * delivery system is the last one at the ops.delsys[] array @@ -1625,6 +1630,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe, case DTV_HIERARCHY: c->hierarchy = tvp->u.data; break; + case DTV_INTERLEAVING: + c->interleaving = tvp->u.data; + break; /* ISDB-T Support here */ case DTV_ISDBT_PARTIAL_RECEPTION: @@ -1896,7 +1904,7 @@ static int dtv_set_frontend(struct dvb_frontend *fe) case SYS_DVBT: case SYS_DVBT2: case SYS_ISDBT: - case SYS_DMBTH: + case SYS_DTMB: fepriv->min_delay = HZ / 20; fepriv->step_size = fe->ops.info.frequency_stepsize * 2; fepriv->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1; diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h index d63a821..fb2d57c 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -353,6 +353,8 @@ struct dtv_frontend_properties { fe_delivery_system_tdelivery_system; + fe_interleaving_t interleaving; + /* ISDB-T specifics */ u8 isdbt_partial_reception; u8 isdbt_sb_mode; diff --git a/drivers/media/dvb/frontends/atbm8830.c b/drivers/media/dvb/frontends/atbm8830.c index a2261ea..4e11dc4 100644 --- a/drivers/media/dvb/frontends/atbm8830.c +++ b/drivers/media/dvb/frontends/atbm8830.c @@ -428,7 +428,7 @@ static int atbm8830_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) } static struct dvb_frontend_ops atbm8830_ops = { - .delsys = { SYS_DMBTH }, + .delsys = { SYS_DTMB }, .info = { .name = "AltoBeam ATBM8830/8831 DMB-TH", .frequency_min = 47400, diff --git a/drivers/media/dvb/frontends/lgs8gl5.c b/drivers/media/dvb/frontends/lgs8gl5.c index 2cec804..416cce3 100644 --- a/drivers/media/dvb/frontends/lgs8gl5.c +++ b/drivers/media/dvb/frontends/lgs8gl5.c @@ -412,7 +412,7 @@ EXPORT_SYMBOL(lgs8gl5_attach);