TV-card mess

My system is 64-bit Suse 11.4. I installed a Hauppauge HVR2200 TV card and the firmware and software drivers. dmesg gives the following:

dmesg |grep saa7164
15.967933] saa7164 driver loaded
15.968014] saa7164 0000:02:00.0: PCI INT A → GSI 16 (level, low) → IRQ 16
15.968925] CORE saa7164[0]: subsystem: 0070:8940, board: Hauppauge WinTV-HVR2200 [card=4,insmod option]
15.968930] saa7164[0]/0: found at 0000:02:00.0, rev: 129, irq: 16, latency: 0, mmio: 0xf9c00000
15.968935] saa7164 0000:02:00.0: setting latency timer to 64
16.078006] saa7164_downloadfirmware() no first image
16.078018] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw)
16.668287] saa7164_downloadfirmware() firmware read 4019072 bytes.
16.668292] saa7164_downloadfirmware() firmware loaded.
16.668299] saa7164_downloadfirmware() SecBootLoader.FileSize = 4019072
16.668304] saa7164_downloadfirmware() FirmwareSize = 0x1fd6
16.668306] saa7164_downloadfirmware() BSLSize = 0x0
16.668307] saa7164_downloadfirmware() Reserved = 0x0
16.668308] saa7164_downloadfirmware() Version = 0x1661c00
23.335006] saa7164_downloadimage() Image downloaded, booting…
23.436005] saa7164_downloadimage() Image booted successfully.
25.139004] saa7164_downloadimage() Image downloaded, booting…
27.058006] saa7164_downloadimage() Image booted successfully.
27.093362] saa7164[0]: Hauppauge eeprom: model=89619
28.933249] DVB: registering new adapter (saa7164)
31.351199] DVB: registering new adapter (saa7164)
31.351552] saa7164[0]: registered device video0 [mpeg]
31.581567] saa7164[0]: registered device video1 [mpeg]
31.791990] saa7164[0]: registered device vbi0 [vbi]
31.792018] saa7164[0]: registered device vbi1 [vbi]

so all seems to be fine. Also /dev/video0 and /dev/video1, i.e. the tuner config files, are both there but are both empty files with 0 bytes, so none of the players finds the hardware. E.g., TVtime gives as answer that it can not open the device /dev/video0; other players tell me that they can not find any TV card either, which is not astonishing if they just read /dev/video0.

Taking the hardware out and de-installing everything related and then redoing everything from the beginning gives no different result. Nothing regarding specifically this on the net either. After 5 days of having the same failure again and again I am getting rather annoyed. I would be grateful for a wise word.

Hello zerealbigboss,

Welcome here to the forums.

We have a rathe hidden, but very important feature for posting here in the forums: Th use of CODE tags around computer text: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html

While I am afraid that I personaly can not give you the ultimate anser to your question (I hope others will tune in here soon), I can in any case tell you that files like */dev/video0 *are device special files. They do not realy have a size in bytes, Thus I do not understand you when you say

are both there but are both empty files with 0 bytes,

Please post here the output of

ls -l /dev/video*

so we can check what the ownership, etc. of the files is.

Hallo Henk,

ed@linux-0r9j:~> ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 May 10 22:57 /dev/video0
crw-rw----+ 1 root video 81, 1 May 10 22:57 /dev/video1

Also nothing abnormal. No difference running applications as root or as user.

BTW never run a normal application as root.

And yes, that looks normal. (Thus I do not uderstand you when you say the file has a size of 0 bytes, but let us forget that).

In any case, your user should be added to the video group, which is normaly done when you add a user by YYaST, but you couldd check hat also:

grep video /etc/group

The names of your “normal” users should be in that list.
The fact that TVtime complains that it can not open the device (please allways give a litteral error message, not your interpretation) points IMHO to an access problem, but when the user is in the video group that should not happen.

The fact that the device special files are there means that the system detected the video card. I do not know why it sees two of them (I have only one card and only /dev/video0, but I do not use them, so my practical knowledge is the same as one who has none).

On 05/10/2012 07:16 AM, hcvv wrote:
>
> BTW never run a normal application as root.
>
> And yes, that looks normal. (Thus I do not uderstand you when you say
> the file has a size of 0 bytes, but let us forget that).
>
> In any case, your user should be added to the -video- group, which is
> normaly done when you add a user by YYaST, but you couldd check hat
> also:
>
> Code:
> --------------------
> grep video /etc/group
> --------------------
>
> The names of your “normal” users should be in that list.
> The fact that TVtime complains that it can not open the device (please
> allways give a litteral error message, not your interpretation) points
> IMHO to an access problem, but when the user is in the -video- group
> that should not happen.
>
> The fact that the device special files are there means that the system
> detected the video card. I do not know why it sees two of them (I have
> only one card and only -/dev/video0-, but I do not use them, so my
> practical knowledge is the same as one who has none).

