LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Problem with ivtv drivers - pvr 350 and logitech webcam 4000 pro pwc drivers (https://www.linuxquestions.org/questions/linux-hardware-18/problem-with-ivtv-drivers-pvr-350-and-logitech-webcam-4000-pro-pwc-drivers-421836/)

sdavis3 03-05-2006 08:49 AM

Problem with ivtv drivers - pvr 350 and logitech webcam 4000 pro pwc drivers
 
I'm running suse linux 10, and have the hauppauge pvr 350 tv card and the logitech 4000 pro webcam. I've installed the ivtv 4.3 drivers for the tc card and the pwc drivers for the webcam.

The webcam works fine but can not get my tv card to work with anything including the latest verision of mythtv. From my searching on the web for information, I understand that the webcam loads first, so it takes /dev/video0, which I have verified. But also my tv tuner card wants to also use /dev/video0.

So, I'm thinking theres a conflict going on, and the next step to get my tv card working is to tell linux some how for one of those devices ( tv card or webcam ) to use /dev/video1. How do I configure/ setup / force linux to put one of these devices on /dev/video1?

Everything I've found so far on the web refers to older kernels and version of linux which doesn't seem to work with suse 10. I'm new to linux, and have been a dos/windows user for 15 years. That being said, can anybody help me with this that is a linux guru, or direct me in the right direction. I've fighting this problem for a couple of weeks now. Thanks.

randyding 03-05-2006 09:36 AM

There is probably an easy solution to getting these two devices to play along, but I was thinking you could use a video camera that has a composite or svideo output and run it into the PVR350. Then use ivtvctl to switch to that input. Both camera and TV can then use the ivtv driver and be /dev/video0, just not at the same time.

edit... try this...

Code:

# modprobe -r ivtv
# modprobe ivtv ivtv_first_minor=1


sdavis3 03-06-2006 08:30 AM

Thanks for your help. I tried that suggestion but did not work. I removed the pwc module, so I can focus on getting my pvr 350 to work.
I can't get any tv program to work with it. Mythtv was a chore just to get it to run / setup the data base, etc. When I run the mythbackend it gives an error about a problem with channel 3 error that it can't find or set. Checking for stations in yast scans the card but does not find a station. When using the ivtv utilities they do set the station. When clicking on the tuner button in yast it says there is no tuner, but when doing a dmesg, the ivtv section says the tune is loaded and is a type 2. When loading dmesg | grep ivtv, there is a (tuner not set) in the message. This is totally making me crazy. I'm dual booting between windows xp and suse 10. The PVR 350 works fine in windows.
Is there anybody that has the PVR 350 working in suse 10 with ivtv 4.3 and mythtv? Where can I go to fine out how to setup this up right to get it to work? Thanks

randyding 03-06-2006 11:11 PM

I understand being frustrated. I first addressed your original question which was related to ivtv drivers, and setting ivtv_first_minor=1 moves the video0 to video1 just fine. I just got done testing it and that works.

You now seem to have a mythtv config issue where it wants video0 still, and doesn't know about the move to video1.

Just start mythtv-setup, and go through the process of deleting your capture card from the configuration and re-adding the video1 video card. Go through all the steps one by one and it works. I just tried it and have mythtv running on video1 now.

sdavis3 03-07-2006 09:52 AM

Hi, thanks again. Since my last message I was still having problems with suse loading pwc drivers (older ones that I guess come with suse)for my logitech web cam even though I removed the lastest driver for it. So I removed it again and unplugged my web cam to make sure suse didn't find it until I can sort this out, and get my pvr 350 working. Once I get the TV tuner 350 working I will try your first suggestion again.

Anyway I tried to get Mplayer to work with the pvr 350. Could not get it to work until I did some settings with ivtvctl which I stumbled accross on a web site. So now when I do a command in the terminal mplayer /dev/video0 I finally get a picture. But I do not get any sound. I'm assuming that there is something in ivtvctl I have to set for audio, because I had to do settings for video with ivtvctl. There are a bunch of references for switches to use in the command line on the web, but I can not find anything about the correct command line and switch to get the audio to work. For that matter it is hard to find any reference to do what settings to use on a paticular tv card. Do you know what settings are for the ivtvctl and the pvr 350?

On the mythtv I get a black picture now when trying to watch tv and thats it. I've gone in the setup and told it channel 4 because thats what my cable box is set on, and that worked with Mplayer. But when I run mythbackend, it gives a message about not finding channel 3, which I can find that anywhere in there settings. Also when I'm configuring mythtv and exit it, it gives me an error message about channel 3 and ask me if I would like mythtv to fix it. Of course I say yes, but it doesn't fix a thing. I even tried setting my cable box to channel 3, but that didn't help either.

So this is where I am stuck with both Mplayer and mythtv. I'm only guessing here but I assume that in order for any media program to work with PVR 350 and the ivtv drivers, I have to use there ivtv utilities ( ivtvctl and ivtv-tune )to setup the tv card for the correct output and input settings. I say this because thats how I finally got at least a video picture with Mplayer and also finally created at mpeg file to test and play back.

I'm at work now so I can't put in this message any settings I've used or and technical information, but if you let me know what information you might need to see, to get the audio problem working and mythtv working, I'll paste that information in my messages. Thanks for all your help.

randyding 03-07-2006 11:41 PM

A few thoughs, first the ivtvctl gets installed when you "make install" so it should be on the computer already when you installed the ivtv drivers.

You have to work the audio issue from both ends. First, the capture card needs separate audio input cables connected when you are receving video from composite or s-video. The tuner extracts audio from the over-the-air signal. So if you are using composite or s-vidio input make sure you have good audio going into the L-R jacks.

The mpeg output file (cat /dev/video0 >test.mpg) has the audio stream embedded in the file. So if playing the test.mpg file in mplayer has no sound I'd say that its mplayer that is having sound problems and not the tuner. When you play other mpg files that also have audio (not recorded from tuner) do you have sound with those recordings?

sdavis3 03-08-2006 06:03 AM

I am not using any video composite or s-video cables plugged into the pvr 350 video in. I'm capturing from the tuner. When I do a (cat /dev/video < test.mpg) I'm receiving that through the tuner. When I do a (mplayer /dev/video0) I get a picture and no audio. I tested mplayer with another .mpg file I recorded in windows, that works fine and I can hear audio. So I do not think anything is wrong with mplayer.

Heres a clip of info from dmesg-

ivtv: module not supported by Novell, setting U taint flag.
ivtv: ==================== START INIT IVTV ====================
ivtv: version 0.4.3 (tagged release) loading
ivtv: Linux version: 2.6.13-15.8-smp SMP gcc-4.0
ivtv: In case of problems please include the debug info between
ivtv: the START INIT IVTV and END INIT IVTV lines, along with
ivtv: any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected WinTV PVR 350 card (cx23415 based)
ACPI: PCI Interrupt 0000:02:06.0[A] -> GSI 22 (level, low) -> IRQ 217
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
tveeprom: Hauppauge: model = 48132, rev = I123, serial# = 6179327
tveeprom: tuner = Philips FM1236 (idx = 23, type = 2)
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio_processor = MSP3440 (type = 11)
: chip found @ 0xc2 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
saa7115: module not supported by Novell, setting U taint flag.
saa7115 1-0021: ivtv driver
saa7115 1-0021: saa7115 found @ 0x42 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=saa7115, addr=21]
saa7127: module not supported by Novell, setting U taint flag.
saa7127 1-0044: ivtv driver
saa7127 1-0044: saa7127 found @ 0x88 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=saa7127, addr=44]
Floppy drive(s): fd0 is 1.44M
ACPI: PCI Interrupt 0000:02:05.0[A] -> GSI 21 (level, low) -> IRQ 225
FDC 0 is a post-1991 82077
msp34xx: init: chip=MSP3448W-A2 +nicam +simple +simpler +radio mode=simpler
ivtv0: i2c attach to card #0 ok [client=MSP3448W-A2, addr=40]
msp34xxg: daemon started
hda: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
hdb: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2000kB Cache, UDMA(66)
ieee1394: Host added: ID:BUS[0-00:1023] GUID[00023c003103519e]
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02050032
ivtv0: Decoder revision: 0x02020023
ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv0: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv0: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB total)
ivtv0: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB total)
ivtv0: Create encoder radio stream
ivtv0: Allocate DMA decoder MPEG stream: 16 x 65536 buffers (1024KB total)
ivtv0: Allocate DMA decoder VBI stream: 512 x 2048 buffers (1024KB total)
ivtv0: Create decoder VOUT stream
ivtv0: Allocate DMA decoder YUV stream: 24 x 43200 buffers (1024KB total)
ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
tuner 1-0061: type set to 2 (Philips NTSC (FI1236,FM1236 and compatibles))
ivtv0: Initialized WinTV PVR 350, card #0
ivtv: ==================== END INIT IVTV ====================

