From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: e9hack <e9hack@googlemail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 4/9] [media] dvb_frontend: Don't use ops->info.type anymore
Date: Thu, 05 Jan 2012 18:39:27 -0200 [thread overview]
Message-ID: <4F060A7F.6070008@redhat.com> (raw)
In-Reply-To: <4F05CD76.3080404@googlemail.com>
On 05-01-2012 14:19, e9hack wrote:
> Am 01.01.2012 21:11, schrieb Mauro Carvalho Chehab:
>> Get rid of using ops->info.type defined on DVB drivers,
>> as it doesn't apply anymore.
> ....
>>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>> ---
>> drivers/media/dvb/dvb-core/dvb_frontend.c | 541 ++++++++++++++---------------
>> 1 files changed, 266 insertions(+), 275 deletions(-)
> ....
>> diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
>> index eefcb7f..7f6ce06 100644
>> @@ -1902,6 +1850,37 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
>> memcpy(info, &fe->ops.info, sizeof(struct dvb_frontend_info));
>> dvb_frontend_get_frequency_limits(fe, &info->frequency_min, &info->frequency_max);
>>
>> + /*
>> + * Associate the 4 delivery systems supported by DVBv3
>> + * API with their DVBv5 counterpart. For the other standards,
>> + * use the closest type, assuming that it would hopefully
>> + * work with a DVBv3 application.
>> + * It should be noticed that, on multi-frontend devices with
>> + * different types (terrestrial and cable, for example),
>> + * a pure DVBv3 application won't be able to use all delivery
>> + * systems. Yet, changing the DVBv5 cache to the other delivery
>> + * system should be enough for making it work.
>> + */
>> + switch (dvbv3_type(c->delivery_system)) {
>> + case DVBV3_QPSK:
>> + fe->ops.info.type = FE_QPSK;
>> + break;
>> + case DVBV3_ATSC:
>> + fe->ops.info.type = FE_ATSC;
>> + break;
>> + case DVBV3_QAM:
>> + fe->ops.info.type = FE_QAM;
>> + break;
>> + case DVBV3_OFDM:
>> + fe->ops.info.type = FE_OFDM;
>> + break;
>> + default:
>> + printk(KERN_ERR
>> + "%s: doesn't know how to handle a DVBv3 call to delivery system %i\n",
>> + __func__, c->delivery_system);
>> + fe->ops.info.type = FE_OFDM;
>> + }
>> +
>
> Hi,
>
> I think this is partly wrong. The old delivery system values must be set in the given data
> structure from caller:
>
> fe->ops.info.type = FE_QAM;
>
> must be replace by
>
> info->type = FE_QAM;
Yeah, I noticed it today, when testing it with DRX-K. Patches fixing it
were sent to the ML earlier, but it ends that your solution is better
than mine ;) I've re-sent the patch to the ML, and added it upstream.
Thanks for noticing it!
Mauro
next prev parent reply other threads:[~2012-01-05 20:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-01 20:11 [PATCH 0/9] dvb_frontend: Don't rely on drivers filling ops->info.type Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 1/9] [media] dvb: Initialize all cache values Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 2/9] [media] dvb_frontend: Handle all possible DVBv3 values for bandwidth Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 3/9] [media] dvb: move dvb_set_frontend logic into a separate routine Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 4/9] [media] dvb_frontend: Don't use ops->info.type anymore Mauro Carvalho Chehab
2012-01-05 16:19 ` e9hack
2012-01-05 20:39 ` Mauro Carvalho Chehab [this message]
2012-01-01 20:11 ` [PATCH 5/9] [media] dvb_frontend: Fix DVBv3 emulation Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 6/9] [media] dvb-core: Fix ISDB-T defaults Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 7/9] [media] dvb: get rid of fepriv->parameters_in Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 8/9] [media] dvb: deprecate the usage of ops->info.type Mauro Carvalho Chehab
2012-01-01 20:11 ` [PATCH 9/9] [media] dvb: Remove ops->info.type from frontends Mauro Carvalho Chehab
2012-01-02 7:31 ` [PATCH 0/9] dvb_frontend: Don't rely on drivers filling ops->info.type Manu Abraham
2012-01-02 10:55 ` Mauro Carvalho Chehab
2012-01-02 11:40 ` Mauro Carvalho Chehab
2012-01-02 11:48 ` Manu Abraham
2012-01-02 14:33 ` Mauro Carvalho Chehab
2012-01-02 16:48 ` Manu Abraham
2012-01-02 17:43 ` Manu Abraham
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=4F060A7F.6070008@redhat.com \
--to=mchehab@redhat.com \
--cc=e9hack@googlemail.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.