31 thoughts on “SAA7164-buffer.c line 274 bugfix

  1. Steven,
    All looks good so far! no kernel errors since I reinstalled with the latest!
    Woohoo!

    Any ideas on a time-frame to get composite to a cable box going? (or is that already good, but I’m and idiot for not figuring it out?)

  2. Steven,
    I’m having a hard time making vlc use the 2250 card as an input.
    I’m trying it’s v4l2 support but somehow it fails opening with a “chroma not supported”
    error. Any chance you know what options should I use to stream from the card ?

    Thanks in advance

  3. Got the driver working. Analog is working, and I don’t get a crash when I try to scan.

    But for the life of me, I can’t get Digital Video to stream. I don’t know if it’s me or if it’s the driver. Once I have tunned to a channel with zap, which device will have de the video data? /dev/video? /dev/dvb/adapter0/dvr0? Another?

  4. Oh, v4l2-ctl works fine, but I don’t have a “head” on the backend, and
    would like to stream it using multicast via vlc.

    Using:
    vlc -vvv -I http v4l:///dev/video0 –sout udp:224.0.0.100
    ends up with vlc complainig that it can not open /dev/video0, but log shows that
    it does open it, finds the geometry (720×480 in my case) and fails to find
    which chroma is supported, defaulting to MJPEG fails too and gives up.

    [0xa008fb4] v4l demux debug: V4L device Hauppauge WinTV-HVR2250 7 channels 0 audios 48 < w < 100000 32 < h < 100000
    [0xa008fb4] v4l demux debug: invalid width 0
    [0xa008fb4] v4l demux debug: invalid height 0
    [0xa008fb4] v4l demux debug: setting channel tuner(0) 1 tuners flags=0x1 type=0x1 norm=0x1
    [0xa008fb4] v4l demux debug: will use 720×480
    [0xa008fb4] v4l demux error: unsupported chroma

    Tryed old pvr module but it does not work either. Your help is appreciated.

  5. If using v4l2, then the error seems to come from not advertizong MPEG capability ?

    short capture of log:
    [0x9936f94] v4l2 demux debug: Trying direct kernel v4l2
    [0x9936f94] v4l2 demux debug: opening device ‘/dev/video0’
    [0x9936f94] v4l2 demux debug: V4L2 device: Hauppauge WinTV-HVR2250 using driver: saa7164[0] (version: 0.0.0) on PCI:0000:01:00.0
    [0x9936f94] v4l2 demux debug: the device has the capabilities: (X) Video Capture, ( ) Audio, (X) Tuner, ( ) Radio
    [0x9936f94] v4l2 demux debug: supported I/O methods are: (X) Read/Write, (X) Streaming, ( ) Asynchronous
    [0x9936f94] v4l2 demux debug: video input 0 (tuner) has type: Tuner adapter *
    [0x9936f94] v4l2 demux debug: video input 1 (composite) has type: External analog input
    [0x9936f94] v4l2 demux debug: video input 2 (svideo) has type: External analog input
    [0x9936f94] v4l2 demux debug: video input 3 (aux) has type: External analog input
    [0x9936f94] v4l2 demux debug: video input 4 (composite) has type: External analog input
    [0x9936f94] v4l2 demux debug: video input 5 (svideo) has type: External analog input
    [0x9936f94] v4l2 demux debug: video input 6 (aux) has type: External analog input
    [0x9936f94] v4l2 demux debug: video standard 0 is: NTSC-M
    [0x9936f94] v4l2 demux debug: video standard 1 is: NTSC-M-JP
    [0x9936f94] v4l2 demux debug: video standard 2 is: NTSC-443
    [0x9936f94] v4l2 demux debug: tuner 0 (tuner) has type: Analog TV, frequency range: 0.0 kHz -> 0.0 kHz
    [0x9936f94] v4l2 demux debug: tuner 0 (tuner) frequency: 271250.0 kHz
    [0x9936f94] v4l2 demux debug: device codec MPEG (MPEG) not supported
    [0x9936f94] v4l2 demux debug: ‘/dev/video0’ is a video device
    [0x9936f94] v4l2 demux debug: Extended control API supported by v4l2 driver

    [0x9936f94] v4l2 demux debug: using streaming i/o (mmap)
    [0x9936f94] v4l2 demux debug: found default width and height of 720×480
    [0x9936f94] v4l2 demux debug: will try to find optimal width and height.
    [0x9936f94] v4l2 demux debug: Found maximum framerate of -1.000000
    [0x9936f94] v4l2 demux warning: Could not find optimal width and height, falling back to driver default.
    [0x9936f94] v4l2 demux debug: Driver requires at most 0 bytes to store a complete image
    [0x9936f94] v4l2 demux debug: Interlacing setting: progressive
    [0x9936f94] v4l2 demux error: device does not support mmap i/o

    which seems to be caused by an error to set mmap buffers.
    Sorry, I’m no v4l expert.

  6. Some more tests and info:
    I’ve learned that v4l2 supports 2 streaming access methods, mmap and userptr.
    vlc lets you choose which one to use, but both result in error when trying to
    access /dev/video0.
    It seems to work by using standard reads (:io=read) but it does not stream.
    I’m lost.

  7. Well, thing is, the driver does not implement streaming (as per v4l2 definition) but it says it does by setting STERAMING capability. STREAMING needs mmap or userptr support,
    none of which is implemented.

    It seems that vlc has some issue if you force it to use io=read (i.e. standard reads) and the combination makes it difficult to get vlc running. But if you do “vlc – </dev/video0" it works.

    I've commented the STREAMING capability in saa7164-encoder.c and now vlc is happy.
    Also added PAL to the list of tvnorms so apps do not get upset, and it seems to hold.
    mmap support seems to be the way to go, but I just don't know yet if this should be user
    selectable or what (# and size of buffers, e.g.) I'm happy for the time being 🙂

  8. I have problems to compile the driver with 2.6.32 x64 :
    /root/saa7164/saa7164-v4l/v4l/tuner-xc2028.c:1251: error: expected ‘)’ before string constant
    In file included from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/byteorder.h:4,
    from include/asm-generic/bitops/le.h:5,
    from include/asm-generic/bitops/ext2-non-atomic.h:4,
    from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/bitops.h:455,
    from include/linux/bitops.h:17,
    from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/cpufeature.h:173,
    from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/processor.h:16,
    from include/linux/prefetch.h:14,
    from include/linux/list.h:6,
    from include/linux/module.h:9,
    from include/linux/firmware.h:4,
    from /root/saa7164/saa7164-v4l/v4l/tuner-xc2028.c:13:
    include/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’:
    include/linux/byteorder/little_endian.h:69: error: implicit declaration of function ‘__swab64p’
    In file included from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/paravirt.h:7,
    from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/irqflags.h:60,
    from include/linux/irqflags.h:57,
    from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/system.h:11,
    from /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/processor.h:17,
    from include/linux/prefetch.h:14,
    from include/linux/list.h:6,
    from include/linux/module.h:9,
    from include/linux/firmware.h:4,
    from /root/saa7164/saa7164-v4l/v4l/tuner-xc2028.c:13:
    /usr/src/linux-headers-2.6.32.6-kvm-amd64/arch/x86/include/asm/pgtable_types.h: In function ‘pgd_flags’:

    An idea ??
    Thk a lot

  9. I have gotten my 2250 up and recording analog. The quality is much better than that of my 1950. Thank you, Steven.

    I do have a question. My hour long recordings are recording correctly, but showing up in MythTV as between 15 and 20 minutes in length. (In VLC or streamed to WMV, they show as an hour in length.) If set to play in MythTV they will play the full hour of content, but skipping forward 30 sec jumps may jump 10+ minutes forward. My inclination is that this is something on the MythTV side of things, but I am asking here on the chance that there is something known, like a build switch, or version of a driver that is already known to need tweaking.

    Either way, thanks for the all the work!

    • Daniel Kristjansson

      This sounds like a MythTV issue with finding the key-frames. A 2 minute sample + a ticket in the MythTV trac should get it fixed (though it may take some time)

  10. First off, big thanks Steven, your work is much appreciated. I have the 2250 up and working in mythtv, but have the same problem as Joe. I’ve noticed that if you pause a currently recording program the second counter showing how long the recording is only increments every 3 – 4 seconds instead of every second. Along with that, skipping forward/back does not seem to work reliably. dmesg shows:

    [87529.087639] No pack at 0x0
    [87529.087642] No pack at 0x800
    [87529.087644] No pack at 0x1000
    [87529.087647] No pack at 0x1800
    [87529.087649] No pack at 0x2000
    [87529.087652] No pack at 0x2800
    [87529.087655] No pack at 0x3000
    [87529.087657] No pack at 0x3800
    [87529.087660] No pack at 0x4000
    [87529.087662] No pack at 0x4800
    [87529.087665] No pack at 0x5000
    [87529.087667] No pack at 0x5800
    [87529.087670] No pack at 0x6000
    [87529.087672] No pack at 0x6800
    [87529.087675] No pack at 0x7000
    [87529.087677] No pack at 0x7800

    This repeats consistantly while either of the analogue inputs are active. I’m not sure if it is a problem with mythtv or the driver/firmware, but I figured I’d mention it here. Thanks again for your hard work Steven, and if there is anything I can do to assist please let me know.

  11. I have a 2250. I can get analog to record on each of the 2 tuners. I can only get digital on the first one. On the second one I get zero byte files. Am I the only one with this problem?

Leave a Reply