History log of /drivers/media/tuners/fc2580.c
Revision Date Author Comments
8845cc6415ec28ef8d57b3fb81c75ef9bce69c5f 11-Apr-2014 Antti Palosaari <crope@iki.fi> [media] fc2580: fix tuning failure on 32-bit arch

There was some frequency calculation overflows which caused tuning
failure on 32-bit architecture. Use 64-bit numbers where needed in
order to avoid calculation overflows.

Thanks for the Finnish person, who asked remain anonymous, reporting,
testing and suggesting the fix.

Cc: <stable@vger.kernel.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
f1baab870f6e93b668af7b34d6f6ba49f1b0e982 02-Nov-2013 Mauro Carvalho Chehab <m.chehab@samsung.com> [media] tuners: Don't use dynamic static allocation

Dynamic static allocation is evil, as Kernel stack is too low, and
compilation complains about it on some archs:
drivers/media/tuners/e4000.c:50:1: warning: 'e4000_wr_regs' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/e4000.c:83:1: warning: 'e4000_rd_regs' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/fc2580.c:66:1: warning: 'fc2580_wr_regs.constprop.1' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/fc2580.c:98:1: warning: 'fc2580_rd_regs.constprop.0' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/tda18212.c:57:1: warning: 'tda18212_wr_regs' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/tda18212.c:90:1: warning: 'tda18212_rd_regs.constprop.0' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/tda18218.c:60:1: warning: 'tda18218_wr_regs' uses dynamic stack allocation [enabled by default]
drivers/media/tuners/tda18218.c:92:1: warning: 'tda18218_rd_regs.constprop.0' uses dynamic stack allocation [enabled by default]
Instead, let's enforce a limit for the buffer. Considering that I2C
transfers are generally limited, and that devices used on USB has a
max data length of 64 bytes for the control URBs.
So, it seem safe to use 64 bytes as the hard limit for all those devices.
On most cases, the limit is a way lower than that, but this limit
is small enough to not affect the Kernel stack, and it is a no brain
limit, as using smaller ones would require to either carefully each
driver or to take a look on each datasheet.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
f2ea86dec08d194f345be4c8b0e792c787b30f53 06-Nov-2012 Antti Palosaari <crope@iki.fi> [media] fc2580: write some registers conditionally

It was a bad idea, as comment also says, to write some "don't care"
registers as 0xff value. Fix it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9dc72160d13c6fdeec57f5c6017588812c4294b6 24-Sep-2012 Gianluca Gennari <gennarone@gmail.com> [media] fc2580: use macro for 64 bit division and reminder

Fixes the following warnings on a 32 bit system with GCC 4.4.3 and kernel Ubuntu 2.6.32-43 32 bit:
WARNING: "__udivdi3" [fc2580.ko] undefined!
WARNING: "__umoddi3" [fc2580.ko] undefined!

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6e6dc88f3777bedaf7cec5987b251975a3d14d3d 24-Sep-2012 Gianluca Gennari <gennarone@gmail.com> [media] fc2580: silence uninitialized variable warning

fc2580.c: In function 'fc2580_set_params':
fc2580.c:118: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e221a1b8960e7083029018e3cf2b4097e27d4891 24-Sep-2012 Gianluca Gennari <gennarone@gmail.com> [media] fc2580: define const as UL to silence a warning

fc2580.c: In function 'fc2580_set_params':
fc2580.c:150: warning: this decimal constant is unsigned only in ISO C90

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ef40c0088ecbc8863c9404c96065269c83c16259 22-Sep-2012 Antti Palosaari <crope@iki.fi> [media] fc2580: fix crash when attach fails

Callbacks were set even attach failed. This leads calling
.release() in error case and resulted crash.

Reported-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
132f56fb3c83c032cd75cd99c2967905e65f8684 22-Sep-2012 Antti Palosaari <crope@iki.fi> [media] fc2580: small improvements for chip id check

* better readability
* make checkpatch.pl happy
* few bytes smaller binary footprint

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d67ceb3398d7ae7fda78ec753639296f442ecf66 20-Sep-2012 Oliver Schinagl <oliver@schinagl.nl> [media] Support for Asus MyCinema U3100Mini Plus

This is initial support for the Asus MyCinema U3100Mini Plus. The driver
in its current form gets detected and loads properly.
Scanning using dvbscan works without problems, Locking onto a channel
using tzap also works fine. Only playback using tzap -r + mplayer was
tested and was fully functional.
It uses the af9035 USB Bridge chip, with an af9033 demodulator. The tuner
used is the FCI FC2580.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d9cb41afbf2aab54133c804009a1b8e76cedaef3 09-Sep-2012 Antti Palosaari <crope@iki.fi> [media] tuners: add FCI FC2580 silicon tuner driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>