media: dvb-frontends/stv0910: rework and fix DiSEqC send
authorDaniel Scheller <d.scheller@gmx.net>
Fri, 9 Feb 2018 18:22:49 +0000 (13:22 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 13:58:34 +0000 (08:58 -0500)
commitda2cf18ff883b6130b1a6e4a3e9402abcb9f5bc0
tree6aab1b91de962d691b5ec15d951283b8101d1fcc
parent15f757bb5ab237a123a2d5a8140cece1bc7bb617
media: dvb-frontends/stv0910: rework and fix DiSEqC send

Rework both DiSEqC send functions (send_master_cmd() and send_burst()) to
utilise the new SET_REG() and SET_FIELD() macros. Esp. due to SET_FIELD(),
this makes sure that not all bits (with unrelated purposes) are always
rewritten, but only those needed for sending DiSEqC commands. In
send_burst(), this makes sure that DISEQC_MODE isn't changed from 3 to 2
inbetween when sending SEC_MINI_A. Also, change both functions to write
DISEQC_MODE first before setting DIS_PRECHARGE. This makes diseqc control
work more reliable for "fullblown" DiSEqC strings in VDR's diseqc.conf in
combination with certain multiswitches.

Fixes: 448461af0e19 ("media: dvb-frontends/stv0910: implement diseqc_send_burst")

Reported-by: Helmut Auer <post@helmutauer.de>
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Helmut Auer <post@helmutauer.de>
Tested-by: Richard Scobie <rascobie@slingshot.co.nz>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/stv0910.c