[media] dvb_frontend: Update the dynamic info->type
Instead of changing the ops.info.type struct, updates only the data that will be returned to userspace. Also add some debug messages to help tracking such issues. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
6c4b78cbe6
commit
9474c5e63f
1 changed files with 9 additions and 4 deletions
|
@ -1551,6 +1551,8 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dprintk("change delivery system on cache to %d\n", c->delivery_system);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1965,6 +1967,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case FE_GET_INFO: {
|
case FE_GET_INFO: {
|
||||||
struct dvb_frontend_info* info = parg;
|
struct dvb_frontend_info* info = parg;
|
||||||
|
|
||||||
memcpy(info, &fe->ops.info, sizeof(struct dvb_frontend_info));
|
memcpy(info, &fe->ops.info, sizeof(struct dvb_frontend_info));
|
||||||
dvb_frontend_get_frequency_limits(fe, &info->frequency_min, &info->frequency_max);
|
dvb_frontend_get_frequency_limits(fe, &info->frequency_min, &info->frequency_max);
|
||||||
|
|
||||||
|
@ -1981,16 +1984,16 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
|
||||||
*/
|
*/
|
||||||
switch (dvbv3_type(c->delivery_system)) {
|
switch (dvbv3_type(c->delivery_system)) {
|
||||||
case DVBV3_QPSK:
|
case DVBV3_QPSK:
|
||||||
fe->ops.info.type = FE_QPSK;
|
info->type = FE_QPSK;
|
||||||
break;
|
break;
|
||||||
case DVBV3_ATSC:
|
case DVBV3_ATSC:
|
||||||
fe->ops.info.type = FE_ATSC;
|
info->type = FE_ATSC;
|
||||||
break;
|
break;
|
||||||
case DVBV3_QAM:
|
case DVBV3_QAM:
|
||||||
fe->ops.info.type = FE_QAM;
|
info->type = FE_QAM;
|
||||||
break;
|
break;
|
||||||
case DVBV3_OFDM:
|
case DVBV3_OFDM:
|
||||||
fe->ops.info.type = FE_OFDM;
|
info->type = FE_OFDM;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
|
@ -1998,6 +2001,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
|
||||||
__func__, c->delivery_system);
|
__func__, c->delivery_system);
|
||||||
fe->ops.info.type = FE_OFDM;
|
fe->ops.info.type = FE_OFDM;
|
||||||
}
|
}
|
||||||
|
dprintk("current delivery system on cache: %d, V3 type: %d\n",
|
||||||
|
c->delivery_system, fe->ops.info.type);
|
||||||
|
|
||||||
/* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't
|
/* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't
|
||||||
* do it, it is done for it. */
|
* do it, it is done for it. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue