KernelLabs tvtime dropping V4L1 support

Well, it’s been a long time coming, but the kernel folks are finally dropping support for the Video4Linux 1 API in Linux 2.6.38. As a result, applications which depended on the API (such as tvtime) have to change to no longer use the old API.

At KernelLabs, tvtime is our “go-to” tool for demonstrating driver functionality to commercial customers, so it made sense for us to do the work to clean up the code. We’ve wanted to do this for a while, since the V4L1 cruft made the code much more complicated and therefore made testing that much harder.

In the end, it only took about an hour to remove the V4L1 dependency, and the results can be found here:

http://www.kernellabs.com/hg/~dheitmueller/tvtime

And as per usual, here are the commands required to build:

hg clone http://www.kernellabs.com/hg/~dheitmueller/tvtime
cd tvtime
autoreconf
./configure --disable-nls
make
make install

(or alternatively you can just run it where it lies by running ./src/tvtime)

If anybody notices any functional difference resulting from this change, please let me know. That is, unless you are expecting it to work with your very old V4L1-only device, in which case I might suggest spending $20 and buying a new card…

21 thoughts on “KernelLabs tvtime dropping V4L1 support

    • Billy DeVincentis

      Devin, I am running gentoo and I am trying to import your work to our distro since the version of tvtime that we have will no longer compile against 2.6.38 headers.
      1- If I download the gz file from http://www.kernellabs.com/hg/~dheitmueller/tvtime can I skip the mercurial copy since running hg clone http://www.kernellabs.com/hg/~dheitmueller gave me errors about hg forest.
      2- Assuming that the gz file mentioned in 1* is the updated patched sources ready to build, here is what happens when I run autoreconf

      Linux1 tvtime-111b28cca42d # autoreconf
      autoreconf-2.68: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
      configure.ac:8: required file `./config.guess’ not found
      configure.ac:8: `automake –add-missing’ can install `config.guess’
      configure.ac:8: required file `./config.sub’ not found
      configure.ac:8: `automake –add-missing’ can install `config.sub’
      configure.ac:5: required file `./install-sh’ not found
      configure.ac:5: `automake –add-missing’ can install `install-sh’
      configure.ac:21: required file `./ltmain.sh’ not found
      configure.ac:5: required file `./missing’ not found
      configure.ac:5: `automake –add-missing’ can install `missing’
      data/Makefile.am:26: `%’-style pattern rules are a GNU make extension
      src/Makefile.am:32: compiling `mixer.c’ with per-target flags requires `AM_PROG_CC_C_O’ in `configure.ac’
      src/Makefile.am: required file `./depcomp’ not found
      src/Makefile.am: `automake –add-missing’ can install `depcomp’
      autoreconf-2.68: automake failed with exit status: 1

        • Billy DeVincentis

          Still Not working

          Linux1 tvtime-111b28cca42d # autoreconf
          autoreconf-2.68: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
          configure.ac:8: required file `./config.guess’ not found
          configure.ac:8: `automake –add-missing’ can install `config.guess’
          configure.ac:8: required file `./config.sub’ not found
          configure.ac:8: `automake –add-missing’ can install `config.sub’
          configure.ac:5: required file `./install-sh’ not found
          configure.ac:5: `automake –add-missing’ can install `install-sh’
          configure.ac:21: required file `./ltmain.sh’ not found
          configure.ac:5: required file `./missing’ not found
          configure.ac:5: `automake –add-missing’ can install `missing’
          data/Makefile.am:26: `%’-style pattern rules are a GNU make extension
          src/Makefile.am:32: compiling `mixer.c’ with per-target flags requires `AM_PROG_CC_C_O’ in `configure.ac’
          src/Makefile.am: required file `./depcomp’ not found
          src/Makefile.am: `automake –add-missing’ can install `depcomp’
          autoreconf-2.68: automake failed with exit status: 1
          Linux1 tvtime-111b28cca42d # automake –add-missing
          automake-1.11: no Automake input file found for `–add-missing’
          automake-1.11: no input file found among supplied arguments
          Linux1 tvtime-111b28cca42d #

          • Billy DeVincentis

            Okay, that got me a bit further. Here is where it fails

            checking if gcc supports -g -O3 -fomit-frame-pointer flags… yes
            checking if gcc supports -g -O3 -fomit-frame-pointer -std=gnu99 flags… yes
            checking for memalign… yes
            checking return type of signal handlers… void
            checking for an ANSI C-conforming const… (cached) yes
            checking for inline… (cached) inline
            checking for size_t… (cached) yes
            checking whether byte ordering is bigendian… no
            checking __attribute__ ((aligned ())) support… 64
            configure: creating ./config.status
            config.status: error: cannot find input file: `Makefile.in’
            Linux1 tvtime-111b28cca42d #

          • Billy DeVincentis

            Yes, but something didn’t work

            Linux1 tvtime-111b28cca42d # autoreconf
            autoreconf-2.68: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION
            configure.ac:21: required file `./ltmain.sh’ not found
            data/Makefile.am:26: `%’-style pattern rules are a GNU make extension
            src/Makefile.am:32: compiling `mixer.c’ with per-target flags requires `AM_PROG_CC_C_O’ in `configure.ac’
            autoreconf-2.68: automake failed with exit status: 1

  1. What a coincidence! I was just about to send that very same information to the Nigerian Gaming and Email Lottery Corporation, (it must truly be my lucky day) as my address happened to have won the lottery! I’ll just CC you in on my response to them, and you can grab the particulars from that message. 😉

  2. When I try to run this tvtime I get:

    Running tvtime 1.0.2.
    Reading configuration from /home/pburt/.tvtime/tvtime.xml
    ./src/tvtime: Broken tvtime install, not compiled with X support?

    What am I missing?

    • Devin Heitmueller

      It sounds like you have a generic build-time dependency problem that is not specific to the dropping of V4L1 support.

      I would recommend you see if you can build the tvtime that came with your distro – I suspect you will find the same problem. I usually satisfy the build-time dependencies that are associated with the distro’s version of tvtime, at which point you won’t have any trouble building the KL version. For example on Ubuntu I would run:

      apt-get build-dep tvtime

      Just make sure you re-run ./configure after installing the packages.

      Devin

  3. Thanks. I should have figured that out.

    It’s great that someone is working on tvtime. How long before this work finds its way into official distribution packages?

    Also, any work on replacing the oss(or emulation) dependency for /dev/mixer:line for cards that don’t provide an alsa sound device (it uses an audio cable from the card to line in)?

    • Devin Heitmueller

      Hi Bp,

      It’s hard to say when/if the KernelLabs tree will go into upstream distributions. The problem is the original project has been dead for *years*, and that is what distros are shipping. We’ve made an effort to merge all the distro-maintained patches to make it easier for them to switch to our tree as the upstream source, but it is ultimately up to them to decide whether to switch.

      Regarding the ALSA mixer situation, there are virtually no cards still made which don’t provide an ALSA device (and haven’t been for a number of years). I am likely to drop the ALSA mixer config entirely and switch to a model that strictly works with cards that use an ALSA device. People who have an archaic card that doesn’t provide an ALSA device can stick with whatever version of tvtime they have. Time to enter the 21st century.

      Devin

  4. The archaic card still receives archaic analog TV. Seems sad to dumpster it and buy a card that receives the same TV but with a different audio system. Wouldn’t controlling just one line-in volume and mute be fairly easy to keep?
    Thanks for the work and responding to my questions. I don’t mean to be ungrateful.

    • Devin Heitmueller

      There were changes to newer versions of glibc that prevented even the virgin upstream sources from tvtime.sourceforge.net from building under recent versions of Ubuntu.

      If you had “older sources” building, they were probably patched by the maintainer of whatever distribution you were using (to confirm, you can get the get the upstream tarball from tvtime.sourceforge.net).

      Devin

  5. [quote]The archaic card still receives archaic analog TV. Seems sad to dumpster it and buy a card that receives the same TV but with a different audio system. Wouldn’t controlling just one line-in volume and mute be fairly easy to keep?
    Thanks for the work and responding to my questions. I don’t mean to be ungrateful.[/quote]

    I second that.
    I am using legacy stuff cause i cant afford to buy the new one! I’m still a student struggling with my finances. Spending 20 or 50 bucks on new hardware is not a healthy move for me right now! And you should know that there are many like me out there.

    My (analog)tv card(hauppauge) is working perfect right now running on Ubuntu 10.10!
    I am located in Europe!

    I don’t mean to be ungrateful either and i DO thank you for your ongoing support!

    cheers,
    George!

  6. Not sure where to post this. There doesn’t seem to be a bug tracker. So here goes:

    Gentoo Linux recently switched from the old tvtime (from 2005) and now uses the kernellabs version. But there’s a bug now that wasn’t there before: launching tvtime lockup up ALSA. For as long as tvtime is running, no other application can output sound:

    $ aplay
    ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
    aplay: main:660: audio open error: Device or resource busy

    tvtime itself says this when starting:

    Playback device is hw:0,0
    Capture device is hw:1,0
    ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
    Cannot open ALSA Capture device hw:1,0: No such file or directory

    (No, it’s not that I don’t have dmix active. I do. When tvtime isn’t running, I can start as many applications as I want and they all can play sound at the same time.)

Leave a Reply