summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/xc5000.c
AgeCommit message (Collapse)AuthorFilesLines
2012-07-30[media] xc5000: Add MODULE_FIRMWARE statementsTim Gardner1-2/+6
This will make modinfo more useful with regard to discovering necessary firmware files. Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Michael Krufky <mkrufky@kernellabs.com> Cc: Eddi De Pieri <eddi@depieri.net> Cc: linux-media@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-05[media] xc5000: Add support for DMB-TH and ISDB-TMauro Carvalho Chehab1-0/+6
xc5000 is just a tuner, not a decoder, so both DMB-TH and ISDB-T should work properly there: it is just a matter of teaching the driver what saw filter should be used and how to calculate the center frequency. Requested-by: Choi Wing Chan <chanchoiwing@gmail.com> Cc: Steven Toth <stoth@linuxtv.org> Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19[media] xc5000: xtal_khz should be a u16 rather than a u32Michael Krufky1-1/+1
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19[media] xc5000: log firmware upload failures in xc5000_fwuploadMichael Krufky1-1/+4
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19[media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmwareMichael Krufky1-4/+35
Rather than loading firmware specific for the xtal frequency, just use the standard firmware and set the xtal frequency after firmware upload. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: declare firmware configuration structures as static constMichael Krufky1-4/+5
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: drivers should specify chip revision rather than firmwareMichael Krufky1-13/+14
Specify chip revision at attach time rather than a firmware image. This is a better way to ensure that the correct firmware is loaded for the correct revision of the chip. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: remove static dependencies on xc5000 created by previous ↵Michael Krufky1-3/+21
changesets convert the firmware configuration attach-time parameter from a pointer to an integer so as to remove the static dependency created by the previous changesets. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: add XC5000C_DEFAULT_FIRMWARE: dvb-fe-xc5000c-41.024.5-31875.fwMichael Krufky1-0/+5
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: allow drivers to set desired firmware in xc5000_attachMichael Krufky1-6/+16
newer versions of the xc5000 silicon require newer firmware while remaining 100% driver compatible. original versions of the xc5000a continue to use the same firmware. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: don't use DVBv3 bandwidth macrosMauro Carvalho Chehab1-9/+3
Every frontend now uses DVBv5 way. So, let's not use the DVBv3 macros internally anymore. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] tuners: remove dvb_frontend_parameters from set_params()Mauro Carvalho Chehab1-2/+1
This is a big patch, yet trivial: now that all tuners use the DVBv5 way to pass parameters (e. g. via fe->dtv_property_cache), the extra parameter can be removed from set_params() call. After this change, very few DVBv3 specific stuff are left at the tuners. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20[media] Remove Annex A/C selection via roll-off factorMauro Carvalho Chehab1-81/+56
Instead of using a roll-off factor, change DRX-K & friends to select the bandwidth filter and the Nyquist half roll-off via delivery system. This provides a cleaner support for Annex A/C switch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-09[media] xc5000: Add support for 7MHz bandwidth for DVB-C/DVB-TMauro Carvalho Chehab1-2/+8
While xc5000 supports 7MHz bandwidth, the driver were lacking the code implementing this feature, causing tuning issues with VHF chanels used in Countries like Italy. After this patch: >>> tune to: 177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE 0x0000 0x0d49: pmt_pid 0x0102 RAI -- Rai 1 (running) 0x0000 0x0d4a: pmt_pid 0x0101 RAI -- Rai 2 (running) 0x0000 0x0d4b: pmt_pid 0x0100 RAI -- Rai 3 TGR Veneto (running) 0x0000 0x0d53: pmt_pid 0x0118 RAI -- Rai News (running) 0x0000 0x0d54: pmt_pid 0x0119 Rai -- Rai 3 TGR Emilia Romagna (running) 0x0000 0x0d4c: pmt_pid 0x0103 Rai -- Rai Radio1 (running) 0x0000 0x0d4d: pmt_pid 0x0104 Rai -- Rai Radio2 (running) 0x0000 0x0d4e: pmt_pid 0x0105 Rai -- Rai Radio3 (running) Network Name 'Rai' Tested-by: Eddi De Pieri <eddi@depieri.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-08[media] xc5000,tda18271c2dd: Fix bandwidth calculusMauro Carvalho Chehab1-2/+4
While here, add a debug message, to easy detecting bugs on it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-07[media] xc5000: Remove the global mutex lock at xc5000 firmware initMauro Carvalho Chehab1-4/+0
As reported by Devin Heitmueller <dheitmueller@kernellabs.com>: > It seems like a change such as this could significantly change the > timing of tuner initialization if you have multiple xc5000 based > products that might have a slow i2c bus. Was that intentional? After discussed with Eddi de Pierri <eddi@depieri.net>, it was pointed that the change was not intentional, and it was just a trial while developing the patches that add support for HVR-930C. So, remove this hack. Reported-by: Devin Heitmueller <dheitmueller@kernellabs.com> Acked by: Eddi de Pierri <eddi@depieri.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-20[media] em28xx: initial support for HAUPPAUGE HVR-930C againEddi De Pieri1-0/+4
With this patch I try again to add initial support for HVR930C. Tested only DVB-T, since in Italy Analog service is stopped. Actually "scan -a0 -f1", find only about 50 channel while 400 should be available. [mchehab@redhat.com: Tested with DVB-C and fixed a few whitespace issues] Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Eddi De Pieri <eddi@depieri.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-20[media] xc5000: Add support for get_if_frequencyMauro Carvalho Chehab1-0/+9
This is needed for devices with DRX-K and xc5000. Tested with a HVR 930C hardware. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-11[media] Properly implement ITU-T J.88 Annex C supportMauro Carvalho Chehab1-13/+13
The Annex C support were broken with the previous implementation, as, at xc5000 and tda18271c2dd, it were choosing the wrong bandwidth for some symbol rates. At DRX-J, it were always selecting Annex A, even having Annex C support coded there. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] xc5000: Improve it to work better with 6MHz-spaced channelsMauro Carvalho Chehab1-6/+26
Brazil uses 6MHz-spaced channels. So, the nyquist filter for DVB-C should be different, otherwise, inter-channel interference may badly affect the device, and signal may not be properly decoded. On my tests here, without this patch, sometimes channels are seen, but, most of the time, PID filter returns with timeout. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] xc5000: add set_config and otherDmitri Belimov1-2/+36
Add one more radio input, usefull for tm6010 Add control output amplitude. Add set_config function for configure tuner when TV card hasn't dvb part. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] xc5000: add support for DVB-C tuningIgor M. Liplianin1-0/+18
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21V4L/DVB: drivers/media: Make static data tables and strings constlawrence rust1-1/+1
Making static data const avoids allocation of additional r/w memory and reduces initialisation time. It also provides some additional opportunities for compiler optimisations. Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: xc5000: Fix a few warningsMauro Carvalho Chehab1-1/+3
drivers/media/common/tuners/xc5000.c: In function ‘xc_write_reg’: drivers/media/common/tuners/xc5000.c:298: warning: passing argument 3 of ‘xc5000_readreg’ from incompatible pointer type drivers/media/common/tuners/xc5000.c:235: note: expected ‘u16 *’ but argument is of type ‘u8 *’ drivers/media/common/tuners/xc5000.c: At top level: drivers/media/common/tuners/xc5000.c:223: warning: ‘xc_read_i2c_data’ defined but not used Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: xc5000, rework xc_write_regDmitri Belimov1-31/+26
Rework xc_write_reg function for correct read register of the xc5000. It is very useful for tm6000. Tested for tm6000 and for saa7134 works well. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13188): xc5000: return an error on tuning attempts if firmware not ↵Devin Heitmueller1-4/+12
loaded Xc5000 tuning attempts shouldn't return zero in the case where the firmware did not load successfully. Thanks to Michael Krufky for pointing out this issue. Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13076): xc5000: make the definition of the FM input part of the ↵Devin Heitmueller1-3/+22
xc5000 config struct Remove hard-coded definition of the xc5000 FM radio input, making it a parameter passed in when doing the attach call. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13075): xc5000: add FM radio supportBeholder Intl. Ltd. Dmitry Belimov1-4/+62
Add FM radio for the xc5000 silicon tuner chip. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11806): xc5000: add copyright lineDevin Heitmueller1-0/+1
Add copyright line for xc5000.c. Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11804): xc5000: poll at 5ms interval for register write command ↵Devin Heitmueller1-2/+2
completion Instead of polling at 100ms intervals for register writes, poll at 5ms intervals. This is consistent with the xc5000 specification, and improves tuning time by up to 500 ms on devices that such as the au0828 which do not properly implement i2c clock stretching (since the five register writes that occur for a tuning request often do not complete immediately but do complete far before 100ms has gone by). The net amount of time we wait before timing out is unchanged (500ms). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11803): xc5000: add support for DVB-T tuningDavid T.L. Wong1-18/+45
This patch adds XC5000 supports for DVB-T 6MHz and 8MHz bandwidth. Signed-off-by: David T.L. Wong <davidtlwong@gmail.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11802): xc5000: switch to new xc5000 firmware 1.6.114 with ↵Devin Heitmueller1-2/+2
redistribution rights Xceive has graciously allowed us to now freely redistribute the xc5000 firmware, which eliminates the need for users to manually extract the blob from the Hauppauge driver. Thanks to Brian Mathews <bmathews@xceive.com> for providing this code Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11798): xc5000: add "no_poweroff" module optionDevin Heitmueller1-0/+10
Provide for the ability for a user to disable putting the tuner to sleep, in case he doesn't want to incur the cost of reloading the firmware when starting up his/her application. The module options are intentionally identical to xc3028. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11797): xc5000: cleanup firmware loading messagesDevin Heitmueller1-2/+3
Make it a little more obvious in the dmesg output what is going on during firmware upload. This is more important for boards like the HVR-950q that take nearly seven seconds to do the upload. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11796): xc5000: start using the newer "finerfreq" tuning commandDevin Heitmueller1-2/+5
Starting in firmware version 1.1.44, Xceive recommends using the FINERFREQ for all normal tuning (the doc indicates reg 0x03 should only be used for fast scanning for channel lock) Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11795): xc5000: add build version to debug infoDevin Heitmueller1-2/+10
Expose the firmware build number along with the other version info Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11793): xc5000: Properly support power down for newer firmwareDevin Heitmueller1-3/+5
Xceive got rid of the XREG_POWER_DOWN register in later firmware revisions. Their technical support informed me that the correct way to put the tuner to sleep is to pull the reset pin (but don't reload the firmware). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11792): xc5000: switch to new version of Xceive firmwareDevin Heitmueller1-2/+2
This switches to a new version of the xc5000 firmware, extracted from the latest Hauppauge driver. It includes the support for the XREG_BUSY register (a lack of which was causing tuning to take 3200ms instead of around 300ms). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11791): xc5000: do not sleep after digital tuningDevin Heitmueller1-5/+9
Don't sleep for 400ms polling the tuner's lock if in digital mode (since the xc5000 lock status registers appear to only be reliable in analog mode) Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11790): xc5000: restore sleep routineDevin Heitmueller1-18/+5
Bring back the code that puts the xc5000 to sleep. For the Pinnacle 801e this results in power consumption at idle dropping from 325ma to 124ma. If there are *actually* any devices that don't work in this configuration, they should set dvb_frontend.ops.tuner_ops.sleep to NULL (per mkrufky's suggestion) Also, had to make sure we were making sure the firmware was loaded in the digital version of set_params, or else we end up get i2c errors if the device is asleep Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11789): xc5000: check xc5000_readreg return value for XC_RESULT_SUCCESSDevin Heitmueller1-4/+4
Make return value checking for calls to i2c routines explicit. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11788): xc5000: cleanup i2c write routinesDevin Heitmueller1-16/+8
Cleanup the i2c write routine, getting rid of a passthrough function with only one caller Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11787): xc5000: cleanup i2c read routinesDevin Heitmueller1-42/+20
This patch centralizes the i2c read functions, and eliminates pass-through function only called by one caller. Make reading of xc5000 registers an atomic i2c transaction in case we're on a multi-master bus. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11786): xc5000: handle tuner reset failures properlyDevin Heitmueller1-14/+13
Properly handle tuner reset failures (before it was always returning success) Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11723): Link firmware to physical deviceJean Delvare1-1/+1
Use the physical device rather than the i2c adapter as the reference device when loading firmwares. This will prevent the sysfs name collision with i2c-dev that has been reported many times. I may have missed other drivers which need the same fix. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11059): xc5000: fix bug for hybrid xc5000 devices with IF other ↵Devin Heitmueller1-2/+7
than 5380 The xc5000 driver has a bug where the IF is always set to whatever the first caller to dvb_attach() provides. This fails when the device requires an IF other than 5380 and the analog driver is loaded first through tuner-core (which always supplies the hard-coded value of 5380). Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth <stoth@linuxtv.org> for providing sample hardware, engineering level support, and testing. Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10951): xc5000: Fix CodingStyle errors introduced by the last patchMauro Carvalho Chehab1-4/+4
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10950): xc5000: prepare it to be used by cx231xx moduleSri Deevi1-1/+4
Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (9923): xc5000: remove init_fw optionDevin Heitmueller1-7/+0
The init_fw option was broken for the HVR-950q because we would call the reset callback inside of dvb_attach() and the callback had not been setup yet. Michael Krufky (who added the init_fw feature) says it's no longer required, so just remove the option completely. Thanks to user Zzeiss from #linuxtv chat for reporting the issue and Michael Krufky <mkrufky@linuxtv.org> for proposing the fix. Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9261): xc5000: Checkpatch complianceSteven Toth1-36/+37
xc5000: Checkpatch compliance Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>