From: Oliver Endriss <o.endriss@gmx.de>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org
Subject: Re: [git:v4l-dvb/for_v3.3] [media] dvb_frontend: Don't use ops->info.type anymore
Date: Sat, 7 Jan 2012 01:36:44 +0100 [thread overview]
Message-ID: <201201070136.45149@orion.escape-edv.de> (raw)
In-Reply-To: <E1RiZbZ-0002R2-ND@www.linuxtv.org>
On Wednesday 04 January 2012 20:29:36 Mauro Carvalho Chehab wrote:
> drivers/media/dvb/dvb-core/dvb_frontend.c | 541 ++++++++++++++---------------
> 1 files changed, 266 insertions(+), 275 deletions(-)
> ...
> -static int dvb_frontend_check_parameters(struct dvb_frontend *fe,
> - struct dvb_frontend_parameters *parms)
> +static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
> {
> ...
> - /* check for supported modulation */
> - if (fe->ops.info.type == FE_QAM &&
> - (parms->u.qam.modulation > QAM_AUTO ||
> - !((1 << (parms->u.qam.modulation + 10)) & fe->ops.info.caps))) {
> - printk(KERN_WARNING "DVB: adapter %i frontend %i modulation %u not supported\n",
> - fe->dvb->num, fe->id, parms->u.qam.modulation);
> + /*
> + * check for supported modulation
> + *
> + * This is currently hacky. Also, it only works for DVB-S & friends,
> + * and not all modulations has FE_CAN flags
> + */
> + switch (c->delivery_system) {
> + case SYS_DVBS:
> + case SYS_DVBS2:
> + case SYS_TURBO:
> + if ((c->modulation > QAM_AUTO ||
> + !((1 << (c->modulation + 10)) & fe->ops.info.caps))) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> + printk(KERN_WARNING
> + "DVB: adapter %i frontend %i modulation %u not supported\n",
> + fe->dvb->num, fe->id, c->modulation);
> return -EINVAL;
> + }
> + break;
> ...
This code is completely bogus: I get tons of warnings, if vdr tries to
tune to DVB-S2 (modulation == 9 == PSK_8) on my stv090x.
PSK_8 == 9 is > QAM_AUTO, and the shift operation does not make much
sense, except for modulation == 0 == QPSK.
The original version makes more sense for me.
CU
Oliver
--
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
next parent reply other threads:[~2012-01-07 0:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1RiZbZ-0002R2-ND@www.linuxtv.org>
2012-01-07 0:36 ` Oliver Endriss [this message]
2012-01-07 2:05 ` [git:v4l-dvb/for_v3.3] [media] dvb_frontend: Don't use ops->info.type anymore Mauro Carvalho Chehab
2012-01-07 5:18 ` Oliver Endriss
2012-01-07 7:34 ` Mauro Carvalho Chehab
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=201201070136.45149@orion.escape-edv.de \
--to=o.endriss@gmx.de \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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.