Commit 37fa53c6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dvb_frontend: improve documentation on set_delivery_system()

While this patch change some things, the updated fields there are
used just on printk, so it shouldn't cause any functional changes.

Yet, this routine is a little complex, so explain a little more
how it works.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9474c5e6
...@@ -1440,9 +1440,13 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system) ...@@ -1440,9 +1440,13 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system)
if (desired_system == SYS_UNDEFINED) { if (desired_system == SYS_UNDEFINED) {
/* /*
* A DVBv3 call doesn't know what's the desired system. * A DVBv3 call doesn't know what's the desired system.
* So, don't change the current delivery system. Instead, * Also, DVBv3 applications don't know that ops.info->type
* find the closest DVBv3 system that matches the delivery * could be changed, and they simply dies when it doesn't
* system. * match.
* So, don't change the current delivery system, as it
* may be trying to do the wrong thing, like setting an
* ISDB-T frontend as DVB-T. Instead, find the closest
* DVBv3 system that matches the delivery system.
*/ */
if (is_dvbv3_delsys(c->delivery_system)) { if (is_dvbv3_delsys(c->delivery_system)) {
dprintk("%s() Using delivery system to %d\n", dprintk("%s() Using delivery system to %d\n",
...@@ -1452,27 +1456,29 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system) ...@@ -1452,27 +1456,29 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system)
type = dvbv3_type(c->delivery_system); type = dvbv3_type(c->delivery_system);
switch (type) { switch (type) {
case DVBV3_QPSK: case DVBV3_QPSK:
desired_system = FE_QPSK; desired_system = SYS_DVBS;
break; break;
case DVBV3_QAM: case DVBV3_QAM:
desired_system = FE_QAM; desired_system = SYS_DVBC_ANNEX_A;
break; break;
case DVBV3_ATSC: case DVBV3_ATSC:
desired_system = FE_ATSC; desired_system = SYS_ATSC;
break; break;
case DVBV3_OFDM: case DVBV3_OFDM:
desired_system = FE_OFDM; desired_system = SYS_DVBT;
break; break;
default: default:
dprintk("%s(): This frontend doesn't support DVBv3 calls\n", dprintk("%s(): This frontend doesn't support DVBv3 calls\n",
__func__); __func__);
return -EINVAL; return -EINVAL;
} }
delsys = c->delivery_system;
} else { } else {
/* /*
* Check if the desired delivery system is supported * This is a DVBv5 call. So, it likely knows the supported
* delivery systems.
*/ */
/* Check if the desired delivery system is supported */
ncaps = 0; ncaps = 0;
while (fe->ops.delsys[ncaps] && ncaps < MAX_DELSYS) { while (fe->ops.delsys[ncaps] && ncaps < MAX_DELSYS) {
if (fe->ops.delsys[ncaps] == desired_system) { if (fe->ops.delsys[ncaps] == desired_system) {
...@@ -1518,6 +1524,9 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system) ...@@ -1518,6 +1524,9 @@ 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 DMBTH
* for older DVBv5 applications. The emulation will try to use * for older DVBv5 applications. The emulation will try to use
* the auto mode for most things, and will assume that the desired * the auto mode for most things, and will assume that the desired
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment