diff options
author | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2017-10-04 18:26:56 +0200 |
---|---|---|
committer | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2017-10-09 20:06:29 +0200 |
commit | b9af4409bcdfb85a39fd08a25ed59e54a9c07283 (patch) | |
tree | 7689ea9801b74bddba9996f0bef8c3d585c9954b /stream | |
parent | 22442b421cbfdb8fec3d1cbfcc8a6b5c251d47b8 (diff) |
dvb: Explicitly clear via DVBv5 before reverting to DVBv3.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Diffstat (limited to 'stream')
-rw-r--r-- | stream/dvb_tune.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c index da4a8f5ad3..d3993ae65d 100644 --- a/stream/dvb_tune.c +++ b/stream/dvb_tune.c @@ -714,8 +714,18 @@ static int tune_it(dvb_priv_t *priv, int fd_frontend, unsigned int delsys, int tune_status = check_status(priv, fd_frontend, timeout); if (tune_status != 0) { - MP_ERR(priv, "ERROR locking to channel when tuning with S2API, falling back to DVBv3-tuning.\n"); - goto old_api; + MP_ERR(priv, "ERROR locking to channel when tuning with S2API, clearing and falling back to DVBv3-tuning.\n"); + struct dtv_property p_clear[] = { + { .cmd = DTV_CLEAR }, + }; + struct dtv_properties cmdseq_clear = { + .num = 1, + .props = p_clear + }; + if (ioctl(fd_frontend, FE_SET_PROPERTY, &cmdseq_clear) < 0) { + MP_ERR(priv, "FE_SET_PROPERTY DTV_CLEAR failed\n"); + } + goto old_api; } else { return tune_status; } |