Once you have the video group added to your user, you should be able to


cat /etc/video0 > tmp

Let that run for a few seconds, then CTRL/C to stop it, and ‘ls -l tmp’ to see
the file size. It should be many thousands of bytes. If so, the video device is
providing output.

You cannot use tvtime to view the output of the HDR2200, as tvtime only handles
a type of signals that your device cannot provide. I think you need to install
xawtv.

Those are not tuner config files. Those are “character device” files for the video capture interface. See:

/dev/video0 and /dev/video1…are both there but are both empty files with 0 bytes, so none of the players finds the hardware. E.g., TVtime gives as answer that it can not open the device /dev/video0; other players tell me that they can not find any TV card either, which is not astonishing if they just read /dev/video0.
While I can understand how you might have arrived at this conclusion, however, it is incorrect, as that is not how it works. I see that hcvv has also already mentioned this.

His device, the HVR-2200, is a dual hybrid tuner device, and the decoder/bridge chip (the NXP 7164) provides a unique video capture interface to both analog tuning blocks and/or A/V input facilities (if they exist; I personally do not know if they do on the card).

To clarify this point, tvtime is an analogue TV/video signal viewing app. So, before going any further, if you are trying to use it to view digital TV signals, then you’re barking up the wrong tree trying to use an app like tvtime (not to mention that the /dev/video etc has nothing to do with digital tv, but, rather, has only to do with video capture … i.e. analogue video/tv streams).

On the other hand, If you are trying to watch an analogue TV stream or A/V input:

i) is analogue functionality supported for that card – I do not know offhand the level of support (the wiki device page says no, but it is rather dated I suspect … check Steven Toth’s blog to see if he mentions adding support for analogue on the device

ii) be it known that when analogue signals are input into your card they are digitzed (i.e. ADC is performed) by the NXP 7164 chip into a “raw” (for lack of better term) bitstream, but then that raw bitstream is then also encoded by the NXP into a mpeg2 stream … tvtime, accepts raw video bitstreams, however, it does not handle video streams in the mpeg2 format. This is applies to a number of other analogue viewing apps too. The commonly available v3 of xawtv will not work (you’d need to get the experimental v4). Anyway, see: TV Related Software - LinuxTVWiki
for some ideas. Tv-viewer, or MPlayer (directly) would be my suggestions.

Once you have the video group added to your user, you should be able to


cat /etc/video0 > tmp


Let that run for a few seconds, then CTRL/C to stop it, and 'ls -l tmp' to see
the file size. It should be many thousands of bytes. If so, the video device is
providing output.

Indeed, this is a basic test which should determine whether the device’s analogue functionality is working correctly or not …

Looks like I am lost in the woods real fine. The 2200 indeed is a dual hybrid tuner with hardware decoding and mpeg2 output.

If /dev/video* is analog, then I will have to look for some DVB-item; most probably that will be in /dev too. I must have overlooked this obvious information because googleing brings only /video* up which lead me up the garden path. So much for thinking out of the box.

I am not in this weekend, so on Monday I will tell you more.

Try* /dev/dvb/adapter**.

But IMHO using the right program will find these automagicaly.

ahh, I kind of suspected you were actually after dvb … its a common mistake. :slight_smile:

The 2200 indeed is a dual hybrid tuner with hardware decoding and mpeg2 output.
Just as a FYI, when folks talk about “hardware decoding” for these types of devices, what they invariably mean is either mpeg2 or (more recently) mpeg4 decoding. The NXP saa7164 is an A/V decoder (that is, it digitizes an analog signal into a (some sort of analog video format compliant; ie. NTSC, PAL, SECAM) bitstream), but it does not contain a mpeg2_or_4 decoder (nor is any other such IC found on the HVR-2200). However, it (the NXP IC) does indeed have a hardware mpeg2/4 encoding enginge … which is applicable to analogue streams only, as digital TV is already compressed/encoded in a video format such as mpeg2 or 4 (depending upon the digital TV system employed)…in terms of digitalTV, the 7164 IC is simply a bridge – a conduit for the stream to get onto the system bus (PCIe in this case) and be offloaded to the host for decoding… technically there are other “decoders” onboard the hvr-2200 device, specifically the demodulators, as those hardware IC’s also perform a type of decoding operation, however, they (demodulators) are not refereed to as being such in common vernacular, and certainly are not what is implied when people talk about “hardware decoders”. Anyway, that’s all well beyond the scope of discussion here :smiley:

