media: dvb_frontend: regression fix: userspace ABI broken for xine
commit72043dfc657fa79898ec740fc7387b0efd767422
authorChris Rankin <rankincj@yahoo.com>
Fri, 6 Apr 2012 21:38:18 +0000 (6 18:38 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 16:13:57 +0000 (13 09:13 -0700)
tree99b53f025a8e6df95c53579bb6be1bd67dd0d10c
parent4b06fc96136303af61cd835bb1504f50cb23a615
media: dvb_frontend: regression fix: userspace ABI broken for xine

commit 556a0442e08a8bc8541587a349cbf26ed14ec6de upstream.

The commit e399ce77e6e has broken the DVB ABI for xine:

The problem is that xine is expecting every event after a successful
FE_SET_FRONTEND ioctl to have a non-zero frequency parameter, regardless
of whether the tuning process has LOCKed yet. What used to happen is
that the events inherited the initial tuning parameters from the
FE_SET_FRONTEND call. However, the fepriv->parameters_out struct is now
not initialised until the status contains the FE_HAS_LOCK bit.

You might argue that this behaviour is intentional, except that if an
application other than xine uses the DVB adapter and manages to set the
parameters_out.frequency field to something other than zero, then xine
no longer has any problems until either the adapter is replugged or the
kernel modules reloaded. This can only mean that the
fepriv->parameters_out struct still contains the (stale) tuning
information from the previous application.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb/dvb-core/dvb_frontend.c