Skip to content

Commit

Permalink
[media] dvb-frontends/cxd2841er: make lock wait in set_fe_tc() optional
Browse files Browse the repository at this point in the history
Don't wait for FE_HAS_LOCK in set_frontend_tc() and thus don't hammer the
lock status register with inquiries when CXD2841ER_NO_WAIT_LOCK is set
in the configuration, which also unneccessarily blocks applications until
a TS LOCK has been acquired. Rather, API and applications will check for
a TS LOCK by utilising the tune fe_op, read_status and get_frontend ops,
which is sufficient.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
  • Loading branch information
herrnst committed Mar 29, 2017
1 parent 16f8987 commit 2eeb3f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/dvb-frontends/cxd2841er.c
Expand Up @@ -3518,6 +3518,10 @@ static int cxd2841er_set_frontend_tc(struct dvb_frontend *fe)
cxd2841er_tuner_set(fe);

cxd2841er_tune_done(priv);

if (priv->flags & CXD2841ER_NO_WAIT_LOCK)
goto done;

timeout = 2500;
while (timeout > 0) {
ret = cxd2841er_read_status_tc(fe, &status);
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb-frontends/cxd2841er.h
Expand Up @@ -30,6 +30,7 @@
#define CXD2841ER_ASCOT 8 /* bit 3 */
#define CXD2841ER_EARLY_TUNE 16 /* bit 4 */
#define CXD2841ER_SLEEPONSWITCH 32 /* bit 5 */
#define CXD2841ER_NO_WAIT_LOCK 64 /* bit 6 */
#define CXD2841ER_HW_DDB 8388608 /* bit 23 */

enum cxd2841er_xtal {
Expand Down

0 comments on commit 2eeb3f0

Please sign in to comment.