Thanks

sdavis3 03-08-2006 09:33 AM

I also have another question about ivtvctl. On ivtv web site they list parameters for ivtvctl but alot of the parameters don't list the settings and what they mean. For example:

-v --set-io=input=<in>,output=<out> set the MSP34xx input/output mapping [MSP_SET_MATRIX]

I found in one forum these entries for this:
ivtvctl -v input=7,output=1
ivtvctl -v input=2,output=2

Ok so what does input=7 refer too, input=2 refer too? For example. Is mapping the input and output of audio?

Where is this secret manual for the parameter settings for ivtvctl?

How I got the video to work was entering in the terminal:
ivtvctl -d /dev/video0
ivtvctl -u 0x3000
ivtvctl -p 4
ivtvctl -f width=720,height=480

I do not know what the ( ivtvctl -p4 ) p4 definition is but it worked. I just stumbled accross these settings on the web. So I assume -p4 is the paticular setting that works with the pvr 350.
The parameters 1,2,3,4,5,6,7,8 are used on different entries in ivtvctl but where is the manual / book / reference on what these each parameter means and how it effects the output / input of the TV card. If I had this information, it would be alot easier to setup the my pvr 350. Thanks again.

randyding 03-08-2006 09:41 PM

to list the audio inputs: ivtvctl -A
to set the audio input to the tuner: ivtvctl -q 0
try this to list everything: ivtvctl -a
more command line help: ivtvctl --help

