17 Feb, 2009

7 commits

  • The new v4l2_subdev_call used s_fmt instead of g_fmt.

    Thanks-to: Andy Walls
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The video_ioctl2 conversion of ivtv in kernel 2.6.27 introduced a bug
    causing decoder commands to crash. The decoder commands should have been
    handled from the video_ioctl2 default handler, ensuring correct mapping
    of the argument between user and kernel space. Unfortunately they ended
    up before the video_ioctl2 call, causing random crashes.

    Thanks to hannes@linus.priv.at for testing and helping me track down the
    cause!

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • If a device using the gspca framework is unplugged while it is still streaming
    then the call that is used to free the URBs that have been allocated occurs
    after the pointer it uses becomes invalid at the end of gspca_disconnect.
    Make another cleanup call in gspca_disconnect while the pointer is still
    valid (multiple calls are OK as destroy_urbs checks for pointers already
    being NULL.

    Signed-off-by: Adam Baker
    Signed-off-by: Jean-Francois Moine
    Signed-off-by: Mauro Carvalho Chehab

    Adam Baker
     
  • On Mon, 02 Feb 2009, Hartmut wrote:

    This change set is wrong. The affected functions cannot be called from
    an interrupt context, because they may process large buffers. In this
    case, interrupts are disabled for a long time. Functions, like
    dvb_dmx_swfilter_packets(), could be called only from a tasklet.

    This change set does hide some strong design bugs in dm1105.c and
    au0828-dvb.c.

    Please revert this change set and do fix the bugs in dm1105.c and
    au0828-dvb.c (and other files).

    On Sun, 15 Feb 2009, Oliver Endriss wrote:

    This changeset _must_ be reverted! It breaks all kernels since 2.6.27
    for applications which use DVB and require a low interrupt latency.

    It is a very bad idea to call the demuxer to process data buffers with
    interrupts disabled!

    On Mon, 16 Feb 2009, Trent Piepho wrote:

    I agree, this is bad. The demuxer is far too much work to be done with
    IRQs off. IMHO, even doing it under a spin-lock is excessive. It should
    be a mutex. Drivers should use a work-queue to feed the demuxer.

    Thank you for testing this changeset and discovering the issues on it.

    Cc: Trent Piepho
    Cc: Hartmut
    Cc: Oliver Endriss
    Cc: Andreas Oberritter
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • This patch closes one of my todos that was since long on my list.
    Some people reported clicks and glitches in the audio stream,
    correlated to the LED color changing cycle.
    Thanks to Rick Bronson .

    Signed-off-by: Tobias Lorenz
    Signed-off-by: Mauro Carvalho Chehab

    Tobias Lorenz
     
  • Thanks to Bob Ross
    - correction of stereo detection/setting
    - correction of signal strength indicator scaling

    Signed-off-by: Tobias Lorenz
    Signed-off-by: Mauro Carvalho Chehab

    Tobias Lorenz
     
  • As reported by David Engel , ATSC115 doesn't work
    fine with mythtv. This software opens both analog and dvb interfaces of
    saa7134.

    What happens is that some tuner commands are going to the wrong place,
    as shown at the logs:

    Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: using tuner params #0 (ntsc)
    Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
    Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
    Feb 12 20:37:48 opus kernel: tuner 1-0061: tv freq set to 67.25
    Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: using tuner params #0 (ntsc)
    Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
    Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
    Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: tv 0x07 0x10 0xce 0x01
    Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: tv 0x07 0x10 0xce 0x01

    This happens due to a hack at TUV1236D analog setup, where it replaces
    tuner address, at 0x61 for 0x0a, in order to save a few memory bytes.

    The code assumes that nobody else would try to access the tuner during
    that setup, but the point is that there's no lock to protect such
    access. So, this opens the possibility of race conditions to happen.

    Instead of hacking tuner address, this patch uses a temporary var with
    the proper tuner value to be used during the setup. This should save
    the issue, although we should consider to write some analog/digital
    lock at saa7134 driver.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

01 Feb, 2009

2 commits

  • Just like with the s5h1411, the s5h1409 needs a soft-reset in order for it
    to know that the tuner has been told to change frequencies. This change
    changes the behavior from "random tuning times between 500ms to complete
    tuning lock failures" to "tuning lock consistently within 700ms".

    Thanks to Robert Krakora for doing
    initial testing of the patch on the KWorld 330U.

    Thanks to Andy Walls for doing testing of the patch on
    the HVR-1600.

    Thanks to Michael Krufky for doing additional testing.

    Signed-off-by: Devin Heitmueller
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Devin Heitmueller
     
  • According with saa7130 public datasheet, saa7130 doesn't support
    digital audio. This is also confirmed by experimental tests. So, it
    doesn't make sense to let saa7134-alsa register for those chipsets.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

29 Jan, 2009

31 commits

  • Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Resetting the streaming flag on disconnection prevented the URBs to be freed
    when streaming was active.
    Also, USBs cannot be killed after disconnection (oops in [usbcore] unlink1).

    Signed-off-by: Jean-Francois Moine
    Signed-off-by: Mauro Carvalho Chehab

    Jean-Francois Moine
     
  • Trace: (Provided by Douglas)

    BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:558
    in_atomic():0, irqs_disabled():1
    Pid: 4918, comm: sox Not tainted 2.6.27.5 #1
    [] __might_sleep+0xc6/0xcb
    [] usb_kill_urb+0x1a/0xd8
    [] ? __kmalloc+0x9b/0xfc
    [] ? __kmalloc+0xb8/0xfc
    [] ? usb_alloc_urb+0xf/0x31
    [] em28xx_isoc_audio_deinit+0x2f/0x6c [em28xx_alsa]
    [] em28xx_cmd+0x1aa/0x1c5 [em28xx_alsa]
    [] snd_em28xx_capture_trigger+0x53/0x68 [em28xx_alsa]
    [] snd_pcm_do_start+0x1c/0x23 [snd_pcm]
    [] snd_pcm_action_single+0x25/0x4b [snd_pcm]
    [] snd_pcm_action+0x6a/0x76 [snd_pcm]
    [] snd_pcm_start+0x14/0x16 [snd_pcm]
    [] snd_pcm_lib_read1+0x66/0x273 [snd_pcm]
    [] ? snd_pcm_kernel_ioctl+0x46/0x5f [snd_pcm]
    [] snd_pcm_lib_read+0xbf/0xcd [snd_pcm]
    [] ? snd_pcm_lib_read_transfer+0x0/0xaf [snd_pcm]
    [] snd_pcm_oss_read3+0x99/0xdc [snd_pcm_oss]
    [] snd_pcm_oss_read2+0xa3/0xbf [snd_pcm_oss]
    [] ? _cond_resched+0x8/0x32
    [] snd_pcm_oss_read+0x106/0x150 [snd_pcm_oss]
    [] ? snd_pcm_oss_read+0x0/0x150 [snd_pcm_oss]
    [] vfs_read+0x81/0xdc
    [] sys_read+0x3b/0x60
    [] sysenter_do_call+0x12/0x34
    =======================

    The culprit in the trace is snd_pcm_action() which invokes a spin lock
    which disables pre-emption which disables an IRQ which causes the
    __might_sleep() function to fail the irqs_disabled() test. Since
    pre-emption is enabled then it is safe to de-allocate the memory if
    you first unlink each URB. In this instance you are safe since
    pre-emption is disabled. If pre-emption and irqs are not disabled then
    call usb_kill_urb(), else call usb_unlink_urb().

    Thanks to Douglas for tracking down this bug originally!!!

    [dougsland@redhat.com: Fixed codyingstyle]
    Signed-off-by: Robert Krakora
    Signed-off-by: Douglas Schilling Landgraf
    Signed-off-by: Mauro Carvalho Chehab

    Robert Krakora
     
  • Move radio->muted and radio->stereo in section where radio mutex is
    locked to avoid possible race condition problems or access to memory.
    Thanks to David Ellingsworth for pointing to
    this weak place in driver.

    Signed-off-by: Alexey Klimov
    Signed-off-by: Douglas Schilling Landgraf
    Signed-off-by: Mauro Carvalho Chehab

    Alexey Klimov
     
  • These days TUNER_SET_CONFIG is broadcast to the other i2c devices
    and that triggers a fw load on the cx25840. Ignore this command
    since cx25840 isn't a tuner and you really do not want to load
    the firmware that early.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • First control messages to the stick timeouts very often due to probable
    hw bug. Repeat first message few times if it fails as workaround.

    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Bug causes 2nd FE MPEG TS buffer size to be zero and therefore no picture
    when 2nd FE was enabled. Configure correct buffer size also for 2nd FE.

    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • The default case of the switch didn't unlock the mutex.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • …ing request at ffffffff

    I'm using a "Hauppauge WinTV-NOVA-T DVB card" of PCI id "13c2:1005" with
    kernel 2.6.27.9.

    I've recently experienced the following fairly consistent kernel oops on
    startup in grundig_29504_401_tuner_set_params from budget.c. As you
    might expect, following this failure, the card doesn't work.

    I'm not a kernel developer, nevertheless I seem to have managed to track
    this down to a non-existent initialisation of
    budget->dvb_frontend->tuner_priv.

    The attached patch fixes the problem for me (and I've managed to tune
    the card successfully as a result), but I don't know of anyone else
    using the driver so I can't test it on other people.

    Please let me know if this works for you or if I've done something
    terribly wrong ;-(

    BUG: unable to handle kernel paging request at ffffffff
    IP: [<f8981e11>] :budget:grundig_29504_401_tuner_set_params+0x3b/0xf8
    *pde = 007e0067 *pte = 00000000
    Oops: 0000 [#1] SMP
    Modules linked in: bridge stp bnep rfcomm l2cap asb100 hwmon_vid hwmon
    fuse ipt_REJECT nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT
    xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter
    ip6_tables x_tables ipv6 loop dm_multipath scsi_dh ppdev snd_cmipci
    gameport snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
    snd_pcm_oss snd_mixer_oss l64781 snd_pcm snd_page_alloc snd_opl3_lib
    snd_timer parport_pc snd_hwdep parport btusb snd_mpu401_uart budget
    budget_core snd_rawmidi bluetooth saa7146 snd_seq_device ttpci_eeprom
    snd soundcore sr_mod i2c_sis96x cdrom dvb_core sis900 i2c_core floppy
    pcspkr mii sata_sil sg dm_snapshot dm_zero dm_mirror dm_log dm_mod
    pata_sis ata_generic pata_acpi libata sd_mod scsi_mod crc_t10dif ext3
    jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]

    Pid: 2319, comm: kdvb-fe-0 Not tainted (2.6.27.9-73.fc9.i686 #1)
    EIP: 0060:[<f8981e11>] EFLAGS: 00010286 CPU: 0
    EIP is at grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
    EAX: f6417f00 EBX: f6f53808 ECX: 00000000 EDX: ffffffff
    ESI: f6f94404 EDI: f6417f00 EBP: f6417f10 ESP: f6417ef0
    DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
    Process kdvb-fe-0 (pid: 2319, ti=f6417000 task=f642b2c0 task.ti=f6417000)
    Stack: f6e39800 00000000 00000004 f6417f00 c064523c f6f53808 f6f53800 f6f94404
    f6417f54 f8b2e45a f6417f24 00000286 f6417f4c f6417f38 00000000 00000286
    f6417f3c c064520f f642b2c0 f6417f6c c064456f 00000001 f6f94400 00000001
    Call Trace:
    [<c064523c>] ? _spin_lock_irqsave+0x29/0x30
    [<f8b2e45a>] ? apply_frontend_param+0x27/0x357 [l64781]
    [<c064520f>] ? _spin_lock_irq+0x1c/0x20
    [<c064456f>] ? __down_common+0x91/0xbf
    [<f894f25d>] ? dvb_frontend_swzigzag_autotune+0x17d/0x1a4 [dvb_core]
    [<f894f780>] ? dvb_frontend_swzigzag+0x1ac/0x209 [dvb_core]
    [<f894fcc8>] ? dvb_frontend_thread+0x2eb/0x3b3 [dvb_core]
    [<c043c166>] ? autoremove_wake_function+0x0/0x33
    [<f894f9dd>] ? dvb_frontend_thread+0x0/0x3b3 [dvb_core]
    [<c043bec3>] ? kthread+0x3b/0x61
    [<c043be88>] ? kthread+0x0/0x61
    [<c040494b>] ? kernel_thread_helper+0x7/0x10
    =======================
    Code: ec 14 8b 80 00 02 00 00 8b 93 08 02 00 00 8d 7d e4 8b 40 20 89 45
    e0 31 c0 85 d2 f3 ab 8d 45 f0 66 c7 45 e8 04 00 89 45 ec 74 09 <0f> b6
    02 66 89 45 e4 eb 06 66 c7 45 e4 61 00 8b 0e be 0a 8b 02
    EIP: [<f8981e11>] grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
    SS:ESP 0068:f6417ef0

    Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

    Tony Broad
     
  • Revert a change made in change 9743 which resulted in a kernel panic in some
    cases on shutdown of the audio stream.

    First discovered when working on the Pinnacle 880e support, and later
    reproduced by a user on the mailing list with the HVR-900 as well.

    Signed-off-by: Devin Heitmueller
    Signed-off-by: Mauro Carvalho Chehab

    Devin Heitmueller
     
  • Fix for KWorld 330U Board

    Many thanks to Devin and Mauro!!!

    Signed-off-by: Robert Krakora
    Signed-off-by: Mauro Carvalho Chehab

    Robert Krakora
     
  • Fix for KWorld 330U AC97

    Many thanks to Devin and Mauro again!!!

    Signed-off-by: Robert Krakora
    Signed-off-by: Mauro Carvalho Chehab

    Robert Krakora
     
  • em28xx: Fix audio URB transfer buffer memory leak and race
    condition/corruption of capture pointer

    Leak fix kindly contributed by Pádraig Brady.

    Signed-off-by: Robert Krakora
    Signed-off-by: Mauro Carvalho Chehab

    Robert Krakora
     
  • With the conversion to v4l2_subdev one bit of code was accidentally dropped:
    on receiving the first command the driver has to load the fw. A new init()
    command was introduced to do that explicitly for bridge drivers that are
    converted to use v4l2_subdev, but old drivers that are not yet converted
    no longer worked.

    This patch fixes this regression for these old drivers.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The VIDIOC_QUERYCTRL command needs to actually do a queryctrl, not a
    querymenu. Similarly, the VIDIOC_QUERYMENU command needs to actually
    do a querymenu not a queryctrl.

    Signed-off-by: Mike Isely
    Signed-off-by: Mauro Carvalho Chehab

    Mike Isely
     
  • The following patch adds support for a new version of the
    Terratec Cinergy DT USB XS Diversity Dual DVB-T TV tuner stick.
    The USB ID of the new stick is 0ccd:0081.
    The hardware of the stick has changed, when compared to the first version of
    this stick, but it still uses quite standard components, so that only minor
    changes are needed to the sources.

    The patch has been successfully tested with hotplugging the device and then
    2 x tzap and 2 x mplayer, to watch two different TV programs simultaneously.

    The stick works with both, the old and new firmwares:
    - dvb-usb-dib0700-1.10.fw and
    - dvb-usb-dib0700-1.20.fw

    Signed-off-by: Nicolas Fournier
    Signed-off-by: Patrick Boettcher
    Signed-off-by: Mauro Carvalho Chehab

    Nicolas Fournier
     
  • On Fri, 2009-01-09 at 15:40 +0300, Goga777 wrote:
    > hI
    >
    > With today v4l-dvb I couldn't run my hvr4000 card on 2.6.27 kernel

    > [ 14.555162] cx88/2: cx2388x dvb driver version 0.0.6 loaded
    > [ 14.555231] cx88/2: registering cx8802 driver, type: dvb access: shared
    > [ 14.555303] cx88[0]/2: subsystem: 0070:6900, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]
    > [ 14.555374] cx88[0]/2: cx2388x based DVB/ATSC card
    > [ 14.555446] BUG: unable to handle kernel NULL pointer dereference at 00000000
    > [ 14.555560] IP: [] __mutex_lock_common+0x3c/0xe4
    > [ 14.555652] *pde = 00000000
    > [ 14.555735] Oops: 0002 [#1] SMP
    > [ 14.555851] Modules linked in: cx88_dvb(+) cx88_vp3054_i2c videobuf_dvb wm8775 dvb_core tuner_simple tuner_types snd_seq_dummy tda9887 snd_seq_oss(+) snd_intel8x0(+) tda8290 snd_seq_midi snd_seq_midi_event snd_ac97_codec cx88_alsa(+) snd_seq ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_rawmidi snd_timer tuner snd_seq_device psmouse snd serio_raw ivtv(+) cx8800 cx8802 cx88xx soundcore cx2341x ir_common ns558 i2c_i801 v4l2_common videodev i2c_algo_bit gameport v4l1_compat snd_page_alloc tveeprom pcspkr floppy videobuf_dma_sg videobuf_core btcx_risc i2c_core parport_pc parport button intel_agp agpgart shpchp pci_hotplug rng_core iTCO_wdt sd_mod evdev usbhid hid ff_memless ext3 jbd mbcache ide_cd_mod cdrom ide_disk ata_piix libata dock 8139too usb_storage scsi_mod piix 8139cp mii ide_core uhci_hcd ehci_hcd usbcore thermal processor fan thermal_sys
    > [ 14.557013]
    > [ 14.557013] Pid: 2310, comm: modprobe Not tainted (2.6.27.1-custom-default1 #1)
    > [ 14.557013] EIP: 0060:[] EFLAGS: 00010246 CPU: 1
    > [ 14.557013] EIP is at __mutex_lock_common+0x3c/0xe4
    > [ 14.557013] EAX: de653e98 EBX: de739118 ECX: de739120 EDX: 00000000
    > [ 14.557013] ESI: dd4209e0 EDI: de73911c EBP: de653eb0 ESP: de653e88
    > [ 14.557013] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    > [ 14.557013] Process modprobe (pid: 2310, ti=de652000 task=dd4209e0 task.ti=de652000)
    > [ 14.557013] Stack: 3535352e 5d343733 00000002 de739120 de739120 00000000 c044a6c0 de739110
    > [ 14.557013] de739118 00000001 de653ebc c02e6d38 c02e6b88 de653ec4 c02e6b88 de653ed8
    > [ 14.557013] e1ac7115 de6a9000 00000001 00000000 de653f0c e1aeca62 de739004 de739000
    > [ 14.557013] Call Trace:
    > [ 14.557013] [] ? __mutex_lock_slowpath+0x17/0x1a
    > [ 14.557013] [] ? mutex_lock+0x12/0x14
    > [ 14.557013] [] ? mutex_lock+0x12/0x14
    > [ 14.557013] [] ? videobuf_dvb_get_frontend+0x19/0x40 [videobuf_dvb]
    > [ 14.557013] [] ? cx8802_dvb_probe+0xc9/0x1945 [cx88_dvb]
    > [ 14.557013] [] ? cx8802_register_driver+0xbd/0x1ac [cx8802]
    > [ 14.557013] [] ? cx8802_register_driver+0x106/0x1ac [cx8802]
    > [ 14.557013] [] ? dvb_init+0x22/0x27 [cx88_dvb]
    > [ 14.557013] [] ? _stext+0x42/0x11a
    > [ 14.557013] [] ? dvb_init+0x0/0x27 [cx88_dvb]
    > [ 14.557013] [] ? __blocking_notifier_call_chain+0xe/0x51
    > [ 14.557013] [] ? sys_init_module+0x8c/0x17d
    > [ 14.557013] [] ? syscall_call+0x7/0xb
    > [ 14.557013] [] ? round_jiffies_relative+0x14/0x16
    > [ 14.557013] =======================
    > [ 14.557013] Code: 78 04 89 f8 89 55 e0 64 8b 35 00 30 3f c0 e8 2e 0c 00 00 8d 43 08 89 45 e4 8b 53 0c 8d 45 e8 8b 4d e4 89 43 0c 89 4d e8 89 55 ec 02 89 75 f0 83 c8 ff 87 03 48 74 55 8a 45 e0 8b 4d e0 83 e0
    > [ 14.557013] EIP: [] __mutex_lock_common+0x3c/0xe4 SS:ESP 0068:de653e88
    > [ 14.565211] ---[ end trace 94d8b014e067ac7b ]---

    Tested and confirmed to work by several users at linux-media@vger.kernel.org

    Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However,
    currently, the PCM IN selection is not set by the driver. This patch allows
    specifying the PCM IN expected output, via board description table.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The zoran driver does a module_get/put of THIS_MODULE on device open/close.
    This isn't necessary as the kernel does this automatically.

    Clean up the failure path of zoran_open() somewhat.

    Make the dprintk()s on open/close a higher debug level and make the user
    count printed take the current open/close into account.

    Signed-off-by: Trent Piepho
    Acked-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     
  • The driver should only use the kernel mapped io address, zr36057_mem, and
    not the PCI bus address, zr36057_adr. Since the latter is only printed out
    once, there is no need to save it in the driver data structure.

    There was some old code that looked like it was for the Alpha architecture
    which would use the PCI bus address. It probably no longer applies to
    modern kernels.

    Signed-off-by: Trent Piepho
    Acked-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     
  • Instead of using custom code, just let the device layer look it up for us
    from the pci device table. This requires extending the pci device table to
    list each known card, plus a catch-all entry for the cards that don't have
    sub-system vendor/device data.

    Improve some of the info and error messages too.

    Signed-off-by: Trent Piepho
    Acked-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     
  • The driver was keeping a global array with an entry for each zoran device
    probed. It was a leftover from when the driver didn't dynamically allocate
    the driver data for each device.

    There was only one use left, in the video device's ->open() method, looking
    up the struct zoran for the opened device from the minor number. This can
    be done better with video_get_drvdata().

    Since zoran_num is now only used in the pci driver's ->probe() method, it
    doesn't need to be an atomic_t and be static. There is a race if multiple
    zoran cards could be probed at the same time, but currently the probe
    method for a given driver is single threaded.

    Signed-off-by: Trent Piepho
    Acked-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     
  • When initializing a module parameter that is a per-card array, use
    "{ [0 ... (BUZ_MAX-1)] = -1 }" instead of "{ -1, -1, -1, -1 }". This way
    all of the entries will be correctly set to -1 if someone changes BUZ_MAX
    to a value other than 4.

    Adjust some of the parameter help text too.

    Signed-off-by: Trent Piepho
    Acked-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     
  • When enabling a shared IRQ line, then saa7134_irq handler could be invoked
    before the driver had completely set up internal structures, due to a shared
    interrupt line firing. Clear the saa7134 interrupt status reg, before
    requesting the irq line, so that stale IRQ status isn't processed before the
    internal structures are set up.

    Marcin Slusarz recently brought this Oops to the attention of the v4l-dvb
    lists and provided an initial analysis by investigating reports found here:

    http://kerneloops.org/guilty.php?guilty=mute_input_7133&version=2.6.27-release&start=1802240&end=1835007&class=oops

    Reported-by: Marcin Slusarz
    Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • Analog support for HVR-1250 has not been completed, but does exist for
    the HVR-1800.

    Since both cards use the same driver, it tries to create the analog
    dev for both devices, which is not possible.

    This causes a NULL error to show up in video_open and mpeg_open.

    -Mark

    Iterations through the cx23885_devlist must check for NULL
    pointers as some supported devices only have DVB support at the moment.
    Mark Jenks encoutered an Oops in a system with both an HVR-1250 and HVR-1800
    installed.

    -Andy

    Reported-by: Mark Jenks
    Tested-by: Mark Jenks
    Signed-off-by: Mark Jenks
    Signed-off-by: Andy Walls
    Signed-off-by: Mauro Carvalho Chehab

    Andy Walls
     
  • Register 0x2d has to be set differently in the saa7129 compared to the
    saa7127. This was not done correctly, so S-Video was broken in certain
    circumstances.

    This fixes a regression introduced in 2.6.28.

    Signed-off-by: Martin Dauskardt
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Martin Dauskardt
     
  • Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • This is a really old and crufty driver that wasn't using the long
    established pci driver framework.

    Signed-off-by: Trent Piepho
    Acked-by: Jean Delvare
    [mchehab@redhat.com: Cleaned up a few CodingStyle issues]
    Signed-off-by: Mauro Carvalho Chehab

    Trent Piepho
     
  • If Hauppauge eeprom is corrupted, the driver returns tuner = 0, instead
    of TUNER_ABSENT.

    This makes the drivers to initialize tuner, instead of handling the
    manual parameter.

    Since the tuner core rejects that a tuner to have their type changed,
    this breaks the manual tuner override.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab