PCTV 340e feedback

We received a good bit of feedback in the last 24 hours from users trying out the PCTV 340e driver, and I am happy to say that 100% of it has been positive. There were a few issues with new users not familiar with compiling v4l-dvb from source code, but everybody who has tried it so far has reported success.

That said, I want to take this opportunity to thank a few parties:

  • Lars Forseth, for loaning me a PCTV 340e Solo board for initial testing.
  • Our friends at Xceive for providing support on the xc4000, in addition to providing licensing to freely redistribute the firmware (we will be working on getting that bundled into Ubuntu and other distributions in the coming weeks).
  • PCTV Systems, and in particular Rainer Miethling for providing sample hardware as well as technical information about the PCB layout.
  • Davide Ferri, for providing some code attempting to port the xc5000 driver to work with the xc4000

It’s probably also worth pointing out that this project was not paid for by any of KernelLabs customers (and in fact, KernelLabs actually *spent* money to buy a DVB generator so I could complete the project). These are not trivial projects (this board took about 50 hours to get working). So if you find this work useful, feel free to show your support via Devin’s LinuxTV Support Fund.

Anyway, for those of you who were kind enough to do testing, please keep an eye on the blog over the next couple of weeks, since I will be doing some cleanup and it would be worthwhile for you to try the final tree *before* it goes into the v4l-dvb mainline.

90 thoughts on “PCTV 340e feedback

  1. tried to compile v4l, make config then make at some point following error :

    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/em28xx-core.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/em28xx-input.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/em28xx-vbi.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/et61x251_core.o
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/et61x251_core.c: In function ‘et61x251_ioctl_v4l2’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/et61x251_core.c:2493: warning: the frame size of 1256 bytes is larger than 1024 bytes
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/et61x251_tas5130d1b.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-avc.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-ci.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-dvb.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-fe.o
    CC [M] /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.o
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:21:17: error: dma.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:22:21: error: csr1212.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:23:23: error: highlevel.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:24:19: error: hosts.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:25:22: error: ieee1394.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:26:17: error: iso.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:27:21: error: nodemgr.h: No such file or directory
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:37: warning: ‘struct hpsb_iso’ declared inside parameter list
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:37: warning: its scope is only this definition or declaration, which is probably not what you want
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘rawiso_activity_cb’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:53: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:54: error: implicit declaration of function ‘hpsb_iso_n_ready’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:61: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:62: error: implicit declaration of function ‘dma_region_i’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:62: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:62: error: expected expression before ‘unsigned’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:63: warning: assignment makes pointer from integer without a cast
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:64: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:68: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:82: error: implicit declaration of function ‘hpsb_iso_recv_release_packets’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘node_of’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:87: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:87: warning: type defaults to ‘int’ in declaration of ‘__mptr’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:87: warning: initialization from incompatible pointer type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:87: error: invalid use of undefined type ‘struct unit_directory’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘node_lock’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:92: error: implicit declaration of function ‘hpsb_node_lock’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:92: error: ‘EXTCODE_COMPARE_SWAP’ undeclared (first use in this function)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:92: error: (Each undeclared identifier is reported only once
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:92: error: for each function it appears in.)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:93: error: ‘quadlet_t’ undeclared (first use in this function)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:93: error: expected ‘)’ before ‘arg’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘node_read’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:98: error: implicit declaration of function ‘hpsb_node_read’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘node_write’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:103: error: implicit declaration of function ‘hpsb_node_write’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘start_iso’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:114: error: implicit declaration of function ‘hpsb_iso_recv_init’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:114: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:116: error: ‘HPSB_ISO_DMA_DEFAULT’ undeclared (first use in this function)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:118: warning: assignment makes pointer from integer without a cast
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:125: error: implicit declaration of function ‘hpsb_iso_recv_start’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:128: error: implicit declaration of function ‘hpsb_iso_shutdown’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘stop_iso’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:139: error: implicit declaration of function ‘hpsb_iso_stop’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: At top level:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:154: warning: ‘struct hpsb_host’ declared inside parameter list
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘fcp_request’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:167: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:168: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘node_probe’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:182: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:182: warning: type defaults to ‘int’ in declaration of ‘__mptr’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:182: warning: initialization from incompatible pointer type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:182: error: invalid use of undefined type ‘struct unit_directory’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:187: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:187: error: ‘quadlet_t’ undeclared (first use in this function)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:188: error: implicit declaration of function ‘CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:188: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:188: warning: assignment makes pointer from integer without a cast
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: At top level:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:243: warning: ‘struct unit_directory’ declared inside parameter list
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘node_update’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:245: error: dereferencing pointer to incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: At top level:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:253: error: variable ‘fdtv_driver’ has initializer but incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:254: error: unknown field ‘name’ specified in initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:254: warning: excess elements in struct initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:254: warning: (near initialization for ‘fdtv_driver’)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:255: error: unknown field ‘update’ specified in initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:255: warning: excess elements in struct initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:255: warning: (near initialization for ‘fdtv_driver’)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:256: error: unknown field ‘driver’ specified in initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:256: error: extra brace group at end of initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:256: error: (near initialization for ‘fdtv_driver’)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:259: warning: excess elements in struct initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:259: warning: (near initialization for ‘fdtv_driver’)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:262: error: variable ‘fdtv_highlevel’ has initializer but incomplete type
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:263: error: unknown field ‘name’ specified in initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:263: warning: excess elements in struct initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:263: warning: (near initialization for ‘fdtv_highlevel’)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:264: error: unknown field ‘fcp_request’ specified in initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:264: warning: excess elements in struct initializer
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:264: warning: (near initialization for ‘fdtv_highlevel’)
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘fdtv_1394_init’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:271: error: implicit declaration of function ‘hpsb_register_highlevel’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:272: error: invalid use of undefined type ‘struct hpsb_protocol_driver’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:273: error: implicit declaration of function ‘hpsb_register_protocol’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:276: error: implicit declaration of function ‘hpsb_unregister_highlevel’
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c: In function ‘fdtv_1394_exit’:
    /home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.c:283: error: implicit declaration of function ‘hpsb_unregister_protocol’
    make[3]: *** [/home/katja/pctv-340e-2-927fd2a915c4/v4l/firedtv-1394.o] Error 1
    make[2]: *** [_module_/home/katja/pctv-340e-2-927fd2a915c4/v4l] Error 2
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.31-16-generic’
    make[1]: *** [default] Fehler 2
    make[1]: Verlasse Verzeichnis ‘/home/katja/pctv-340e-2-927fd2a915c4/v4l’
    make: *** [all] Fehler 2
    katja@arsch:~/pctv-340e-2-927fd2a915c4$

    any idea what might be wrong?

    • Hello katja,

      You’re on Ubuntu presumably, which has a known problem with the firedtv driver (this occurs with the mainline v4l-dvb driver as well).

      Open “v4l/.config” and change the firedtv driver from “=m” to “=n” and then recompile.

      Devin

  2. Hi,

    I have problems using dvbsnoop with my 340e PCTV device. I am able to watch digital TV using Kaffeine and do channels scanning using w_scan, but dvbsnoop seems to be not working.
    Here is output of “dvbsnoop -s feinfo” command:
    ———————————————————
    FrontEnd Info…
    ———————————————————

    Device: /dev/dvb/adapter0/frontend0

    Basic capabilities:
    Name: “DiBcom 7000PC”
    Frontend-type: OFDM (DVB-T)
    Frequency (min): 44250.000 kHz
    Frequency (max): 867250.000 kHz
    Frequency stepsiz: 62.500 kHz
    Frequency tolerance: 0.000 kHz
    Symbol rate (min): 0.000000 MSym/s
    Symbol rate (max): 0.000000 MSym/s
    Symbol rate tolerance: 0 ppm
    Notifier delay: 0 ms
    Frontend capabilities:
    auto inversion
    FEC 1/2
    FEC 2/3
    FEC 3/4
    FEC 5/6
    FEC 7/8
    FEC AUTO
    QPSK
    QAM 16
    QAM 64
    QAM AUTO
    auto transmission mode’
    auto guard interval
    auto hierarchy

    Current parameters:
    Frequency: 770000.000 kHz
    Inversion: AUTO
    Bandwidth: 8 MHz
    Stream code rate (hi prio): FEC 3/4
    Stream code rate (lo prio): FEC 1/2
    Modulation: QAM 64
    Transmission mode: 8k mode
    Guard interval: 1/8
    Hierarchy: none

    Here is example output of “dvbsnoop -s signal -pd 9 -n 10 -timeout 100” command:
    DEMUX : /dev/dvb/adapter0/demux0
    DVR : /dev/dvb/adapter0/dvr0
    FRONTEND: /dev/dvb/adapter0/frontend0

    ———————————————————
    Transponder/Frequency signal strength statistics…
    max cycle count: 10
    Capabilities: BER: 1 SNR: 1 SIG: 1 STAT: 1 UBLK: 1
    ———————————————————
    cycle: 1 d_time: 0.001 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 2 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 3 d_time: 0.110 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 4 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 5 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 6 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 7 d_time: 0.115 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 8 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 9 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 10 d_time: 0.111 s Sig: 32417 SNR: 185 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]

    Karol

      • Hello Karol,

        I’m actually not familiar with dvbsnoop. But from my experience with other tools such as femon, did you remember to use the “-r” argument when you ran “tzap”?

        I’ll have to look closer at dvbsnoop before I could offer more advice. Frankly I cannot see how this could possibly be specific to the 340e, since it is using the dib7000 demod frontend driver which has been around for years.

        Devin

    • Hi Karol, I have Kaffeine and w_scan installed. Could you please tell me how you make the Pinnacle 340 e SE device working for digital TV? I would appreciate it very much because the internet connection is not good enough to watch Euro Cup 2012. Thank you!! (I am using Ubuntu btw…)

      • Devin Heitmueller

        Hello akinsoysal,

        General end user questions about applications are better directed to the #linuxtv IRC channel on freenode, or one of the many forums that specializes in helping end users.

        Cheers,

        Devin

  3. Hello everyone,
    I’m using Mandriva 2010.0 and under a 2.6.31.6-desktop586-1mnb kernel with the kernel source installed, and I cannot compile v4l for the following reason :
    ~/Software_Sources/pctv-340e-2/v4l/dvbdev.c:516: error: ‘struct class’ has no member named ‘nodename’
    I have read some pages ago that compiling is impossible on 2.6.32.x kernels, therefore I find it incredible that it does not compile with all necessary requirements satisfied…
    Do you have any idea?
    PS : I’m a French student, so I may have some complications in order to express myself…

    • Hi Cocodidou,

      This is a known issue because the pctv-340e-2 tree is based off a v4l-dvb tree that is several months old. Your best bet is to wait a few days until I resync against the trunk, or look on the other pctv 340e thread where a user describes what he had to do to patch the source to work around the issue.

      Cheers,

      Devin

      • Hi,

        Just a quick question. Maybe You know a simple way to feed v4l with recorded MPEG TS? I am thinking of recording TS and putting it back to v4l via some virtual device maybe.

        Karol

      • Hi Devin,
        Thanks a lot for your so quick reply. As I have not found the comment where someone fixes the issue by patching the code, I am going to wait for the new source with a newer v4l-dvb tree to be released.
        Thanks again,
        Cocodidou

      • Hi!

        CC [M] /usr/src/pctv-340e-2-927fd2a915c4/v4l/dvbdev.o
        /usr/src/pctv-340e-2-927fd2a915c4/v4l/dvbdev.c: In function ‘init_dvbdev’:
        /usr/src/pctv-340e-2-927fd2a915c4/v4l/dvbdev.c:516: error: ‘struct class’ has no member named ‘nodename’
        make[3]: *** [/usr/src/pctv-340e-2-927fd2a915c4/v4l/dvbdev.o] Error 1
        make[2]: *** [_module_/usr/src/pctv-340e-2-927fd2a915c4/v4l] Error 2
        make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic’

        Where can i fix this issue?

        Thanks

    • The analog support for the 340e will not be done in the foreseeable future. The issue is the dvb-usb driver framework lacks any analog support, and I cannot justify the thousands of dollars in man-hours that would be required to added the necessary infrastructure. This problem effects all products using the dvb-usb framework and is not specific to the 340e.

      The 340e was a “side project” I did in my free time that was not for any commercial customer – nobody paid for this work. And after spending 50-60 hours on it, I don’t really have the personal interest in analog to spend the additional 100 hours that would be required to make it work.

      I wish I had a better answer for you.

      Devin

  4. Hi Devin,
    first let me thank you for your great work. It’s really fantastic reading how you can make these things.
    This is my experience, pls feel free to cut anything you find o.t. or not interesting for the blog:

    I’m in Italy and working with a (not really clean anymore ) CRUX 2.5 distribution – kernel 2.6.31.5.
    – No problem in compiling/installing the pack 340e-2
    – when I connect my device, I have a failure, then after disconnecting/connecting for 2 or 3 times everything goes perfect.

    here’s the fail:

    Jan 12 09:32:52 atom kernel: usb 1-3.4: new high speed USB device using ehci_hcd and address 9
    Jan 12 09:32:52 atom kernel: usb 1-3.4: configuration #1 chosen from 1 choice
    Jan 12 09:32:52 atom kernel: dvb-usb: found a ‘Pinnacle PCTV 340e HD Pro USB Stick’ in cold state, will try to load a firmware
    Jan 12 09:32:52 atom kernel: usb 1-3.4: firmware: requesting dvb-usb-dib0700-1.20.fw
    Jan 12 09:32:52 atom kernel: dvb-usb: downloading firmware from file ‘dvb-usb-dib0700-1.20.fw’
    Jan 12 09:32:52 atom kernel: dib0700: firmware started successfully.
    Jan 12 09:32:53 atom kernel: dvb-usb: found a ‘Pinnacle PCTV 340e HD Pro USB Stick’ in warm state.
    Jan 12 09:32:53 atom kernel: dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
    Jan 12 09:32:53 atom kernel: DVB: registering new adapter (Pinnacle PCTV 340e HD Pro USB Stick)
    Jan 12 09:32:54 atom kernel: DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)…
    Jan 12 09:32:54 atom kernel: xc4000 2-0061: creating new instance
    Jan 12 09:32:54 atom kernel: xc4000: I2C read failed
    Jan 12 09:32:54 atom kernel: xc4000 2-0061: destroying instance
    Jan 12 09:32:54 atom kernel: input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.4/input/input7
    Jan 12 09:32:54 atom kernel: dvb-usb: schedule remote query interval to 50 msecs.
    Jan 12 09:32:54 atom kernel: dvb-usb: Pinnacle PCTV 340e HD Pro USB Stick successfully initialized and connected.

    after the various connect/disconnect:
    …..
    …..
    Jan 12 09:33:18 atom kernel: xc4000 2-0061: creating new instance
    Jan 12 09:33:18 atom kernel: xc4000: Successfully identified at address 0x61
    Jan 12 09:33:18 atom kernel: xc4000: Firmware has not been loaded previously
    Jan 12 09:33:18 atom kernel: Reading firmware dvb-fe-xc4000-1.4.1.fw
    Jan 12 09:33:18 atom kernel: usb 1-3.4: firmware: requesting dvb-fe-xc4000-1.4.1.fw
    Jan 12 09:33:22 atom kernel: xc4000 2-0061: Loading SCODE for type=HAS_IF_5400 (40000000), id 0000000000000000.
    Jan 12 09:33:22 atom kernel: input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.4/input/input10
    Jan 12 09:33:22 atom kernel: dvb-usb: schedule remote query interval to 50 msecs.
    Jan 12 09:33:22 atom kernel: dvb-usb: Pinnacle PCTV 340e HD Pro USB Stick successfully initialized and connected.

    and then works great!

    – I like very much mplayer, so I looked for w_scan to create a channels.conf.
    the compilation of w_scan failed talking about a dvb_api 5.1 problem; I copied all from pctv-340e-2-927fd2a915c4/linux/include/linux/dvb/* to /usr/include/linux/dvb/ and the compiling problems went away.

    – w_scan -c it -X > channels.conf
    generated a perfect conf file for my mplayer; after mv channels.conf /usr/etc/mplayer/ I then started my mplayer with mplayer -cache 1024 dvb:// and with and I can scroll all channels!!!

    – I can record from my 340e simply with:

    mplayer dvb://”channel name” -dumpstream -dumpfile record_1.ts
    or
    mencoder dvb://”channel name” -of mpeg -ovc copy -oac copy -o record_1.ts
    (the channel name is at the beginning of every line in channels.conf)

    – usually mplayer start opening a little bit wth audio/video out of sync, but after a couple of seconds everything run perfect.

    I’m starting testing vlc, but it’s not so happy to receive signal from my device.
    I also tried to pipe a stream from mplayer to vlc: I can see something, but still problems. vlc logs various things about incorrect video format etc, if it’s useful for you I can send it.

    Many thanks again for our great work. I was a frustrated owner of this device, now I’m an happy user 🙂

    Guido

  5. Hi, i try to use my Pinnacle 340e in opensuse… I think the installation process work fine:

    dmesg | grep dvb
    [ 164.697050] dvb-usb: found a ‘Pinnacle PCTV Hybrid Stick Solo’ in cold state, will try to load a firmware
    [ 164.697064] usb 1-7: firmware: requesting dvb-usb-dib0700-1.20.fw
    [ 164.739164] dvb-usb: downloading firmware from file ‘dvb-usb-dib0700-1.20.fw’
    [ 165.452034] dvb-usb: found a ‘Pinnacle PCTV Hybrid Stick Solo’ in warm state.
    [ 165.452125] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
    [ 166.312248] Reading firmware dvb-fe-xc4000-1.4.1.fw
    [ 166.312259] usb 1-7: firmware: requesting dvb-fe-xc4000-1.4.1.fw
    [ 170.566275] dvb-usb: schedule remote query interval to 50 msecs.
    [ 170.566286] dvb-usb: Pinnacle PCTV Hybrid Stick Solo successfully initialized and connected.
    [ 170.569979] usbcore: registered new interface driver dvb_usb_dib0700

    but if i use w_scan i have tis log:
    crismon@linux-gf82:~/Build/w_scan-20091230> ./w_scan -ft -c IT -X >> channels.conf
    w_scan version 20091230 (compiled for DVB API 5.0)
    using settings for ITALY
    DVB aerial
    DVB-T Europe
    frontend_type DVB-T, channellist 4
    output format czap/tzap/szap/xine
    Info: using DVB adapter auto detection.
    /dev/dvb/adapter0/frontend0 -> DVB-T “DiBcom 7000PC”: good 🙂
    Using DVB-T frontend (adapter /dev/dvb/adapter0/frontend0)
    -_-_-_-_ Getting frontend capabilities-_-_-_-_
    Using DVB API 5.1
    frontend DiBcom 7000PC supports
    INVERSION_AUTO
    QAM_AUTO
    TRANSMISSION_MODE_AUTO
    GUARD_INTERVAL_AUTO
    HIERARCHY_AUTO
    FEC_AUTO
    -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
    Scanning 7MHz frequencies…
    177500: (time: 00:00)
    184500: (time: 00:04)
    191500: (time: 00:07)
    198500: (time: 00:10)
    205500: (time: 00:13)
    212500: (time: 00:16)
    219500: (time: 00:19)
    226500: (time: 00:22)
    Scanning 8MHz frequencies…
    474000: (time: 00:25) (time: 00:27) signal ok:
    QAM_AUTO f = 474000 kHz I999B8C999D999T999G999Y999
    Info: NIT(actual) filter timeout
    482000: (time: 00:42)
    490000: (time: 00:45)
    498000: (time: 00:48)
    506000: (time: 00:51)
    514000: (time: 00:54)
    522000: (time: 00:57)
    530000: (time: 01:00) (time: 01:03) signal ok:
    QAM_AUTO f = 530000 kHz I999B8C999D999T999G999Y999
    Info: NIT(actual) filter timeout
    538000: (time: 01:17)
    546000: (time: 01:21)
    554000: (time: 01:24)
    562000: (time: 01:27) (time: 01:30) signal ok:
    QAM_AUTO f = 562000 kHz I999B8C999D999T999G999Y999
    Info: NIT(actual) filter timeout
    570000: (time: 01:44)
    578000: (time: 01:47)
    586000: (time: 01:51)
    594000: (time: 01:54)
    602000: (time: 01:57)
    610000: (time: 02:00)
    618000: (time: 02:04)
    626000: (time: 02:07)
    634000: (time: 02:10)
    642000: (time: 02:13)
    650000: (time: 02:16)
    658000: (time: 02:19)
    666000: (time: 02:22)
    674000: (time: 02:25)
    682000: (time: 02:28)
    690000: (time: 02:31)
    698000: (time: 02:34)
    706000: (time: 02:37)
    714000: (time: 02:41)

    722000: (time: 02:44)
    730000: (time: 02:47) (time: 02:49) signal ok:
    QAM_AUTO f = 730000 kHz I999B8C999D999T999G999Y999
    Info: NIT(actual) filter timeout
    738000: (time: 03:05)
    746000: (time: 03:08)
    754000: (time: 03:11)
    762000: (time: 03:14)
    770000: (time: 03:17)
    778000: (time: 03:20)
    786000: (time: 03:23)
    794000: (time: 03:26)
    802000: (time: 03:29)
    810000: (time: 03:33)
    818000: (time: 03:36)
    826000: (time: 03:39)
    834000: (time: 03:42)
    842000: (time: 03:45)
    850000: (time: 03:48)
    858000: (time: 03:51)
    tune to: QAM_AUTO f = 474000 kHz I999B8C999D999T999G999Y999
    (time: 03:54) Info: PAT filter timeout
    Info: SDT(actual) filter timeout
    Info: NIT(actual) filter timeout
    tune to: QAM_AUTO f = 530000 kHz I999B8C999D999T999G999Y999
    (time: 04:09) Info: PAT filter timeout
    Info: SDT(actual) filter timeout
    Info: NIT(actual) filter timeout
    tune to: QAM_AUTO f = 562000 kHz I999B8C999D999T999G999Y999
    (time: 04:23) Info: PAT filter timeout
    Info: SDT(actual) filter timeout
    Info: NIT(actual) filter timeout
    tune to: QAM_AUTO f = 730000 kHz I999B8C999D999T999G999Y999
    (time: 04:38) ———-no signal———-
    tune to: QAM_AUTO f = 730000 kHz I999B8C999D999T999G999Y999 (no signal)
    (time: 04:41) Info: PAT filter timeout
    Info: SDT(actual) filter timeout
    Info: NIT(actual) filter timeout
    dumping lists (0 services)
    Done.

    Where is the problem?

    • Hello Ander,

      It looks like it is finding some signals, but then those signals aren’t providing any actual MPEG data. Could you please try the regular “scan” tool as opposed to “w_scan” so we can see if this behavior is application specific?

      Devin

          • I try with this command:

            scan -x0 -t1 -s1 /usr/share/dvb/dvb-t/it-Conero | tee /home/crismon/Scrivania/channels.conf

            The result is:
            scanning /usr/share/dvb/dvb-t/it-Conero
            using ‘/dev/dvb/adapter0/frontend0’ and ‘/dev/dvb/adapter0/demux0’
            initial transponder 706000000 0 2 1 3 1 0 0
            initial transponder 674000000 0 2 1 3 1 0 0
            initial transponder 474000000 0 2 1 3 1 0 0
            >>> tune to: 706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE
            WARNING: >>> tuning failed!!!
            >>> tune to: 706000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE (tuning failed)
            WARNING: >>> tuning failed!!!
            >>> tune to: 674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE
            WARNING: >>> tuning failed!!!
            >>> tune to: 674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE (tuning failed)
            WARNING: >>> tuning failed!!!
            >>> tune to: 474000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE
            WARNING: filter timeout pid 0x0011
            WARNING: filter timeout pid 0x0000
            WARNING: filter timeout pid 0x0010
            dumping lists (0 services)
            Done.

          • Could you please also provide the dmesg output after running this scan? It might be better to email it to me than to post it here. dheitmueller at kernellabs.com

            Thanks,

            Devin

    • Hello Ander,

      Nobody else has reported problems with sound with the 340e. One thing to bear in mind is that unlike analog cards, with DVB-T cards the device just takes the MPEG stream and forwards it to userspace. Neither the driver nor the hardware have any knowledge of which packets contain audio versus which contain video.

      You may wish to try seeing if audio is working at all from within Kaffeine (perhaps by loading a DVD). Also, you should see if the problem is specific to one frequency or whether none of the channels work (since it’s possible that the frequency table you provided during scanning has an error).

      Devin

    • Hi Ander,
      You might have no sound with Kaffeine watching TV if channels are being broadcasted with H.264/AAC (e-AC3) encoding and Kaffeine does not support e-AC3 at all. I did not find any workaround on Kaffeine about that, but I have patched my copy of FFMPEG with spectral extension support and now all of my channels work with VLC (TF1 HD, France 2 HD and M6HD especially, therefore I can still watch SD channels with Kaffeine).
      Hoping I did help you
      Cocodidou

  6. Devin,

    Back to DVBSnoop:

    I found similar as Karol, in depth either I diconnected my antenna or connected I get
    (approx) Sig ~ 33500 SNR ~ 230 from the
    dvbsnoop -s singal
    command.

    Since no (or only 1-2%) difference in the measured values on 17 dbI reception and 0 dBi reception I guess does the driver provides good value to DVB API from where the dvbsnoop read the values?
    I found similar with tzap.

    Do you have any solution for this? Or any idea how to measure SNR and Signal Strength from command line and build percentage statistics from them?

    By the way, I don’t know how to interpret the values. What is the range of SNR and Signal Strength values?

    Example output:
    (Antenna is connected):

    root@torch:/srv/homes/beaver# dvbsnoop -s signal -pd 9 -n 3
    dvbsnoop V1.4.50 — http://dvbsnoop.sourceforge.net/
    DEMUX : /dev/dvb/adapter0/demux0
    DVR : /dev/dvb/adapter0/dvr0
    FRONTEND: /dev/dvb/adapter0/frontend0

    ———————————————————
    Transponder/Frequency signal strength statistics…
    max cycle count: 3
    Capabilities: BER: 1 SNR: 1 SIG: 1 STAT: 1 UBLK: 1
    ———————————————————
    cycle: 1 d_time: 0.001 s Sig: 33554 SNR: 228 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 2 d_time: 0.012 s Sig: 33537 SNR: 214 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 3 d_time: 0.011 s Sig: 33571 SNR: 226 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]

    (With antenna disconnected):
    ycle: 1776 d_time: 0.012 s Sig: 33269 SNR: 230 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]
    cycle: 1777 d_time: 0.011 s Sig: 33306 SNR: 230 BER: 0 UBLK: 0 Stat: 0x1f [SIG CARR VIT SYNC LOCK ]

    So no significant changes..weird.

    • Hello Szabolcs,

      The units for the SNR and signal statistics vary with every demodulator. This is different applications work with different tuners (because typically the application developer makes it work for whatever tuner he happens to have).

      That said, i actually don’t know what the units are for the dib7700 used in the 340e. You may wish to ask the linux-media mailing list, as somebody there probably knows.

      Devin

  7. Hi,
    I would like to give a positive feedback.

    I have got a 340e yesterday, and I successfully made it works with a “patched” Debian Lenny.
    I had to change the Kernel with 2.6.31.13 (not latest version of kernel) which is then patched by KernelLabs modules (if I correctyl understood what I did :-o)
    I may have further problems, but I can watch TV under Linux !
    That’s great!

  8. Any update on 2.6.32+ compatibility?
    Ubuntu (and Mythbuntu) 10.04 will be released in 2 weeks, it’s using 2.6.32 kernel.
    It would be nice have this driver able to build under new Mythbuntu.

    I know you are busy, and this a hobby project for you, I only guess…

    • Devin Heitmueller

      Hello Szabolcs,

      I’ve been pretty buried in another project, and am not sure when I will be able to find the time to rebase the tree. If you cannot do the rebase locally in your own environment, then your only option at this point would be to not upgrade to Mythbuntu 10.04. For what it’s worth, there are no new MythTV features in 10.04 (they use the same version of MythTV), so you would not see any benefits in upgrading (aside from doing it “just to be running the latest software”).

      Devin

    • Devin Heitmueller

      Hello memyselfandi,

      The only challenge really is the tree needs to be rebased against the current mainline v4l-dvb tree. It’s really just a matter of me finding three or four hours to do the work required.

      Devin

      • I got the 340e running using kernel 2.6.32-22 (ubuntu 10.04). The only real change was the name of the array with ir key codes. The remaining conflicts are trivial to fix. I hope the other changes in mainline don’t affect the 340e code in a bad way (but everything seems to work alright).
        Thanks a lot for the driver, it works like a charm here in belgium!

          • Just an ‘hg pull -u http://linuxtv.org/hg/v4l-dvb/‘, ‘hg merge’, resolve the conflicts (about 5 or 6 files) and do the regular ‘make && make install’. If you can’t do that, you will have to wait for Devin to update his branch. Several versions of this branch floating around online wouldn’t do much good, imho 🙂

          • The compilation is good, no error, but tv doesn´t work. Ubuntu 10.04, and kaffeine 1.0, from Spain. Dmesg doesn´t recognize pinnacle pctv.

            Thanks.

          • Thank for you help, but if I use your solution, when I do “make”, I have the following error:

            make -C /home/…./pctv-340e/v4l
            make[1]: se ingresa al directorio `/home/…./pctv-340e/v4l’
            perl scripts/make_config_compat.pl /lib/modules/2.6.31.13/build ./.myconfig ./config-compat.h
            File not found: /lib/modules/2.6.31.13/build/include/linux/netdevice.h at scripts/make_config_compat.pl line 15.
            make[1]: *** [config-compat.h] Error 2
            make[1]: se sale del directorio `/home/…./pctv-340e/v4l’
            make: *** [all] Error 2

          • Mmh… Try to make clean before making… 2.6.31.13 is the kernel I compiled v4l on before packaging the tarball.
            Have you solved the problem this time?

          • Mmh… Try to make clean before making… 2.6.31.13 is the kernel I compiled v4l on before packaging the tarball.
            (Note that I have just cleaned the tarball when I wrote this message and re uploaded it, so you can try to re download it and compile it again it should work 🙂 )
            Have you solved the problem this time?

          • It is working¡. I have done that:

            Plug the device out.

            – get “http://kernellabs.com/hg/~dheitmueller/pctv-340e-2-927fd2a915c4.tar.gz”
            – unpack
            – change the line “#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)” to “#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 31)” in the following files: dabusb.c, dvbdev.c

            – add the line “#include ” in the following files: dvb_demux.c, dvb_net.c, cpia.c, meye.c, videobuf-core.c, dmxdev.c

            – Change in the files “.config”:
            CONFIG_DVB_FIREDTV=n
            CONFIG_VIDEOBUF_DMA_SG=N

            -make clean
            -make
            -sudo make install

            -Get the firmware “http://kernellabs.com/firmware/xc4000/dvb-fe-xc4000-1.4.1.fw” and copy to /lib/firmware

            -sudo tail -f /var/log/messages

            wait and plug the device in

            wait

            restart

            Thanks to all and to Frank Duigman

          • Sorry

            – add the line “#include ” in the following files: dvb_demux.c, dvb_net.c, cpia.c, meye.c, videobuf-core.c, dmxdev.c

          • Sorry but There has been a mistake of written to posted in the comment.

            add the line “#include linux/sched.h” in the following files: dvb_demux.c, dvb_net.c, cpia.c, meye.c, videobuf-core.c, dmxdev.c

  9. Hello Devin,
    I merged the PCTV 340e code in a recent V4L DVB tree and with a patch found here
    http://istvanv.users.sourceforge.net/v4l/xc4000.html
    In that tree there is analog support for the xc4000 tuner and a Conexant cx25840/1/2/3 video analog to digital converter.
    I would like to link these elements together in order to have support for the S Video and composite inputs which would be very useful for me.
    I think that an xc4000 reset with certain init params would do the trick but I don’t know what param to pass to the xc4000 tuner to tune analog instead of digital and get the input from the Conexant cx25843 (in the dib0700_devices.c file, I will remove the line that shuts the analog DAC down if we go analog, otherwise let it).
    Any idea of what I could do?
    Thanks by advance
    Cocodidou

    • If someone is interested, I can post here a TGZ I have made which contains a working v4l dvb tree which compiles without bad complains from the compiler (only some array size assignements) and contains 340e/340eSE support:
      http://corentin.ferry.free.fr/pctv-340e.tar.gz
      Here’s the firmware:
      http://istvanv.users.sourceforge.net/v4l/xc4000-1.4.fw
      Rename it to “xc4000.fw” and place it in the /lib/firmware directory.
      I compiled v4l under 2.6.33.2 and there were no problems.
      TV works!
      Hoping I helped someone…

      • Hi,
        I compiled without problem with you tarbar, but tv doesnt work, dmesg show that error.

        dvb_usb: disagrees about version of symbol dvb_dmxdev_init
        [ 13.518038] dvb_usb: Unknown symbol dvb_dmxdev_init
        [ 13.518472] dvb_usb: disagrees about version of symbol dvb_register_adapter
        [ 13.518475] dvb_usb: Unknown symbol dvb_register_adapter
        [ 13.518924] dvb_usb: disagrees about version of symbol dvb_dmx_swfilter_204
        [ 13.518926] dvb_usb: Unknown symbol dvb_dmx_swfilter_204
        [ 13.519011] dvb_usb: disagrees about version of symbol dvb_dmx_release
        [ 13.519014] dvb_usb: Unknown symbol dvb_dmx_release
        [ 13.519199] dvb_usb: disagrees about version of symbol dvb_net_init
        [ 13.519201] dvb_usb: Unknown symbol dvb_net_init
        [ 13.519286] dvb_usb: disagrees about version of symbol dvb_dmx_swfilter
        [ 13.519288] dvb_usb: Unknown symbol dvb_dmx_swfilter
        [ 13.519390] dvb_usb: disagrees about version of symbol dvb_dmxdev_release
        [ 13.519392] dvb_usb: Unknown symbol dvb_dmxdev_release
        [ 13.519542] dvb_usb: disagrees about version of symbol dvb_frontend_detach
        [ 13.519545] dvb_usb: Unknown symbol dvb_frontend_detach
        [ 13.519668] dvb_usb: disagrees about version of symbol dvb_net_release
        [ 13.519671] dvb_usb: Unknown symbol dvb_net_release
        [ 13.519778] dvb_usb: disagrees about version of symbol dvb_unregister_frontend
        [ 13.519781] dvb_usb: Unknown symbol dvb_unregister_frontend
        [ 13.520073] dvb_usb: disagrees about version of symbol dvb_register_frontend
        [ 13.520077] dvb_usb: Unknown symbol dvb_register_frontend
        [ 13.520196] dvb_usb: disagrees about version of symbol dvb_unregister_adapter
        [ 13.520199] dvb_usb: Unknown symbol dvb_unregister_adapter
        [ 13.520283] dvb_usb: disagrees about version of symbol dvb_dmx_init

        Thank you

        • Did you install the right firmware? Did the installation complete successfully? Because there is a module missing. Try to make clean, delete the /v4l/.version file, then make, make install and copy the firmware to the /lib/firmware directory.

          Because here the symbol version seems to be the cause of the problem, the only way I see yet to fix it is to reinstall the module (this is what I am telling you how to do just before).

          • I install the right firmware, xc4000.fw, The compilation and installation complete successfully. I make clean, delete the /v4l/.version file, change firedtv to “n” in /v4l/.config, then make, make install and copy the firmware to the /lib/firmware directory.

            But TV doesnt work, and dmesg show the error before comment.

          • What other versions of dvb_usb did you install? What is your kernel?
            Because if nothing works with my tarball your solution may be better for you, do what you have done previsouly again and enjoy TV… Don’t forget you have to “make install” the tarball and reboot the computer… And the Module.symvers file might be faulty here because it can indicate presence of symbols which don’t exist. I had problems with the kernel provided by Mandriva speaking about the 340e, so I compiled my own kernel (and it is still working). You can otherwise just reinstall your kernel…
            Linux provides a Module.symvers file upon kernel modules compilation but it can be deleted and force you to recompile your kernel, eg. VirtualBox installer deleted mine. The fix I found for this is to remove the Module.symvers file from MRPROPER_FILES.

          • I use dvb-usb-dib0700-1.20, xc4000.fw and dvb-fe-xc4000.1.4.1.fw . My compilation works, but the problem is that I have another analogic tv card, avertv 203, that I used to watch through compostive imput, a signal of tv satelite from a decoder I have in other room.

            When I used my compilation, Pctv340e work but avertv doesnt work, I watch dvb-t.
            When I used your compilation, avertv 203 video composite work, but pctv340 doesnt work, I watch dvb-s through video composite.

            I have to do “sudo make install” and restart each time, to watch dvb-t or composite (dvb-s).

          • Thank you very much Cocodidou, the problem was the kernell, I reinstall and it work fine. I watch both tvs.

            Thank for your dedication.

  10. I confirm Cocodidou’s tarball works.
    http://www.kernellabs.com/blog/?p=1279#comment-1480
    TV works including scanning, tested on Kubuntu 10.04 + Kaffeine with both stock kernel and 2.6.35rc1 as well as on Ubuntu 9.10 + MythTV on a 2.6.34rc2.
    The trick was to delete /v4l/.version which persists even after a make clean, change firedtv to “n” in /v4l/.config and copy firmware as /lib/firmware/xc4000.fw
    Thanks to all! Just in time for the world cup 😉

    • The World Cup? I won’t turn the sound on unless Vuvuzelas have been banned from stadiums. However thanks for having tested my tarball, I’ve done a Mr. Proper on it, cleaned the remaining files and when I will be able to bind sockets back, I’ll upload the tar again.
      Thanks again (and don’t begin here an endless discussion on vuvuzelas I think this is not the right place)
      Cocodidou

      • i am using vlc to view the world cup and i think there is an ption to ban from your self the vouvouzelas 🙂

        start the vlc with this command
        vlc –playlist-tree channels.conf
        and open effects and filters under interface and you can use the equalizer to shutdown the Hz that the vouvouzelas sound use , i think is the 310 hz 🙂

    • Unfortunately i can’t fully subscribe to that. Using kubuntu 10.04, kernel 2.6.32-24. I googled a lot on this, tried so many versions of tarballs and firmwares, but i can’t seem to get xc4000 loading properly at startup (although plugging out and in does the trick, but not for a mythbox hidden somewhere).

      dmesg persists on showing the follwing output after reboot:
      [ 18.531851] dib0700: loaded with support for 15 different device-types
      [ 18.532114] dvb-usb: found a ‘Pinnacle PCTV 340e HD Pro USB Stick’ in warm state.
      [ 18.532178] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
      [ 18.532396] DVB: registering new adapter (Pinnacle PCTV 340e HD Pro USB Stick)

      [ 19.341462] DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)…
      [ 19.362196] xc4000 2-0061: creating new instance
      [ 19.363836] xc4000: I2C read failed
      [ 19.363840] xc4000 2-0061: destroying instance
      [ 19.364020] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb2/2-1/input/input6
      [ 19.364089] dvb-usb: schedule remote query interval to 50 msecs.
      [ 19.364093] dvb-usb: Pinnacle PCTV 340e HD Pro USB Stick successfully initialized and connected.
      [ 19.364584] dib0700: rc submit urb failed
      [ 19.364586]
      [ 19.364668] usbcore: registered new interface driver dvb_usb_dib0700

      It would be nice if someone could stab me into the right direction. Another thing is, i’m quite sure with the multitude of xc4000 patches spread around in a couple of (really long) threads (or comments on it), it would be nice to state where the newest patch resides and a little howto. http://istvanv.users.sourceforge.net/v4l/xc4000.html is such a site, but it’s not clear where developement is going on and where not, which versions are the newest for which purposes.

      Thanks in advance

      • Phil, I actually had the same behavior, i.e. it worked only when plugging the device, not at start-up with device plugged in.
        I eventually purchased Dvico Dual Digital PCI in my Mythbox because of this and didn’t use the 340e since June.

  11. PCTV 340e works fine in fedora 12_64 with kernel PCTV 340e .

    i used your two firmwares ( xc4000 , dvb-usb-dib0700-1.20 ) and i compiled the Cocodidou’s version of v4l with menuconfig and delete the fireTV module.

    except mpeg4 ( 8hz if i understood correct ) ,i can also see the mpeg2 channels ( 7hz ( we have in greece 4 channels from 2006 that they broadcast in mpeg2 format and i can see in one of them the World Cup 🙂 )
    also ,i have collected some dsmeg with bugs after usage of different apps ( until now i am only using vlc for see the tv channels and ne-tv to record series )

    tell me if you need my dmesgs to mail you them . thanks a lot for your effort to make this card work in linux.

  12. Hello again Devin,
    I have another question about the 340e board. As analog broadcasts will stop in my région soon, I’ll no longer use the analog tuner (I have already made the switch to DVB-T TV). Therefore, I have a VCR with old holidays cassettes I have to digitalize with the 340e Composite input. The problem is, does the 340e use the analog tuner to make the AV inputs work? How can I use them?
    Thanks by advance
    Cocodidou

    • Devin Heitmueller

      Hello Cocodidou,

      In order to get analog support working with that stick, the enitre dvb-usb framework would need to be extended to support analog, something which we cannot justify the huge amount of work and expense to do (around 100 hours of development).

      Devin

      • Gloups… 100 hours is a lot of time. But what I’ll do is to use the existing Conexant driver (the right driver is already in the v4l tree) and link it to the dib0700 driver (like it is done for the xc4000). Still, like in Windows, I’ll have to shut the tuner down in order to switch between AV and digital RF tuning (and when nothing is in use if possible). I’ll think myself about that the next few days.
        I don’t hink this is a good idea to extend the dvb-usb framework to analog as it is DVB (so Digital, not Analog) and as you said it would require a lot of work.
        Thanks
        Cocodidou

        • Devin Heitmueller

          Hello Cocodidou,

          The problem is not the Conexant driver; of course I would reuse the existing cx25843 driver. The issue is the dib0700 driver, and how there’s currently no V4L infrastructure at all to support it (both in terms of handling the ioctls and processing the USB data stream).

          And in this context when I say “dvb-usb”, I don’t mean the DVB framework in general. “dvb-usb” is a common driver which is designed to support a variety of different USB bridges, including the dib0700 found in the 340e.

          Devin

          • Hello Devin,
            Of course I have seen the problem. What I’m currently trying is to merge the code from the dib0700 driver to the cx25843 driver by including some parts of the dib0700 driver (where the 340e is) into the cx25843 driver. This is complicated, I think it won’t succeed but still I would have tried.

            Why don’t PCTV Systems, as some others manufacturers do, develop open-source drivers? Once there is a patent on a product you can develop open-source drivers for it if you want with no risk of being copied by the concurrency.
            Now that I’m on holidays (since 2 weeks now!!!) I have the time to spend 100 hours on developing analog support for this board…

            Thanks again
            Cocodidou

          • Devin Heitmueller

            Hello Cocodidou,

            Code cannot really be ported from cx25843 to dib0700, since cx25843 is a video decoder component and dib0700 is a USB bridge. They serve completely different functions.

            Hauppauge/PCTV do quite a bit to support open source drivers (in fact their developers have unofficially contributed more code to v4l-dvb than any other vendor). They provide free hardware to open source developers, answer questions about the hardware designs, and apply pressure on the chipset vendors to make documentation available to allow GPL drivers to be written.

            However, supporting Linux officially would have considerable financial consequences. Linux users represent less than 1% of all units sold, so the additional costs of paying a developer to write drivers for a whole different Operating System, as well as the additional costs of all the support calls would make it non-profitable. Also, in many cases the quality of the applications themselves tends to be poor (something which is outside the hands of the driver author), so now they would be forced to support all the bugginess in Kaffeine, tvtime, MythTV, VLC, etc (and have the hardware returned when customers cannot get it to work).

            And regarding your assertion that they could rely on “patent protection”, this doesn’t really help. Many of the devices are based on chipsets which are also used by competitors, so as soon as they write the driver for one chip, now not only their product works under Linux but all the others do as well. For example, although 80% of the drivers for the United States standards (ATSC/ClearQAM) were written by two Hauppauge employees, they are used by cards by KWorld, Avermedia, Dvico, and a host of other competitors. The Hauppauge employees contributed hundreds of hours and thousands of lines of code to make their products work, and then a few users came along and added 10-15 lines of code so that the competitor boards would work. Seem fair?

            Anyway, there will still be ongoing work to support the community, but I wouldn’t expect any sort of official support anytime soon.

            Devin

          • Hello back Devin,
            Far from me this idea to have an official Linux driver for the 340e (I already make computations about financial consequences for companies . Sorry for that but I wasn’t aware that Hauppauge and PCTV employees did a lot of work, I thought that only volunteers developed the framework. Anyway, the “common v4l2 interface for dvb-usb” as said in a LinuxTV discussion is very difficult to plan.

            Cheers,
            Cocodidou

          • Devin,
            I must argue with you ^_^ Sorry ^_^
            IMHO it’s not entirely wrong what you’re saying, but we could extend and apply your point of view, for any device that we see in the market.
            But, in fact, we have vendors producing drivers for linux, and we have vendors NOT producing such drivers.
            Who is the “low-minded” between the manager working in Nvidia and the manager working in Pinnacle? Is nvidia wasting its money by producing good drivers?
            As far VLC is concerned, it is widely used, it runs on Windows, Leopard and Linux.
            I rarely use Windows and Leopard, but as I see many people use VLC, either in Leopard, and in Windows.
            I wouldn’t say “it’s buggy software”. It is as good, and as bad, as many other software. But it has much more feature than any other similar software has.
            Believe me, you can even make a Mojito with VLC! It’s hard to say “VLC is buggy”.
            Again, who’s the low-minded between the user running VLC and the user running itune or Windows Media Player?

            The same for Kaffeine: I don’t use KDE, but Kaffeine works. Where is the problem with Kaffeine?

            Last and no least, sorry to say this, but you tend to say “problem is on the software which is outside of hour hands”. But, in fact, those software you’re speaking about, is running properly. I suspect 99% of PCs in the world have VLC installed and users are very happy with it. But your driver, since 6 months, isn’t compiling and it’s working only 50% (analog won’t work).

            just my point of view ^_^

          • Massimiliano Adamo,
            Sorry but I must argue with you too. You are just saying that Devin’s driver does not compile. But in fact it does, and here’s the “task” if I can say so of a Linux user, to adapt the software to his environment. Don’t always wait for volunteers or manufacturers to develop drivers for YOUR configuration (if Pinnacle wants to develop only for Windows, nobody can force them to do so for Linux), that’s why I have made a tarball (don’t tell me I’m selfish but it was primarily intended for my personal use, I was not motivated enough to publish it but I still did). You can make also your tarball if you want. That would probably meet your requirements.
            But what I expect from manufacturers is just to open the source of their drivers (my sentence “Why doesn’t PCTV develop open-source drivers” was just meaning that), so that users could improve them and port them to Linux easily. Then there would be no extra work, no extra money to be required from the manufacturers.
            Then comes the VLC problem. VLC is not buggy when you download and compile stable releases without modifying them. If you download beta or unstable versions, or you modify the source so it does compile with your configuration, then it might become unstable and buggy.
            It’s also that, open-source software….

  13. Cocodidou,
    I know the driver is compiling (it compiled on my box). But – at least – is far from perfect.
    What I wanted to say is:
    -> don’t blame other code, because – maybe – you have trouble with your code. It’s not fair blaming other people work, expecially when those people can’t answer to you.
    It makes no sense blaming a widely used software such as VLC, to say that it’s not your fault if we get into problems by using dvb adapters.
    VLC is good enough. Otherwise, please tell us which multimedia player is better then VLC, and why people tend to use it either on Leopard and on Windows.
    -> if you are a vendor, you can even decide to create drivers for Linux, without providing any kind of support. I suspect that all vendors, making drivers for Linux, do not provide any kind of support for it. It’s kind of best effort support and I don’t think we can call Nvidia to get on-call support for you desktops.

    IMHO: as I am a Linux user this DVB for me is rubbish, as I can’t use it from two years.

  14. Cocodidou,
    you’re wrote: VLC is unstable if you download an unstable version, and is stable if you download a stable version. ehm … ehm … I suppose I must agree ^_^ but where is the stable version of you driver? ^_^ I am kidding guys and do not take it personally. But please, be honest and say that “VLC, as a media player, is almost the master of the universe”.
    And, continue to be honest, and if you get into trouble with your driver don’t blame the others and take your responisibility: you made the code and if there are trouble with your code is not VLC fault.

  15. there are 49 cable channels available in my country, when i connect the cable to tv, i can watch all of them, but when to laptop i can watch only 31 of them through pinnacle pctv 340e, would you please comment on this if you have any insight into the reason of this?

    • Hello Emran,

      It’s hard to say. There could be a variety of different reasons, including different antenna/orientation, issues with the tuner driver, buggy application software, etc. These issues tend to be extremely difficult to debug.

      You may wish to make sure you are using the same antenna connection, and if possible reboot into Windows and see if you get comparable results.

      Devin

  16. Hi, I tried to apply the patch (xc4000-winfast-2.6.34.x.patch) for xc4000 module in kernel 2.6.34.7. After i have rebuilded the kernel but when i restart my system pctv 340e not work fine.
    I have xc4000.fw in /lib/firmware and in in /lib/firmware/kernel_version.

    The module is load:
    linux-kfxc:/home/ # lsmod |grep xc
    xc4000 18980 0

    I read this guide: http://istvanv.users.sourceforge.net/v4l/xc4000.html

    When i insert the PCTV 340e tail -f /var/log/messages say:

    Jan 15 20:15:41 linux-kfxc kernel: [ 823.273021] usb 1-4: new high speed USB device using ehci_hcd and address 3
    Jan 15 20:15:41 linux-kfxc kernel: [ 823.388186] usb 1-4: New USB device found, idVendor=2304, idProduct=023e
    Jan 15 20:15:41 linux-kfxc kernel: [ 823.388190] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Jan 15 20:15:41 linux-kfxc kernel: [ 823.388193] usb 1-4: Product: PCTV 340e SE
    Jan 15 20:15:41 linux-kfxc kernel: [ 823.388195] usb 1-4: Manufacturer: YUANRD
    Jan 15 20:15:41 linux-kfxc kernel: [ 823.388197] usb 1-4: SerialNumber: 060078CECB

    my operation is wrong?

    • Hi! Did you try the new pctv-340e_linux-2.6.35.diff file ? It is for kernel 2.6.35.x, so it may not work for you without changes, but this is currently the only patch on my web site that includes support for the PCTV 340e. The relevant parts (dib0700_devices.c and dvb-usb-ids.h) could easily be merged into the 2.6.34.x “winfast” patch, but the kernel version is possibly still an issue. In the case of errors, it would be necessary to patch these two files manually until a 2.6.34.x patch is uploaded.
      There is also a complete patched V4L source package (http://corentin.ferry.free.fr/pctv-340e.tar.gz) created by Cocodidou (see above), which is basically the a79dd2ae4d0e V4L revision with my patch applied and PCTV 340e support merged.

  17. Istvan, Devin,

    With 2.6.35.13 vanilla kernel, on Debian Wheezy I got this Kernel error: Null pointer exception:

    I used the kernel patch for 2.6.35.x from istvan’s site.

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
    IP: [] mutex_lock+0x10/0x40
    PGD 0
    Oops: 0002 [#1] SMP
    last sysfs file: /sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map
    CPU 0
    Modules linked in: w83627hf hwmon_vid coretemp loop xc4000 mt2060 af9013 dvb_usb_dib0700 dib7000p dib7000m dib3000mc dvb_usb_af9015 dibx000_common psmouse i2c_i801 usb_storage [last unloaded: scsi_wait_scan]

    Pid: 3195, comm: kdvb-ad-0-fe-0 Not tainted 2.6.35.13 #1 D510MO/
    RIP: 0010:[] [] mutex_lock+0x10/0x40
    RSP: 0018:ffff880127335cf8 EFLAGS: 00010282
    RAX: ffffffffa009a4c0 RBX: 0000000000000080 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: ffff88012a6f3008 RDI: 0000000000000080
    RBP: ffff88012a9eb000 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000080
    R13: ffff88012a6f3008 R14: ffff88012a9eb000 R15: ffff8801271bf0a0
    FS: 0000000000000000(0000) GS:ffff880001a00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000080 CR3: 0000000129db9000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process kdvb-ad-0-fe-0 (pid: 3195, threadinfo ffff880127334000, task ffff8801271bf0a0)
    Stack:
    0000000000000000 ffff88012a9eb000 ffffffffa009a502 ffff88012a6f3000
    ffff88012a6f3000 ffff88012a9eb000 ffff88012a9eb000 ffff88012a6f3008
    ffffffffa005f467 0000000000004000 ffff880127335fd8 0000000000000286
    Call Trace:
    [] ? xc4000_set_params+0x42/0x460 [xc4000]
    [] ? dib7000p_set_frontend+0x57/0xf60 [dib7000p]
    [] ? lock_timer_base+0x33/0x70
    [] ? try_to_del_timer_sync+0x64/0x90
    [] ? dvb_frontend_swzigzag_autotune+0x110/0x250
    [] ? dvb_frontend_swzigzag+0x1ea/0x290
    [] ? dvb_frontend_thread+0x448/0x720
    [] ? autoremove_wake_function+0x0/0x30
    [] ? dvb_frontend_thread+0x0/0x720
    [] ? kthread+0x8e/0xa0
    [] ? kernel_thread_helper+0x4/0x10
    [] ? kthread+0x0/0xa0
    [] ? kernel_thread_helper+0x0/0x10
    Code: ff ff 48 8b 5c 24 48 48 8b 6c 24 50 4c 8b 64 24 58 4c 8b 6c 24 60 48 83 c4 68 c3 48 83 ec 10 48 89 1c 24 48 89 6c 24 08 48 89 fb ff 0f 79 05 e8 a6 00 00 00 65 48 8b 04 25 48 b5 00 00 48 2d
    RIP [] mutex_lock+0x10/0x40
    RSP
    CR2: 0000000000000080
    —[ end trace 62edd9e1aa42f7e0 ]—
    EXT4-fs (md0): re-mounted. Opts: errors=remount-ro,commit=0
    EXT4-fs (sda5): re-mounted. Opts: commit=0
    EXT4-fs (md1): re-mounted. Opts: commit=0

  18. Silly question.

    I’ve been trying a lot of things over 2 days to no avail unless I found out something very interesting.

    I have a PINNACLE PCTV Hybrid Pro Stick Solo with vendor 0x2304 (which is Pinnacle) and device 0x23e (which is the 340e SE)

    Is it possible that they are so different that the 340e SE simply won’t work?

    It is actually found as hardware by the OS and shows up in lsusb or system info in KDE but I’m not able to load any driver or firmware. It quits with errors.

    Would be nice to know if the 340e SE is a deadend or if it is worth to continue trying.

    • Devin Heitmueller

      Hi Marc,

      The device showing up in lsusb is absolutely no indication as to whether a driver is available for the device. Did you install the driver mentioned in this post? You are likely to have issues applying the tree to recent kernels due to API changes by the mainline kernel developers.

      The 340e and 340eSE are virtually identical from a driver standpoint. The only differences relate to the analog support (and the driver has no analog support at all), and the presence of an IR receiver.

      The device can be made to work, although at this point the process is by no means optimized for regular users.

      Devin

  19. Hi, Devin
    From the beginning I was a member pctv 340e on ubuntu. The kernel I am Natty 2.6.38-9-generic and dvb It is supported by the git source. Modified the driver by http://istvanv.users.sourceforge.net. Also there are modified files for installation (http://istvanv.users.sourceforge.net/v4l/pctv_340e-linux-next-338afa8.tar.gz). pctv 340e card works in mythtv, kaffeine, xine, smplayer. It is tested in the middle of Europe. I hope I helped a little.

Leave a Reply