If /dev/video* is analog, then I will have to look for some DVB-item; most probably that will be in /dev too.
correct, on the device node /dev/dvb … hcvv already noted the character devices /dev/dvb/adapter* … . have a read through the LinuxTV wiki article I linked to earlier, as it explains the function of all these if you really want to know … that said, you really don’t need to worry about this too much, as it is transparent to the user when using GUI apps to watch digitalTV… I recommend Kaffeine or Me-TV for standalone dvb viewing apps.

But IMHO using the right program will find these automagicaly.

hcvv is correct. Your dmesg output shows that the device is correctly detected, firmware loaded etc… you should be good to go. Time to fire up a proper viewing app, do a channel scan, and then enjoy whatever it is that you’re gonna be watching :smiley:

I am not in this weekend, so on Monday I will tell you more.
Now that your headed in the right direction, I’m sure you will get it going easily enough once you get the chance.

Two days late, but sometimes there are things more important than TV.

All the recommended tests gave positive results, but no player, whichever I chose, did see the card. OK, so after one day more of trying I went back to the proven Microsoft method: format and re-install. And lo and behold, Kaffeine instantly saw the card and I could look TV. However, the pleasure is not (yet) perfect; from the 18 channels of Freeview in New Zealand one works perfectly, with a few the sound is about 5 seconds early w.r.t. the video, others have video but intermittent sound or no sound at all and one has sound but no video. The three radio channels are fine. Non-consistent results for the whole card, but consistent for the individual channels.

The specs of the processor are better than the advisedly required ones: a Core Duo at 3GHz with the 64-bit 11.4. so that should not be the source of the problem. Changing the video card did not make it go away either, and the MB has been perfect in every sense up to now. It will take some more time to get at that also, but I will get it, for sure.

Thanks for all the comments; I can tell you a lot about assembly, C and microprocessors, but PCs and their OS are still rather enigmatic.

There are MANY, MANY, <insert to infinity> things more important than TV.

so after one day more of trying I went back to the proven Microsoft method: format and re-install. And lo and behold, Kaffeine instantly saw the card and I could look TV.
LOL, not sure why you continued to have difficulty with it, and the solution was most certainly not the most eloquent approach, but glad you ended up getting it to work

However, the pleasure is not (yet) perfect; from the 18 channels of Freeview in New Zealand one works perfectly, with a few the sound is about 5 seconds early w.r.t. the video, others have video but intermittent sound or no sound at all and one has sound but no video. The three radio channels are fine. Non-consistent results for the whole card, but consistent for the individual channels.

The specs of the processor are better than the advisedly required ones: a Core Duo at 3GHz with the 64-bit 11.4. so that should not be the source of the problem. Changing the video card did not make it go away either, and the MB has been perfect in every sense up to now. It will take some more time to get at that also, but I will get it, for sure.
Could be a variety of reasons.

  • marginal reception … cabling, aerial, or in-case EMI issues
  • video playback mode (Xv, GL, …)
  • video card … you said you swapped cards, but you didn’t mention which one’s you’ve tried
  • buffer settings

You could try running femon -H in a console window concurrent to trying out reception with the trouble maker channels to see if your signal weak or not in comparison to the one that you are well receiving.

Hello Tyler,

I neither have any idea why the new installation did make a difference, but then, as said, PCs are enigmatic to me. Give me a simple uP any time. Nevertheless, given enough time I trust that I will stumble over the solution, but I will have to hurry; coming November, they will switch off analog TV here.

The 8400GS was replaced by a nVidia 610, but that did not make a difference. I hauled the TV from our bedroom to make sure that it would not be the antenna; that one has no problem. The built-in signal strength indicator in that TV is in the middle of the OK area. The TV in the living room does not have a Freeview tuner, that’s why I want the PC as multi-media centre. Gives me now something to spend time on in the long winter nights (NZ = Southern hemisphere).

Thanks again for the moral support.
Ed.

This is the place to go, don’t know ir anybody mentioned it: Hardware Device Information - LinuxTVWiki Find your card, and read what needs to be done to get it working.