aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners
Commit message (Collapse)AuthorAgeFilesLines
* [media] DVB: mxl5005s: handle new bandwidths by returning -EINVALAndreas Oberritter2011-05-201-0/+2
| | | | | | | | | | drivers/media/common/tuners/mxl5005s.c: In function ‘mxl5005s_set_params’: drivers/media/common/tuners/mxl5005s.c:4016: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch drivers/media/common/tuners/mxl5005s.c:4016: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch drivers/media/common/tuners/mxl5005s.c:4016: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: add DVB-C supportAntti Palosaari2011-05-201-0/+4
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] NXP TDA18212HN silicon tuner driverAntti Palosaari2011-05-205-0/+366
| | | | | | | New silicon tuner driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: Improve it to work better with 6MHz-spaced channelsMauro Carvalho Chehab2011-05-201-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>
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-04-273-26/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (42 commits) [media] media: vb2: correct queue initialization order [media] media: vb2: fix incorrect v4l2_buffer->flags handling [media] s5p-fimc: Add support for the buffer timestamps and sequence [media] s5p-fimc: Fix bytesperline and plane payload setup [media] s5p-fimc: Do not allow changing format after REQBUFS [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4 [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet [media] tda18271: fix bad calculation of main post divider byte [media] tda18271: prog_cal and prog_tab variables should be s32, not u8 [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails [media] v4l: Don't register media entities for subdev device nodes [media] omap3isp: Don't increment node entity use count when poweron fails [media] omap3isp: lane shifter support [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts [media] media: add missing 8-bit bayer formats and Y12 [media] v4l: add V4L2_PIX_FMT_Y12 format cx23885: Fix stv0367 Kconfig dependency [media] omap3isp: Use isp xclk defines ... Fix up trivial conflict (spelink errurs) in drivers/media/video/omap3isp/isp.c
| * [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheetMichael Krufky2011-04-191-4/+5
| | | | | | | | | | | | Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheetMichael Krufky2011-04-191-2/+1
| | | | | | | | | | | | Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: fix bad calculation of main post divider byteMichael Krufky2011-04-191-10/+1
| | | | | | | | | | | | | | | | | | | | | | R_MPD bit 3 does not depend on analog vs. digital. Just use (0x7f & pd) directly from the values in the main pll table. Thanks to Stefan Sibiga for pointing this out. Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: prog_cal and prog_tab variables should be s32, not u8Michael Krufky2011-04-191-10/+11
| | | | | | | | | | | | | | | | Fix type of prog_cal and prog_tab variables to avoid any possible calculation errors. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_initMichael Krufky2011-04-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | Misplaced parenthesis cause a calculation bug in tda18271_rf_tracking_filters_init Thanks to Stefan Sibiga for pointing this out. Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Fix common misspellingsLucas De Marchi2011-03-312-2/+2
|/ | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* [media] tuner-xc2028.c: fix compile warningHans Verkuil2011-03-221-2/+2
| | | | | | | | | | drivers/media/common/tuners/tuner-xc2028.c: In function 'generic_set_freq': drivers/media/common/tuners/tuner-xc2028.c:936:15: warning: comparison between 'enum tuner_mode' and 'enum v4l2_tuner_type' Argument type was enum tuner_mode, but should have been enum v4l2_tuner_type. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: add set_config and otherDmitri Belimov2011-03-212-2/+37
| | | | | | | | | 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>
* [media] xc5000: add support for DVB-C tuningIgor M. Liplianin2011-03-211-0/+18
| | | | | Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner: Remove remaining usages of T_DIGITAL_TVMauro Carvalho Chehab2011-03-211-4/+4
| | | | | | | A few places used T_DIGITAL_TV internally. Remove the usage of this obsolete mode mask. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Remove the remaining usages for T_STANDBYMauro Carvalho Chehab2011-03-212-8/+34
| | | | | | | | | tda9887 used to use the T_STANDBY type internally, while tea5761 used it to put the device to sleep. Fix the code for it to work properly with the tuner core changes and remove this flag from tuner.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: More firmware loading retriesAlina Friedrichsen2011-03-211-3/+3
| | | | | | | My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-simple: add support for Tena TNF5337 MFDMauro Carvalho Chehab2011-03-211-0/+21
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda829x: fix regression in probe functionsJarod Wilson2011-03-021-7/+7
| | | | | | | | | | | | | | | | | | | | | In commit 567aba0b7997dad5fe3fb4aeb174ee9018df8c5b, the probe address for tda8290_probe and tda8295_probe was hard-coded to 0x4b, which is the default i2c address for those devices, but its possible for the device to be at an alternate address, 0x42, which is the case for the HVR-1950. If we probe the wrong address, probe fails and we have a non-working device. We have the actual address passed into the function by way of i2c_props, we just need to use it. Also fix up some copy/paste comment issues and streamline debug spew a touch. Verified to restore my HVR-1950 to full working order. Special thanks to Ken Bass for reporting the issue in the first place, and to both he and Gary Buhrmaster for aiding in debugging and analysis of the problem. Reported-by: Ken Bass <kbass@kenbass.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'media_fixes' of ↵Linus Torvalds2011-01-211-56/+74
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (101 commits) [media] staging/lirc: fix mem leaks and ptr err usage [media] hdpvr: reduce latency of i2c read/write w/recycled buffer [media] hdpvr: enable IR part [media] rc/mceusb: timeout should be in ns, not us [media] v4l2-device: fix 'use-after-freed' oops [media] v4l2-dev: don't memset video_device.dev [media] zoran: use video_device_alloc instead of kmalloc [media] w9966: zero device state after a detach [media] v4l: Fix a use-before-set in the control framework [media] v4l: Include linux/videodev2.h in media/v4l2-ctrls.h [media] DocBook/v4l: update V4L2 revision and update copyright years [media] DocBook/v4l: fix validation error in dev-rds.xml [media] v4l2-ctrls: queryctrl shouldn't attempt to replace V4L2_CID_PRIVATE_BASE IDs [media] v4l2-ctrls: fix missing 'read-only' check [media] pvrusb2: Provide more information about IR units to lirc_zilog and ir-kbd-i2c [media] ir-kbd-i2c: Add back defaults setting for Zilog Z8's at addr 0x71 [media] lirc_zilog: Update TODO.lirc_zilog [media] lirc_zilog: Add Andy Walls to copyright notice and authors list [media] lirc_zilog: Remove useless struct i2c_driver.command function [media] lirc_zilog: Remove unneeded tests for existence of the IR Tx function ...
| * [media] saa7134: Kworld SBTVD: make both analog and digital to workMauro Carvalho Chehab2011-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some weird bugs at tda8290/tda18271 initialization, as it insits do do analog initialization during DVB frontend attach: DVB: registering new adapter (saa7133[0]) DVB: registering adapter 0 frontend 0 (Fujitsu mb86A20s)... mb86a20s: mb86a20s_initfe tda18271_write_regs: [2-0060|M] ERROR: idx = 0x5, len = 1, i2c_transfer returned: -5 tda18271_init: [2-0060|M] error -5 on line 830 tda18271_tune: [2-0060|M] error -5 on line 908 tda18271_write_regs tda18271_write_regs: [2-0060|M] ERROR: idx = 0x5, len = 1, i2c_transfer returned: -5 tda18271c2_rf_tracking_filters_correction: [2-0060|M] error -5 on line 265 tda18271_write_regs tda18271_write_regs: [2-0060|M] ERROR: idx = 0x25, len = 1, i2c_transfer returned: -5 tda18271_channel_configuration: [2-0060|M] error -5 on line 119 tda18271_set_analog_params: [2-0060|M] error -5 on line 1045 tda18271_set_analog_params: [2-0060|M] error -5 on line 1045 tda829x 2-004b: tda8295 not locked, no signal? tda829x 2-004b: tda8295_i2c_bridge: disable i2c gate tda829x 2-004b: tda8295 not locked, no signal? tda829x 2-004b: tda8295_i2c_bridge: disable i2c gate mb86a20s_i2c_writereg: writereg error (rc == -5, reg == 0x29, data == 0x33) mb86a20s: Init failed. Will try again later The problem is that mb86a20s is only visible if the analog part is disabled. However, due to a trick at mb86a20s, it will later initialize properly: mb86a20s: mb86a20s_initfe: Initialization succeded. This is hacky and ugly. However, I coldn't find any easy way to fix it. A proper fix would be to have a resource locking schema, used by both V4L and DVB parts that would block access to analog registers while digital registers are in use, but this will probably put tda829x into a dead lock. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda8290: Turn tda829x on before touching at the I2C gateMauro Carvalho Chehab2011-01-191-5/+6
| | | | | | | | | | | | | | | | On Kworld SBTVD, tda8295-c1 starts in power off mode. It needs to be powered, otherwise, the I2C gate control command won't work. Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda8290: Fix a bug if no tuner is detectedMauro Carvalho Chehab2011-01-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If tda8290 is detected, but no tuner is found, the driver will do bad things: tuner 2-0060: chip found @ 0xc0 (saa7133[0]) tda829x 2-0060: could not clearly identify tuner address, defaulting to 60 tda829x 2-0060: tuner access failed! BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: [<ffffffffa048c267>] set_audio+0x47/0x170 [tda8290] PGD 1187b0067 PUD 11771e067 PMD 0 Oops: 0002 [#1] SMP last sysfs file: /sys/module/i2c_core/initstate CPU 0 Modules linked in: tda8290(U) tea5767(U) tuner(U) ir_lirc_codec(U) lirc_dev(U) ir_sony_decoder(U) ir_jvc_decoder(U) ir_rc6_decoder(U) ir_rc5_decoder(U) saa7134(+)(U) v4l2_common(U) ir_nec_decoder(U) videodev(U) v4l2_compat_ioctl32(U) rc_core(U) videobuf_dma_sg(U) videobuf_core(U) tveeprom(U) ebtable_nat ebtables xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table xt_physdev iptable_filter ip_tables ip6t_REJECT ip6table_filter ip6_tables ipv6 dm_mirror dm_region_hash dm_log parport kvm_intel kvm uinput floppy tpm_infineon wmi sg serio_raw iTCO_wdt iTCO_vendor_support tg3 snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc i7core_edac edac_core nouveau Modules linked in: tda8290(U) tea5767(U) tuner(U) ir_lirc_codec(U) lirc_dev(U) ir_sony_decoder(U) ir_jvc_decoder(U) ir_rc6_decoder(U) ir_rc5_decoder(U) saa7134(+)(U) v4l2_common(U) ir_nec_decoder(U) videodev(U) v4l2_compat_ioctl32(U) rc_core(U) videobuf_dma_sg(U) videobuf_core(U) tveeprom(U) ebtable_nat ebtables xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table xt_physdev iptable_filter ip_tables ip6t_REJECT ip6table_filter ip6_tables ipv6 dm_mirror dm_region_hash dm_log parport kvm_intel kvm uinput floppy tpm_infineon wmi sg serio_raw iTCO_wdt iTCO_vendor_support tg3 snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc i7core_edac edac_core nouveau ttm drm_kms_helper drm i2c_algo_bit video output i2c_core ext3 jbd mbcache firewire_ohci firewire_core crc_itu_t sr_mod cdrom sd_mod crc_t10dif ahci dm_mod [last unloaded: microcode] Pid: 9497, comm: modprobe Not tainted 2.6.32-72.el6.x86_64 #1 HP Z400 Workstation RIP: 0010:[<ffffffffa048c267>] [<ffffffffa048c267>] set_audio+0x47/0x170 [tda8290] RSP: 0018:ffff88010ba01b28 EFLAGS: 00010206 RAX: 00000000000000ff RBX: ffff880119522800 RCX: 0000000000000002 RDX: 0000000000003be0 RSI: ffff88010ba01bb8 RDI: 0000000000000000 RBP: ffff88010ba01b28 R08: 0000000000000002 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88010ba01bb8 R14: 0000000000001900 R15: 0000000000001900 FS: 00007f4b96b3d700(0000) GS:ffff880028200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000020 CR3: 000000011866c000 CR4: 00000000000026f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process modprobe (pid: 9497, threadinfo ffff88010ba00000, task ffff880100708a70) Stack: ffff88010ba01b98 ffffffffa048c95b ffff88010ba01b78 0000000000000060 <0> 0000000000000000 0000000e00000000 000000000000001d ffffffffa03ec838 <0> ffff88010abac240 ffff880119522800 ffff880119522800 ffff880119522bc0 Call Trace: [<ffffffffa048c95b>] tda8295_set_params+0x3b/0x210 [tda8290] [<ffffffffa03ec838>] ? v4l2_i2c_new_subdev_cfg+0x88/0xc0 [v4l2_common] [<ffffffffa0484418>] set_freq+0x128/0x2f0 [tuner] [<ffffffffa0486464>] tuner_s_std+0xc4/0x740 [tuner] [<ffffffffa04b9ae6>] saa7134_set_tvnorm_hw+0x2d6/0x3d0 [saa7134] [<ffffffffa04ba455>] set_tvnorm+0xd5/0x100 [saa7134] [<ffffffffa04bc9fd>] saa7134_video_init2+0x1d/0x50 [saa7134] [<ffffffffa04bf57e>] saa7134_initdev+0x6e1/0xb1d [saa7134] [<ffffffff8125afea>] ? kobject_get+0x1a/0x30 [<ffffffff812765f7>] local_pci_probe+0x17/0x20 [<ffffffff812777e1>] pci_device_probe+0x101/0x120 [<ffffffff8132ec72>] ? driver_sysfs_add+0x62/0x90 [<ffffffff8132ee10>] driver_probe_device+0xa0/0x2a0 [<ffffffff8132f0bb>] __driver_attach+0xab/0xb0 [<ffffffff8132f010>] ? __driver_attach+0x0/0xb0 [<ffffffff8132e074>] bus_for_each_dev+0x64/0x90 [<ffffffff8132ebae>] driver_attach+0x1e/0x20 [<ffffffff8132e4b0>] bus_add_driver+0x200/0x300 [<ffffffff8132f3e6>] driver_register+0x76/0x140 [<ffffffff814c7c43>] ? printk+0x41/0x46 [<ffffffff81277a46>] __pci_register_driver+0x56/0xd0 [<ffffffffa04de000>] ? saa7134_init+0x0/0x4f [saa7134] [<ffffffffa04de04d>] saa7134_init+0x4d/0x4f [saa7134] [<ffffffff8100a04c>] do_one_initcall+0x3c/0x1d0 [<ffffffff810af5ef>] sys_init_module+0xdf/0x250 [<ffffffff81013172>] system_call_fastpath+0x16/0x1b Code: 20 01 49 c7 c0 c9 ec 48 a0 83 7e 04 01 74 2d 8b 0d 3f 2f 00 00 85 c9 0f 85 d7 00 00 00 c9 c3 0f 1f 44 00 00 a9 03 00 01 00 74 61 <c6> 47 20 02 83 7e 04 01 49 c7 c0 cc ec 48 a0 75 d3 0f b6 47 22 RIP [<ffffffffa048c267>] set_audio+0x47/0x170 [tda8290] RSP <ffff88010ba01b28> CR2: 0000000000000020 This happens because some I2C callbacks actually depend on having the driver entirely initialized. To avoid this OOPS, just clean the I2C callbacks, as if no device were detected. Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda8290: Make all read operations atomicMauro Carvalho Chehab2011-01-191-53/+66
| | | | | | | | | | | | | | | | | | | | | | | | Read operations should be preceeded by a write operation. However, nothing prevents that an I2C operation could happen between the two transactions. To avoid that problem, use an unique I2C transfer for both parts of the I2C transaction. Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERTDavid Rientjes2011-01-201-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option is used to configure any non-standard kernel with a much larger scope than only small devices. This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes references to the option throughout the kernel. A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Calling the option "EXPERT" more accurately represents its intention: only expert users who understand the impact of the configuration changes they are making should enable it. Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: David Woodhouse <david.woodhouse@intel.com> Signed-off-by: David Rientjes <rientjes@google.com> Cc: Greg KH <gregkh@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jens Axboe <axboe@kernel.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Robin Holt <holt@sgi.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [media] tda18218: fix compile warningHans Verkuil2011-01-041-1/+1
| | | | | | | | drivers/media/common/tuners/tda18218.c: In function 'tda18218_wr_regs': drivers/media/common/tuners/tda18218.c:58:5: warning: 'ret' may be used uninitialized in this function Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media: Removed unnecessary KERN_<level>s from dprintk usesJoe Perches2010-12-291-6/+4
| | | | | | | Converted if (debug >= 2) printk(KERN_DEBUG... to if debug >= 2) dprintk(...) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Fix Kconfig errors due to two visible menusMauro Carvalho Chehab2010-11-221-4/+4
| | | | | | | Use the new visible Kconfig keyword to avoid producing error for two menus that are visible only if Tuner/frontend customise options are enabled. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: Fix max I2C message size when used with tda18271Mauro Carvalho Chehab2010-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Changeset 1724c8fa7eb33d68898e060a08a8e6a88348b62f added an option to change the maximum I2C size to 8 bytes. However, it forgot to replace the previous usage at af9015 to use the newly defined macro value (TDA18271_16_BYTE_CHUNK_INIT). A latter changeset (e350d44fed8eb86a7192a579e3687fcd76a4645b) extended the possible values for .small_i2c field and, instead of using a random sequence of numbers, it used a number that makes more sense (e. g. the actual limit, in terms of bytes). However, as af9015 were using .small_i2c = 1, this become undefined, and the restriction of a max size of 16 was gone. While here, fix the reported msg size at tda18271-common.c. Reported-by: Jiri Slaby <jirislaby@gmail.com> Tested-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: allow restricting max out to 4 bytesMauro Carvalho Chehab2010-10-212-27/+37
| | | | | | | | | | | | | | | By default, tda18271 tries to optimize I2C bus by updating all registers at the same time. Unfortunately, some devices doesn't support it. The current logic has a problem when small_i2c is equal to 8, since there are some transfers using 11 + 1 bytes. Fix the problem by enforcing the max size at the right place, and allows reducing it to max = 3 + 1. Acked-by: Michael Krufky <mkrufky@kernellabs.com> Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: tda18271: Add some hint about what tda18217 reg ID returnedMauro Carvalho Chehab2010-10-211-9/+7
| | | | | | | | | | | | | | | | | | | | | | Instead of doing: [ 82.581639] tda18271 4-0060: creating new instance [ 82.588411] Unknown device detected @ 4-0060, device not supported. [ 82.594695] tda18271_attach: [4-0060|M] error -22 on line 1272 [ 82.600530] tda18271 4-0060: destroying instance Print: [ 468.740392] Unknown device (0) detected @ 4-0060, device not supported. for the error message, to help detecting what's going wrong with the device. This helps to detect when the driver is using the wrong I2C bus (or have the i2g gate switch pointing to the wrong place), on devices like cx231xx that just return 0 on reads to a non-existent i2c device. Reviewed-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: drivers/media: Make static data tables and strings constlawrence rust2010-10-212-3/+3
| | | | | | | | | 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>
* V4L/DVB: NXP TDA18218 silicon tuner driverAntti Palosaari2010-10-215-0/+493
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: do not autoselect components on embedded systemsGuennadi Liakhovetski2010-08-081-1/+1
| | | | | | | | | | Tuner, DVB frontend and video helper chip drivers are by default autoselected by their respective host cards, this, however, doesn't make much sense on SoC-based systems. Disable autoselection on EMBEDDED systems. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: xc5000: Fix a few warningsMauro Carvalho Chehab2010-08-021-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>
* V4L/DVB: tuners:tuner-simple Fix warning: variable 'tun' set but not usedJustin P. Mattock2010-08-021-3/+0
| | | | | | | | | | | | Resend due to a whitespace issue I created by mistake. The below patch fixes a warning message create by gcc 4.6.0 CC [M] drivers/media/common/tuners/tuner-simple.o drivers/media/common/tuners/tuner-simple.c: In function 'simple_set_tv_freq': drivers/media/common/tuners/tuner-simple.c:548:20: warning: variable 'tun' set but not used Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: xc5000, rework xc_write_regDmitri Belimov2010-08-021-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>
* V4L/DVB: tda18271: fix error detection during initialization of first instanceMichael Krufky2010-08-021-3/+5
| | | | | | | | | | | | | | | | | | | Fix error detection of failures during initialization of first instance: Dont pass a function into the tda_fail macro. Instead, save the function return value and pass that into the tda_fail macro. This prevents the function from being called twice in cases of failure, for example: [19026.074070] tuner 4-0060: chip found @ 0xc0 (device #0) [19026.087755] tda18271 4-0060: creating new instance [19026.089965] Unknown device detected @ 4-0060, device not supported. [19026.092233] Unknown device detected @ 4-0060, device not supported. [19026.092241] tda18271_attach: [4-0060|M] error -22 on line 1275 [19026.092327] tda18271 4-0060: destroying instance Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tunerAndy Walls2010-07-082-0/+17
| | | | | Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: xc3028: fix regression in firmware loading timeDevin Heitmueller2010-05-181-4/+7
| | | | | | | | | | | | | Fix a regression in the firmware loading time where it went from 1080 ms to 4700 ms. This was noticed when the em28xx based HVR-950 took noticably longer to load the driver. Regression introduced in hg 12824. The developer added an msleep() call with an argument based on a newly introduced xc3028_ctrl field, which is left initialized to zero for pretty much every board that is currently supported. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12846): tuner-xc2028: Fix skip code for devices with broken read ↵Mauro Carvalho Chehab2010-05-181-0/+5
| | | | | | (tm6000) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12825): tm6000: I2C reading operations is not reliable on tm6000Mauro Carvalho Chehab2010-05-182-2/+9
| | | | | | | | | | tm6000 sometimes can't read from i2c, but this is currently required for tuner-xc2028 to work. This patch adds an option to tuner-xc2028 to not rely on i2c reading. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12824): tuner-xc2028: adds an option to send i2c data on slower speedMauro Carvalho Chehab2010-05-182-1/+5
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-3013-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* V4L/DVB: tuner-types: Add Sony BTF-Pxn01Z tuner type used on GigaPocket cardsAndy Walls2010-02-261-0/+21
| | | | | | | | | Sony makes custome tuners for its GigaPocket line of ivtv based capture cards. This adds an entry to the tuner-types list for such tuners. Parameters are based on experiments by Eric Anderson <rico99@sbcglobal.net>. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: tuner-xc2028: Fix demod breakage for XC3028LMauro Carvalho Chehab2010-02-261-1/+3
| | | | | | | | | A small mistake on the last patch broke demod s-code setup for XC3028L (firmware 3.2 and upper). Fix it. Thanks-to: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: tuner-xc2028: fix tuning logic to solve a regression in AustraliaMauro Carvalho Chehab2010-02-261-17/+60
| | | | | | | | | | | | There's one reported regression in Australia (DTV7) and some reported troubles with newer firmwares found on xc3028l chips. Rework the logic to improve tuner on those cases. Thanks-to: Robert Lowery <rglowery@exemail.com.au> Thanks-to: Stefan Ringel <stefan.ringel@arcor.de> Tested-by: Robert Lowery <rglowery@exemail.com.au> CC: stable.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13934): tda8290: Fix FM radio easy programming standard selection ↵Michael Krufky2010-01-171-1/+2
| | | | | | | for TDA8295 Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13887): tda8290: add autodetection support for TDA8295c2Michael Krufky2010-01-171-3/+6
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13592): max2165: 32bit build patchDavid Wong2009-12-101-1/+1
| | | | | | | | This patch drops usage of floating point variable for 32bit build Signed-off-by: David T. L. Wong <davidtlwong@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>