media: dvb-frontends/cxd2841er: do sleep on delivery system change
authorDaniel Scheller <d.scheller@gmx.net>
Tue, 11 Jul 2017 21:06:05 +0000 (17:06 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 20 Jul 2017 19:06:45 +0000 (15:06 -0400)
commitbd2355b8efc684e3ab74f8a5284d1dfaa9384056
tree95bc59f1fa5943b90c38e8913c8f9e73a742aa36
parentd4a06464c20540a2c266a371b1602d300b99f11e
media: dvb-frontends/cxd2841er: do sleep on delivery system change

Discovered using w_scan when scanning DVB-T/T2: When w_scan goes from -T
to -T2, it does so without stopping the frontend using .sleep. Due to
this, the demod operation mode isn't re-setup, but as it still is in
STATE_ACTIVE_TC, PLP and T2 Profile are set up, but only retune_active()
is called, leaving the demod in T mode, thus not operable on any T2
frequency.

Fix this by putting the demod to sleep if priv->system isn't equal to
p->delsys. To properly accomplish this, sleep_tc() is split into
sleep_tc() and shutdown_tc(), where sleep_tc() will only perform the
sleep operation, while shutdown_tc() additionally performs the full
demod shutdown (to keep the behaviour when the .sleep FE_OP is called).

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/cxd2841er.c