Skip to content

Commit 7256522

Browse files
palosaariMauro Carvalho Chehab
authored andcommitted
[media] cxd2820r: sleep on DVB-T/T2 delivery system switch
Fix bug introduced by multi-frontend to single-frontend change. It is safer to put DVB-T parts sleeping when auto-switching to DVB-T2 and vice versa. That was original behaviour. Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 46de20a commit 7256522

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/media/dvb/frontends/cxd2820r_core.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,19 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe)
482482

483483
/* switch between DVB-T and DVB-T2 when tune fails */
484484
if (priv->last_tune_failed) {
485-
if (priv->delivery_system == SYS_DVBT)
485+
if (priv->delivery_system == SYS_DVBT) {
486+
ret = cxd2820r_sleep_t(fe);
487+
if (ret)
488+
goto error;
489+
486490
c->delivery_system = SYS_DVBT2;
487-
else if (priv->delivery_system == SYS_DVBT2)
491+
} else if (priv->delivery_system == SYS_DVBT2) {
492+
ret = cxd2820r_sleep_t2(fe);
493+
if (ret)
494+
goto error;
495+
488496
c->delivery_system = SYS_DVBT;
497+
}
489498
}
490499

491500
/* set frontend */

0 commit comments

Comments
 (0)