Note, I'm not sure how you really typed the commands but you need to specify all the command line options on one line, not broken into different calls like you show it.

sdavis3 03-08-2006 10:45 PM

This is the information form ivtvctl -a

ioctl IVTV_IOC_G_CODEC ok
Codec parameters
aspect : 2
audio : 0x00e9
bframes : 3
bitrate_mode: 0
bitrate : 8000000
bitrate_peak: 9600000
dnr_mode : 0
dnr_spatial : 0
dnr_temporal: 8
dnr_type : 0
framerate : 0
framespergop: 15
gop_closure : 1
pulldown : 0
stream_type : 14
ioctl VIDIOC_G_FMT ok
Type : Video Capture
Width : 720
Height : 480
ioctl VIDIOC_QUERYCAP ok
Driver name : ivtv
Card type : WinTV PVR 350
Bus info : 0000:02:06.0
Driver version: 1027
Capabilities : 0x010700F3
ioctl: VIDIOC_ENUMINPUT
Input : 0
Name : Composite 0
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 1
Name : Composite 1
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 2
Name : Composite 2
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 3
Name : Composite 3
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 4
Name : Tuner 0
Type : 0x00000001
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x0000000000003000 ( NTSC )
Status : 0

Input : 5
Name : Composite 4
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 6
Name : S-Video 0
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 7
Name : S-Video 1
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 8
Name : S-Video 2
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0

Input : 9
Name : S-Video 3
Type : 0x00000002
Audioset: 0x00000003
Tuner : 0x00000000
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
Status : 0
ioctl VIDIOC_G_INPUT ok
Video input = 4
ioctl: VIDIOC_ENUMOUTPUT
Output : 0
Name : S-Video + Composite
Type : 0x00000002
Audioset: 0x00000001
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )

Output : 1
Name : Composite
Type : 0x00000002
Audioset: 0x00000001
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )

Output : 2
Name : S-Video
Type : 0x00000002
Audioset: 0x00000001
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )

Output : 3
Name : RGB
Type : 0x00000002
Audioset: 0x00000001
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )

Output : 4
Name : YUV C
Type : 0x00000002
Audioset: 0x00000001
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )

Output : 5
Name : YUV V
Type : 0x00000002
Audioset: 0x00000001
Standard: 0x00000000007F7FFF ( PAL NTSC SECAM )
ioctl VIDIOC_G_OUTPUT ok
Output = 0
ioctl: VIDIOC_ENUMAUDIO
Input : 0
Name : Tuner Audio In

Input : 1
Name : Audio Line In
ioctl VIDIOC_G_AUDIO ok
Audio input = 0: Tuner Audio In
ioctl VIDIOC_G_FREQUENCY ok
Frequency = 1076
ioctl: VIDIOC_ENUMSTD
index : 0
ID : 0x0000000000003000
Name : NTSC
Frame period: 1001/30000
Frame lines : 525

index : 1
ID : 0x00000000000000FF
Name : PAL
Frame period: 1/25
Frame lines : 625

index : 2
ID : 0x00000000007F0000
Name : SECAM
Frame period: 1/25
Frame lines : 625
ioctl VIDIOC_G_STD ok
Video standard = 0x00003000
ioctl: VIDIOC_QUERYCTRL
Brightness = 128
Contrast = 64
Saturation = 64
Hue = 0
Volume = 58880
Mute = 0
steve@linux:~>

