Re: [PATCH 4/9] [media] dvb_frontend: Don't use ops->info.type anymore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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;

Regards,
Hartmut
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux