Commit Graph

208 Commits

Author SHA1 Message Date
Antti Palosaari 5fa51cc36a [media] msi001: logging changes
Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21 16:42:34 -03:00
Mauro Carvalho Chehab 3cf0c6bd68 Merge remote-tracking branch 'linus/master' into patchwork
There are some patches that depends on media-v3.16-rc6.
So, merge back from upstream before applying them.

* linus/master: (1123 commits)
  drm/nouveau: ltc/gf100-: fix cbc issues on certain boards
  drm/bochs: add missing drm_connector_register call
  drm/cirrus: add missing drm_connector_register call
  staging: vt6655: buffer overflow in ioctl
  USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
  USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
  USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
  USB: EHCI: unlink QHs even after the controller has stopped
  [SCSI] fix for bidi use after free
  [SCSI] fix regression that accidentally disabled block-based tcq
  [SCSI] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu
  drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page
  drm/nouveau/runpm: fix module unload
  drm/radeon/px: fix module unload
  vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops
  drm/radeon: don't reset dma on r6xx-evergreen init
  drm/radeon: don't reset sdma on CIK init
  drm/radeon: don't reset dma on NI/SI init
  drm/radeon/dpm: fix resume on mullins
  drm/radeon: Disable HDP flush before every CS again for < r600
  ...
2014-09-21 16:40:04 -03:00
Antti Palosaari f461694b96 [media] m88ts2022: change parameter type of m88ts2022_cmd
It is driver internal function and does not need anything from
frontend structure. Due to that change parameter type to driver
state which is better for driver internal functions.

Also remove one unused variable from state itself.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:55 -03:00
Antti Palosaari 35c77a8546 [media] m88ts2022: convert to RegMap I2C API
Use RegMap to cover I2C register routines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:55 -03:00
Antti Palosaari b8d67ab656 [media] m88ts2022: clean up logging
There is no need to print module name nor function name as those
are done by kernel logging system when dev_xxx logging is used and
driver is proper I2C driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:54 -03:00
Antti Palosaari eb773df5d2 [media] m88ts2022: rename device state (priv => dev)
foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08 10:00:54 -03:00
Bimow Chen 01b461bbe7 [media] it913x: init tuner on attach
That register is needed to program very first in order to operate
correctly.

[crope@iki.fi: returned sequence back, removed sleep, moved reg
write earlier to prevent populating tuner ops in case of failure]

Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04 12:23:22 -03:00
Mauro Carvalho Chehab c56019fc40 [media] tuner-xc2028: fix bad alignments
As reported by cocinelle:

drivers/media/tuners/tuner-xc2028.c:182:2-18: code aligned with following code on line 183
drivers/media/tuners/tuner-xc2028.c:184:2-19: code aligned with following code on line 185
drivers/media/tuners/tuner-xc2028.c:186:2-19: code aligned with following code on line 187
drivers/media/tuners/tuner-xc2028.c:188:2-17: code aligned with following code on line 189
drivers/media/tuners/tuner-xc2028.c:190:2-19: code aligned with following code on line 191
drivers/media/tuners/tuner-xc2028.c:192:2-19: code aligned with following code on line 193
drivers/media/tuners/tuner-xc2028.c:194:2-18: code aligned with following code on line 195
drivers/media/tuners/tuner-xc2028.c:196:2-17: code aligned with following code on line 197
drivers/media/tuners/tuner-xc2028.c:198:2-18: code aligned with following code on line 199
drivers/media/tuners/tuner-xc2028.c:200:2-19: code aligned with following code on line 201
drivers/media/tuners/tuner-xc2028.c:202:2-18: code aligned with following code on line 203
drivers/media/tuners/tuner-xc2028.c:204:2-16: code aligned with following code on line 205
drivers/media/tuners/tuner-xc2028.c:206:2-20: code aligned with following code on line 207
drivers/media/tuners/tuner-xc2028.c:208:2-17: code aligned with following code on line 209
drivers/media/tuners/tuner-xc2028.c:210:2-18: code aligned with following code on line 211
drivers/media/tuners/tuner-xc2028.c:212:2-18: code aligned with following code on line 213
drivers/media/tuners/tuner-xc2028.c:214:2-18: code aligned with following code on line 215
drivers/media/tuners/tuner-xc2028.c:216:2-16: code aligned with following code on line 217
drivers/media/tuners/tuner-xc2028.c:218:2-18: code aligned with following code on line 219
drivers/media/tuners/tuner-xc2028.c:220:2-20: code aligned with following code on line 221
drivers/media/tuners/tuner-xc2028.c:222:2-21: code aligned with following code on line 223
drivers/media/tuners/tuner-xc2028.c:224:2-20: code aligned with following code on line 225
drivers/media/tuners/tuner-xc2028.c:226:2-23: code aligned with following code on line 227
drivers/media/tuners/tuner-xc2028.c:228:2-23: code aligned with following code on line 229
drivers/media/tuners/tuner-xc2028.c:230:2-22: code aligned with following code on line 231
drivers/media/tuners/tuner-xc2028.c:232:2-24: code aligned with following code on line 233
drivers/media/tuners/tuner-xc2028.c:234:2-19: code aligned with following code on line 235
drivers/media/tuners/tuner-xc2028.c:236:2-19: code aligned with following code on line 237
drivers/media/tuners/tuner-xc2028.c:238:2-20: code aligned with following code on line 239
drivers/media/tuners/tuner-xc2028.c:240:2-19: code aligned with following code on line 241

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 18:44:34 -03:00
Mauro Carvalho Chehab 97e0e1e867 [media] xc4000: Fix bad alignments
As reported by cocinelle:

drivers/media/tuners/xc4000.c:573:2-28: code aligned with following code on line 574
drivers/media/tuners/xc4000.c:575:2-29: code aligned with following code on line 576
drivers/media/tuners/xc4000.c:577:2-29: code aligned with following code on line 578
drivers/media/tuners/xc4000.c:579:2-27: code aligned with following code on line 580
drivers/media/tuners/xc4000.c:581:2-29: code aligned with following code on line 582
drivers/media/tuners/xc4000.c:583:2-29: code aligned with following code on line 584
drivers/media/tuners/xc4000.c:585:2-28: code aligned with following code on line 586
drivers/media/tuners/xc4000.c:587:2-27: code aligned with following code on line 588
drivers/media/tuners/xc4000.c:589:2-28: code aligned with following code on line 590
drivers/media/tuners/xc4000.c:591:2-29: code aligned with following code on line 592
drivers/media/tuners/xc4000.c:593:2-28: code aligned with following code on line 594
drivers/media/tuners/xc4000.c:595:2-26: code aligned with following code on line 596
drivers/media/tuners/xc4000.c:597:2-30: code aligned with following code on line 598
drivers/media/tuners/xc4000.c:599:2-27: code aligned with following code on line 600
drivers/media/tuners/xc4000.c:601:2-28: code aligned with following code on line 602
drivers/media/tuners/xc4000.c:603:2-28: code aligned with following code on line 604
drivers/media/tuners/xc4000.c:605:2-28: code aligned with following code on line 606
drivers/media/tuners/xc4000.c:607:2-26: code aligned with following code on line 608
drivers/media/tuners/xc4000.c:609:2-28: code aligned with following code on line 610
drivers/media/tuners/xc4000.c:611:2-30: code aligned with following code on line 612
drivers/media/tuners/xc4000.c:613:2-31: code aligned with following code on line 614
drivers/media/tuners/xc4000.c:615:2-30: code aligned with following code on line 616
drivers/media/tuners/xc4000.c:617:2-33: code aligned with following code on line 618
drivers/media/tuners/xc4000.c:619:2-33: code aligned with following code on line 620
drivers/media/tuners/xc4000.c:621:2-32: code aligned with following code on line 622
drivers/media/tuners/xc4000.c:623:2-34: code aligned with following code on line 624
drivers/media/tuners/xc4000.c:625:2-29: code aligned with following code on line 626
drivers/media/tuners/xc4000.c:627:2-29: code aligned with following code on line 628
drivers/media/tuners/xc4000.c:629:2-30: code aligned with following code on line 630
drivers/media/tuners/xc4000.c:631:2-29: code aligned with following code on line 632

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 18:42:09 -03:00
Mauro Carvalho Chehab 2f00fce467 [media] mxl5005s: just return 0 instead of using a var
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:56 -03:00
Mauro Carvalho Chehab 4539fc5c68 [media] mt2060: just return 0 instead of using a var
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:56 -03:00
Mauro Carvalho Chehab a04557a20b [media] e4000: simplify boolean tests
Instead of using if (foo == false), just use
if (!foo).

That allows a faster mental parsing when analyzing the
code.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 17:59:26 -03:00
Hans Verkuil fe10b84e7f [media] mt2063: fix sparse warnings
drivers/media/tuners/mt2063.c:1238:56: warning: cast truncates bits from constant value (ffffff0f becomes f)
drivers/media/tuners/mt2063.c:1313:62: warning: cast truncates bits from constant value (ffffff7f becomes 7f)
drivers/media/tuners/mt2063.c:1321:62: warning: cast truncates bits from constant value (ffffff7f becomes 7f)

Cast to u8 is unnecessary.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 10:38:57 -03:00
Antti Palosaari 6380b975b7 [media] m88ts2022: fix coding style issues
Fix coding style issues pointed out by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 15:48:21 -03:00
Antti Palosaari f538e08513 [media] m88ts2022: fix 32bit overflow on filter calc
Maximum satellite symbol rate used is 45000000Sps which overflows
when multiplied by 135. As final calculation result is fraction,
we could use mult_frac macro in order to keep calculation inside
32 bit number limits and prevent overflow.

Original bug and fix was provided by Nibble Max. I decided to
implement it differently as it is now.

Reported-by: Nibble Max <nibble.max@gmail.com>
Tested-by: Nibble Max <nibble.max@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 15:48:00 -03:00
Olli Salonen 5cd62db71d [media] si2157: Add support for delivery system SYS_ATSC
Set the property for delivery system also in case of SYS_ATSC. This
behaviour is observed in the sniffs taken with Hauppauge HVR-955Q
Windows driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 15:46:14 -03:00
Olli Salonen 67d0113a22 [media] si2157: clean logging
Same thing for si2157 as Antti did earlier for tda18212:

There is no need to print module name nor function name as those
are done by kernel logging system when dev_xxx logging is used and
driver is proper I2C driver.

While here, fix a typo ("unknown") in si2157_init.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 14:59:52 -03:00
Mauro Carvalho Chehab 5275a3b6b0 [media] xc5000: be sure that the firmware is there before set params
Now that xc5000_set_params() is also called during resume,
move the code that checks for the firmware to happen there.

This way, the firmware will be loaded either for analog or
digital TV when .resume callback is called.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:11 -05:00
Mauro Carvalho Chehab 59b94f3e74 [media] xc5000: better name the functions
xc5000_set_params() is a bad name for a function that
handles only digital TV. Rename it to xc5000_set_digital_params(),
and proper name the generic function that works for both
digital and analog.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:10 -05:00
Mauro Carvalho Chehab 7ab1c07614 [media] xc5000: add a resume function
If a device suspends/hibertates with a station tuned, restore
the tuner station at resume.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:10 -05:00
Mauro Carvalho Chehab c3d6676bba [media] xc5000: Split config and set code for analog/radio
As we need a function that reapply the last tuned radio,
in order to do resume, split the code that validates and
updates the internal priv struct from the ones that
actually set radio and TV.

A latter patch will add support for resume.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:09 -05:00
Mauro Carvalho Chehab 1643520231 [media] au0828: move the code that sets DTV on a separate function
As we'll be adding a code to resume tuner operation, we
need to move the code that actually sets DTV on a separate
function, to be called by the resume code.

No functional changes, just code got moved.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:09 -05:00
Mauro Carvalho Chehab 91a5307cb0 [media] xc5000: fix xc5000 suspend
After xc5000 stops working, it waits for 5 seconds, waiting
for a new usage. Only after that it goes to low power mode.

If a suspend event happens before that, a work queue will
remain active, with causes suspend to crash.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:09 -05:00
Mauro Carvalho Chehab ee67674a77 [media] xc5000: always write at dmesg when it fails to upload firmware
On a normal condition, no errors should happen at xc5000
firmware upload is done. So, print at the dmesg if something
bad happens.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 15:56:20 -03:00
Mauro Carvalho Chehab 8604f3552b [media] xc5000: optimize firmware retry logic
Currently, firmware retry logic keeps reading from FS every
time during the retry logic. This is not needed. Instead,
only release the firmware read after success.

While here, make the non-debug messages less verbose, as it
only matters to the user if the firmware was successfully
loaded, or if some error happened.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 15:55:26 -03:00
Mauro Carvalho Chehab 2621c0b322 [media] xc5000: Don't try forever to load the firmware
With the current code, if something bad happens during the
firmware init process, the device will keep trying forever,
and removing it would cause an OOPS.

Instead, try only a limited amount of time. If not, fails.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30 15:52:54 -03:00
Antti Palosaari f5b44da1ac [media] Kconfig: fix tuners build warnings
[next:master 7472/8702] warning: (USB_MSI2500) selects
MEDIA_TUNER_MSI001 which has unmet direct dependencies
((MEDIA_ANALOG_TV_SUPPORT || ..) && ..)

[next:master 7698/8702] warning: (MEDIA_TUNER && ..) selects
MEDIA_TUNER_XC5000 which has unmet direct dependencies
((MEDIA_ANALOG_TV_SUPPORT || ..) && ..)

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25 19:30:41 -03:00
Mauro Carvalho Chehab 4c07e32884 [media] xc4000: Fix get_frequency()
The programmed frequency on xc4000 is not the middle
frequency, but the initial frequency on the bandwidth range.
However, the DVB API works with the middle frequency.

This works fine on set_frontend, as the device calculates
the needed offset. However, at get_frequency(), the returned
value is the initial frequency. That's generally not a big
problem on most drivers, however, starting with changeset
6fe1099c7a, the frequency drift is taken into account at
dib7000p driver.

This broke support for PCTV 340e, with uses dib7000p demod and
xc4000 tuner.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:44:42 -03:00
Mauro Carvalho Chehab a3eec916cb [media] xc5000: Fix get_frequency()
The programmed frequency on xc5000 is not the middle
frequency, but the initial frequency on the bandwidth range.
However, the DVB API works with the middle frequency.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:43:39 -03:00
Mauro Carvalho Chehab 612ae142ac [media] xc4000: add module meta-tag with the firmware names
This meta-tag is used by some distros to help them package
the firmware and generate proper initrd images.

So, add the firmware names there.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:43:00 -03:00
Mauro Carvalho Chehab da7bfa2c5d [media] xc4000: Update firmware name
The firmware name at:
   http://www.kernellabs.com/firmware/xc4000/

Is different from the one at the Kernel. Update it
try first the new name, falling back to the previous one
if the new name can't be found.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:42:48 -03:00
Fabian Frederick 5cb4e2276c [media] xc4000: remove unnecessary break after goto
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:27:27 -03:00
Fabian Frederick 2442b6afd0 [media] xc5000: remove unnecessary break after goto
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:27:13 -03:00
Fabian Frederick 435fce1b6c [media] xc2028: remove unnecessary break after goto
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:26:39 -03:00
Fabian Frederick d616bec6b9 [media] r820t: remove unnecessary break after goto
Cc: Antti Palosaari <crope@iki.fi>
Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 21:26:23 -03:00
Mauro Carvalho Chehab e23cf7f358 [media] tuners/Kconfig: fix build when just DTV or SDR is enabled
As reported by Kbuildtest:
	warning: (VIDEO_PVRUSB2 && VIDEO_TLG2300 && VIDEO_USBVISION && VIDEO_GO7007 && VIDEO_AU0828_V4L2 && VIDEO_CX231XX && VIDEO_TM6000 && VIDEO_EM28XX && VIDEO_IVTV && VIDEO_MXB && VIDEO_CX18 && VIDEO_CX23885 && VIDEO_CX88 && VIDEO_BT848 && VIDEO_SAA7134 && VIDEO_SAA7164) selects VIDEO_TUNER which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_TUNER)

That happens when:

	# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
	CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
	# CONFIG_MEDIA_RADIO_SUPPORT is not set
	# CONFIG_MEDIA_SDR_SUPPORT is not set
	CONFIG_VIDEO_AU0828_V4L2=y
	CONFIG_VIDEO_CX231XX=y
	CONFIG_VIDEO_TM6000=y
	CONFIG_VIDEO_EM28XX=y
	CONFIG_VIDEO_TUNER=y
	CONFIG_MEDIA_SUPPORT=y

With means that we need to enable MEDIA_TUNER also when DTV
is enabled. While the above config doesn't cover, if we enable
SDR, the same error can also happen.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 14:24:46 -03:00
Matthias Schwarzott 1140540da0 [media] si2157: Add get_if_frequency callback
This is needed for PCTV 522e support.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 21:29:38 -03:00
Matthias Schwarzott 05024efe12 [media] si2157: Add support for spectral inversion
This is needed for PCTV 522e support.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 21:29:06 -03:00
Olli Salonen 6cc8a35dcf [media] si2157: Use name si2157_ops instead of si2157_tuner_ops
The struct prototype is defined at the beginning of the code as
"si2157_ops" but the real struct is called "si2157_tuner_ops".

This is causing the name to be empty on this info msg: si2157 16-0060:
si2157: found a '' in cold state

[crope@iki.fi: commit msg from Luis email reply]
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Cc: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 21:27:35 -03:00
Antti Palosaari 150dcf5575 msi001: move out of staging
Move MSi001 driver from staging to drivers/media/tuners/.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:30:52 -03:00
Antti Palosaari 7d6bc608e0 [media] si2157: rework firmware download logic a little bit
Rework firmware selection / chip detection logic a little bit.
Add missing release_firmware() to error path.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:09 -03:00
Antti Palosaari bac53a2c60 [media] si2157: advertise Si2158 A20 firmware
Driver uses that firmware. Add it module firmware list.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:08 -03:00
Olli Salonen a1dad50d8c [media] si2157: Set delivery system and bandwidth before tuning
Tell used TV standard and bandwidth for tuner firmware.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:07 -03:00
Olli Salonen 1b92373f4b [media] si2157: Add support for Si2158 chip
Add support for Si2158 A20 chip.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:06 -03:00
Olli Salonen b154121c64 [media] si2157: Move chip initialization to si2157_init
Move chip initialization related code from si2157_set_params to
si2157_init.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:06 -03:00
Antti Palosaari e6b4380f3e [media] si2157: add read data support for fw cmd func
We want also read data from firmware. Add support for it. Copied from
si2168 driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:02 -03:00
Antti Palosaari a83d7d17ad [media] si2157: implement sleep
Implement sleep for power-management.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-14 21:07:00 -03:00
Alan 690130fe0b [media] dvb-frontends: Add static
Add static to tda m_* variables in the header. They don't need to be global.
With some cleanup they could probably even be marked const.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=68191

Reported-by: Christian Schneider <christian@ch-sc.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 15:33:46 -03:00
Mauro Carvalho Chehab f7a27ff1fb [media] xc5000: delay tuner sleep to 5 seconds
Some drivers, like au0828 are very sensitive to tuner sleep and may
break if the sleep happens too fast. Also, by keeping the tuner alive
for a while could speedup tuning process during channel scan. So,
change the logic to delay the actual sleep to 5 seconds after its
command.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 17:50:16 -03:00
Mauro Carvalho Chehab 5015c27b60 [media] xc5000: Don't use whitespace before tabs
WARNING: please, no space before tabs
+#define XC_PRODUCT_ID_FW_LOADED ^I0x1388$

WARNING: please, no space before tabs
+#define DK_SECAM_A2LDK3 ^I13$

WARNING: please, no space before tabs
+#define DK_SECAM_A2MONO ^I14$

WARNING: please, no space before tabs
+#define FM_RADIO_INPUT2 ^I21$

WARNING: please, no space before tabs
+#define FM_RADIO_INPUT1 ^I22$

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 17:50:15 -03:00