Still no sound in Mplayer, and black screen in Mythtv

randyding 03-09-2006 07:20 PM

When you installed the ivtv drivers did you check for duplicates.
You can run this script to search for duplicates, if any are found outside the extra directory they have to be deleted.
Code:

for fn in /lib/modules/$(uname -r)/extra/*; do find /lib/modules/$(uname -r) | grep $(basename ${fn%.*}); done
I get this output, if you have more than these listed then perhaps the wrong module is getting loaded.
Code:

/lib/modules/2.6.9-34.EL/extra/cs53l32a.ko
/lib/modules/2.6.9-34.EL/extra/cx25840.ko
/lib/modules/2.6.9-34.EL/extra/ivtv-fb.ko
/lib/modules/2.6.9-34.EL/extra/ivtv-fb.ko
/lib/modules/2.6.9-34.EL/extra/ivtv.ko
/lib/modules/2.6.9-34.EL/extra/msp3400.ko
/lib/modules/2.6.9-34.EL/extra/saa7115.ko
/lib/modules/2.6.9-34.EL/extra/saa7127.ko
/lib/modules/2.6.9-34.EL/extra/tda9887.ko
/lib/modules/2.6.9-34.EL/extra/tuner.ko
/lib/modules/2.6.9-34.EL/kernel/sound/i2c/other/snd-tea575x-tuner.ko
/lib/modules/2.6.9-34.EL/extra/tveeprom.ko
/lib/modules/2.6.9-34.EL/extra/wm8775.ko


sdavis3 03-10-2006 06:35 AM

Ok, I put the code in the console and found the drivers in 3 folders
/lib/modules/2.6.13-15.8-smp/extra/
/lib/modules/2.6.13-15.8-smp/ivtv/
/lib/modules/2.6.13-15.8-smp/kernel/drivers/media/video/

So I renamed the drivers in the ivtv folder and video folder to .old. Did it that way so I could eliminate the problem without screwing up linux. After I rebooted, I did I Dmesg and no ivtv. It was gone. So then I went back and rename one set of files at a time rebooting in between each time. Ivtv did not start working again until I renamed the files back in the /lib/modules/2.6.13-15.8-smp/kernel/drivers/media/video/ folder.
So apparently linux is using the drivers in this folder. Then I starting looking at the dates and file size between each of the folders and noticed that the msp3400.ko file was a newer date and larger file in the /lib/modules/2.6.13-15.8-smp/ivtv/ folder than in the /lib/modules/2.6.13-15.8-smp/kernel/drivers/media/video/ folder. So I copied the msp3400.ko file from the ivtv folder to the video folder over writing the file and it worked. I now have sound and a picture in Mplayer. Also when I do a cat /dev/video0 > test.mpg it plays back in Mplayer with sound. Whoo hoo! Thanks. You've been a really big help and I appreciate it.

Ok, now if I can task your brian some more, I still can't watch Tv in Mythtv.
When I bring up mythtv front end and select watch tv, I get a black screen, then it goes back to a blue screen and lists an error - unable to initialize video. Its problably some setting I did, don't know. I do have it set to use video0 for the tuner, and capture. I also noticed after I tried running mythtv, then mplayer won't playback /dev/video0, I just get a black. I have to reboot, then Mplayer will work again. Thanks

randyding 03-10-2006 07:56 PM

I'm not a driver expert, but I believe instead of moving drivers from folder to folder just delete the extra/old ones that shouldn't be there and do depmod.

To fix the /dev/video0 problem (without rebooting) you can probably just unload and reload the ivtv drivers using modprobe.

I saw you posted you're using a smp kernel, I couldn't find out in the docs if Mythtv supports this or not. Could be a problem if it doesn't support it, however I don't actually know. You could just try rebooting and select the non-smp kernel and try mythtv again. If no difference then its not the problem but worth a try.

I've only seen the Mythtv problem you described when the mysql database was out of wack. Have you gone through all the steps to setup the mythtv account and then all the mythtv-setup steps?

sdavis3 03-11-2006 08:34 AM

Ok,
I have it all working including the webcam. But xawtv won't work now. It use to display the input of the web cam, but now it won't even start up. Fix for that? What do you think? Anyway mplayer works with audio and mythtv is working and also allows me to switch the video source in between the tuner or composite in on the tv card. I assume I can't record a different channel while watching tv on another channel because my input source is a cable box and the video out / tv cable out on cable box are putting out the same tv channel. About the smp you mentioned, that is the default kernal Suse loaded. I'm running the 64bit version.
Thanks


All times are GMT -5. The time now is 06:06 PM.