Menu

#504 Tuner refuses to tell us the frequency

closed-fixed
9
2005-04-20
2005-01-14
iulian_d
No

hello,
i downloaded tvtime and tried to use it. i found this
bug and i think i found a solution to it. so here it is:

Bug present in tvtime 0.9.15.tar.gz release.
System was Fedora Core 2 on a p4 PC.
Tuner is a cx8800 Leadtek WinFast 2000XP.

in videoimput.c at line 1284 there is the function
videoimput_get_tuner_freq. the following modification
hast to be done in order to correct the bug:

int videoinput_get_tuner_freq( videoinput_t *vidin )
{
if( vidin->hastuner ) {
unsigned long frequency;

if( vidin->isv4l2 ) {
struct v4l2_frequency freqinfo;

/* the following two statements must be added */
freqinfo.tuner = vidin->tunerid;
freqinfo.type = V4L2_TUNER_ANALOG_TV;
/* end of add */

if( ioctl( vidin->grab_fd,
VIDIOC_G_FREQUENCY, &freqinfo ) < 0 ) {

the bug appeared because the tvtime uses v4l2 which
requires the initialization of at least two parameters
before calling ioctl function. these are tuner id and type.

in the original function these parameters were left
uninitialized.

thank you,

iulian

Discussion

  • Michael Cronenworth

    Logged In: YES
    user_id=529169

    Thank you for fixing this bug! This should be added to the CVS.

    Works for my MSI TV@nywhere Master!

     
  • Nobody/Anonymous

    Logged In: NO

    The patchh works great with my Leadtek winfast pvr2000!
    Nice job!

     
  • Billy Biggs

    Billy Biggs - 2005-01-24
    • milestone: --> Fixed in CVS for next release
    • priority: 5 --> 9
    • assigned_to: nobody --> vektor
    • status: open --> open-fixed
     
  • Billy Biggs

    Billy Biggs - 2005-01-24

    Logged In: YES
    user_id=153320

    Fixed in CVS, thanks a ton, I will try and release 0.9.16
    ASAP for this fix.

     
  • Nobody/Anonymous

    Logged In: NO

    I'm the proud owner of a new pcHDTV-3000 card, running
    0.9.15, and I'm also seeing this error after rebuilding and
    installing the most recent cx88** drivers:
    videoinput: Tuner refuses to tell us the current frequency:
    Invalid argument

    Friom dmesg:
    Linux video capture interface: v1.00
    bttv: driver version 0.9.15 loaded
    bttv: using 8 buffers with 2080k (520 pages) each for capture
    bttv: driver version 0.9.15 loaded
    bttv: using 8 buffers with 2080k (520 pages) each for capture
    cx2388x v4l2 driver version 0.0.4 loaded
    pcHDTV HD3000 Driver Version 1.6
    ACPI: PCI Interrupt Link [LNK2] enabled at IRQ 11
    ACPI: PCI interrupt 0000:01:07.0[A] -> GSI 11 (level, low)
    -> IRQ 11
    cx8800[0]: found at 0000:01:07.0, rev: 5, irq: 11, latency:
    32, mmio: 0xea000000
    cx8800[0]: subsystem: 7063:3000, board: pcHDTV HD3000 HDTV
    [card=14,autodetected]
    cx8800[0]: i2c attach [client=eeprom]
    cx8800[0]: i2c register ok
    tuner: Ignoring new-style parameters in presence of obsolete
    ones
    tuner: chip found at addr 0xc2 i2c-bus cx8800[0]
    tuner: type set to 51 (Thomson DDT 7610 ATSC/NTSC)) by cx8800[0]
    cx8800[0]: i2c attach [client=Thomson DDT 7610 ATSC/NTSC)]
    cx8800[0]: registered device video0 [v4l2]
    cx8800[0]: registered device vbi0
    cx88: registered device dtv0
    cx8800[0]: pcHDTV_HD3000 calling init_dvr
    ACPI: PCI interrupt 0000:01:07.2[A] -> GSI 11 (level, low)
    -> IRQ 11
    cx88:: 0 Version Data: 10001134-19430000
    cx88:: 1 Version Data: 10001134-19430000
    cx88:: Version: 113-4-194-3
    -----------

    I have also seen it call the tuner a type 46, which also works.
    But ungrading a kernel is a nightmare. For 2.6.11, only
    composite inputs, 4 of them, are available, no rf can be
    found but that may be erronious entries in my modprobe.conf.
    If anyone has that sorted, I appreciate a Cc:

    --
    Cheers, gene
    contact for clarification:
    gene dot heskett at verizon dot net

     
  • Nobody/Anonymous

    Logged In: NO

    This fixes it, thanks.

    --
    Cheers, Gene

     
  • da644

    da644 - 2005-03-19

    Logged In: YES
    user_id=1217998

    I have conpiled using the latest videoinput.c file with the
    fix in but I'm still getting the error:

    Running tvtime 0.9.15.
    Reading configuration from /usr/local/etc/tvtime/tvtime.xml
    Reading configuration from /root/.tvtime/tvtime.xml
    videoinput: Can't get tuner info: Invalid argument
    videoinput: Can't set tuner audio mode: Invalid argument
    videoinput: Can't get tuner info: Invalid argument
    videoinput: Can't set tuner audio mode: Invalid argument
    videoinput: Tuner present, but our request to change to
    videoinput: frequency 535250 failed with this error: Invalid
    argument.
    videoinput: Please file a bug report at http://tvtime.net/
    videoinput: Tuner refuses to tell us the current frequency:
    Invalid argument
    videoinput: Please file a bug report at http://tvtime.net/

    The card is a Hauppauge WinTV Go, I'm running Fedora Core 3
    and using v4l-info it reports as:

    ### v4l2 device info [/dev/video0] ###
    general info
    VIDIOC_QUERYCAP
    driver : "cx8800"
    card : "Hauppauge WinTV 34xxx models"
    bus_info : "PCI:0000:00:0f.0"
    version : 0.0.4
    capabilities : 0x5000011
    [VIDEO_CAPTURE,VBI_CAPTURE,READWRITE,STREAMING]

    Andrew

     
  • David Amiel

    David Amiel - 2005-04-02

    Logged In: YES
    user_id=797238

    works with a winfast 2000 expert too :)

    thx

     
  • David Amiel

    David Amiel - 2005-04-02

    Logged In: YES
    user_id=797238

    works with a winfast 2000 expert too :)

    thx

     
  • Nobody/Anonymous

    Logged In: NO

    "Fixed in CVS, thanks a ton, I will try and release 0.9.16
    ASAP for this fix."

    so much for asap :(

     
  • Billy Biggs

    Billy Biggs - 2005-04-20
    • status: open-fixed --> closed-fixed
     
  • Billy Biggs

    Billy Biggs - 2005-04-20

    Logged In: YES
    user_id=153320

    Yeah, I suck. I posted a 0.99 release from HEAD and I'll
    leave that there until I finish the diag port which I want
    to do for 1.0.

     

Log in to post a comment.