View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 4 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Jul 21, 2005 5:17 am 
Offline
Joined: Thu Jul 21, 2005 1:03 am
Posts: 3
Hello, I've been trying to get my PVR500 to work for a week or two and right now up to the point of having a (somewhat blurry) picture in MythTV. I can get sound too but only if I manually switch the Audio Tuner input from 0 to 1. ( ivtvctl -q 1)

While reading the README.cx25840 doc from the ivtv-0.3.7 driver I saw that to make audio work I'll need to use the switch -p 7 when initializing the driver.

This can be done by editing the files /etc/init.d/set_ivtv_params and it's config files /etc/sysconfig/ivtv/cfg-0 and /etc/sysconfig/ivtv/cfg-1

Code:
cat /etc/init.d/set_ivtv_params

#!/bin/bash
#       Set the ivtv Parameters
########################################################################
IVTVCTL='ivtvctl'
IVTVDIR='/etc/sysconfig/ivtv'
#----------------------------------------------------------------------#
# Default values, if not specified in $IVTVDIR/cfg-*
#IVTV_DT='7'            # Tuner input,
#IVTV_DF='PAL'          # tuner format [NTSC|PAL]
########################################################################
[ -d "$IVTVDIR" ] || exit 1

PATH="$PATH:/usr/local/bin"
# See how we were called:
case $1 in
    (start)
        cd $IVTVDIR || exit 2
        for g in $(echo cfg-*) ; do
            f=${g#cfg-}
            unset IVTV_TUNER IVTV_RATE IVTV_PEAK IVTV_TYPE
            source cfg-$f
            case $IVTV_TYPE in
                ("")    IVTV_TYPE=0x3000        ;;
                (NTSC)  IVTV_TYPE=0x3000        ;;
                (PAL)   IVTV_TYPE=0xff          ;;
            esac
            $IVTVCTL -d /dev/video$f -u $IVTV_TYPE
            $IVTVCTL -d /dev/video$f -p ${IVTV_TUNER:-${IVTV_DT}}
            $IVTVCTL -d /dev/video$f -f width=720,height=576
            $IVTVCTL -d /dev/video$f -c dnr_mode=0,dnr_temporal=0
        done
        ;;
    (stop) # don't do anything on stop.
        ;;
    *)
        echo "Usage: /etc/init.d/set_ivtv_params {start|stop}"
        exit 1
        ;;
esac
########################################################################
# End


Code:
cat /etc/sysconfig/ivtv/cfg-0   

# /etc/sysconfig/ivtv/Readme
#
#       A KnoppMyth configuration file.
#
# This file is an example configuration file for tv tuner cards
#  that use the ivtv driver module, such as the PVR-250.
#
# If a copy of this file is placed in the /etc/sysconfig/ivtv
#  directory with the name of (for example) cfg-0, then, when
#  /etc/init.d/set_ivtv_params gets run during boot, the ivtv
#  card that represents /dev/video0 will have the following
#  parameters set.
#

# IVTV_TUNER is the tuner input selection value,
#  if not set the Default of '0' will be used.
IVTV_TUNER='7'

# IVTV_TYPE is the type of the tuner.  Possible values
#  are NTSC or PAL.  A default value of 'NTSC' will be used if
#  this is not set.
IVTV_TYPE='PAL'

# End


Code:
cat /etc/sysconfig/ivtv/cfg-1

# /etc/sysconfig/ivtv/Readme
#
#       A KnoppMyth configuration file.
#
# This file is an example configuration file for tv tuner cards
#  that use the ivtv driver module, such as the PVR-250.
#
# If a copy of this file is placed in the /etc/sysconfig/ivtv
#  directory with the name of (for example) cfg-0, then, when
#  /etc/init.d/set_ivtv_params gets run during boot, the ivtv
#  card that represents /dev/video0 will have the following
#  parameters set.
#

# IVTV_TUNER is the tuner input selection value,
#  if not set the Default of '0' will be used.
IVTV_TUNER='7'

# IVTV_TYPE is the type of the tuner.  Possible values
#  are NTSC or PAL.  A default value of 'NTSC' will be used if
#  this is not set.
IVTV_TYPE='PAL'

# End


The only other file that has to be edited as far as I know is the file /etc/mythtv/modules/ivtv. It's still vague to me what exactly should be in this file but I think it should be this:

Code:
cat /etc/mythtv/modules/ivtv

alias char-major-61 lirc_i2c
alias char-major-81 videodev
alias char-major-81-0 ivtv
alias char-major-81-1 ivtv
options ivtv ivtv_std=1 tuner=56,56 tda9887=0,0 ivtv_debug=1
options cx25840 i2c_enable=1
options saa7127 i2c_enable=-1
options msp3400 once=1 simple=1


Now here's the thing I can't explain and hope one of you can help me with.

If I look at dmesg I see the setting getting parsed to the driver fine but then right before the end everything gets set back to default.

Code:
demsg: (truncated)

Linux video capture interface: v1.00
ivtv: ==================== START INIT IVTV ====================
ivtv: version 0.3.7 () loading
ivtv: Linux version: 2.6.11.9-chw-2 SMP preempt 586 gcc-3.3
ivtv: In case of problems please include the debug info
ivtv: between the START INIT IVTV and END INIT IVTV lines when
ivtv: mailing the ivtv-devel mailinglist.
ivtv: Autodetected WinTV PVR 150 card
ivtv: Found an iTVC16 based chip
ACPI: PCI interrupt 0000:03:08.0[A] -> GSI 18 (level, low) -> IRQ 18
ivtv: XXX PCI device: 0x1130 vendor: 0x8086
tveeprom: Hauppauge: model = 23559, rev = D591, serial# = 2945831
tveeprom: tuner = Philips FQ1216AME MK4 (idx = 91, type = 56)
tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L) PAL(D/K) (eeprom = 0x74, v4l2 = 0x00400e17)
tveeprom: audio_processor = MSP3410D (type = 5)
ivtv: i2c attach [client=tveeprom[50],ok]
ivtv: Tuner Type 56, Tuner formats 0x00400e17, Radio: yes, Model 0x00915651, Revision 0x00000000
ivtv: Radio detected
tuner: Ignoring new-style parameters in presence of obsolete ones
tuner: chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
ivtv: i2c attach [client=(tuner unset),ok]
cx25840: starting probe on adapter ivtv i2c driver #0 (0x10005)
cx25840: detecting cx25840 client on address 0x88
cx25840: cx25843-23 found. Initializing...
cx25840: requesting /lib/modules/HcwMakoA.ROM
eth0: no IPv6 routers present
cx25840: firmware loaded
ivtv: i2c attach [client=cx25840[50],ok]
ivtv: i2c attach [client=wm8775[50],ok]
tda9885/6/7: chip found @ 0x86
ivtv: i2c attach [client=tda9887,ok]
ivtv: Encoder revision: 0x02040011
ivtv: Configuring WinTV PVR 150 card with 5 streams
ivtv: Registered v4l2 device for encoder MPEG minor 0
ivtv: Create DMA encoder MPEG stream: 0 x 32768 buffers (0KB total)
ivtv: Registered v4l2 device for encoder YUV minor 32
ivtv: Create DMA encoder YUV stream: 0 x 10800 buffers (0KB total)
ivtv: Registered v4l2 device for encoder VBI minor 224
ivtv: Create DMA encoder VBI stream: 0 x 8736 buffers (0KB total)
ivtv: Registered v4l2 device for encoder PCM audio minor 24
ivtv: Create DMA encoder PCM audio stream: 0 x 4608 buffers (0KB total)
ivtv: Registered v4l2 device for encoder radio minor 64
ivtv: Create encoder radio stream
ivtv: Setting Tuner 56
tuner: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4)) by ivtv i2c driver #0
cx25840: decoder set norm NTSC
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
ivtv: Switching standard to NTSC.
cx25840: decoder set norm NTSC
ivtv: Initialized WinTV PVR 150, card #0
ivtv: Autodetected WinTV PVR 150 card
ivtv: Found an iTVC16 based chip
ACPI: PCI interrupt 0000:03:09.0[A] -> GSI 21 (level, low) -> IRQ 21
ivtv: XXX PCI device: 0x1130 vendor: 0x8086
tveeprom: Hauppauge: model = 23559, rev = D591, serial# = 2945831
tveeprom: tuner = Philips FQ1216AME MK4 (idx = 91, type = 56)
tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L) PAL(D/K) (eeprom = 0x74, v4l2 = 0x00400e17)
tveeprom: audio_processor = MSP3410D (type = 5)
ivtv: i2c attach [client=tveeprom[50],ok]
tuner: chip found at addr 0xc2 i2c-bus ivtv i2c driver #1
ivtv: i2c attach [client=(tuner unset),ok]
cx25840: starting probe on adapter ivtv i2c driver #1 (0x10005)
cx25840: detecting cx25840 client on address 0x88
cx25840: cx25843-23 found. Initializing...
cx25840: requesting /lib/modules/HcwMakoA.ROM
ivtv: ivtv_enc_thread: pid = 2712, itv = 0xe10b2020
ivtv: ivtv_enc_vbi_thread: pid = 2713, itv = 0xe10b2020
cx25840: firmware loaded
ivtv: i2c attach [client=cx25840[50],ok]
ivtv: i2c attach [client=wm8775[50],ok]
tda9885/6/7: chip found @ 0x86
ivtv: i2c attach [client=tda9887,ok]
ivtv: Tuner Type 56, Tuner formats 0x00400e17, Radio: yes, Model 0x00915651, Revision 0x00000000
ivtv: Radio detected
ivtv: Encoder revision: 0x02040011
ivtv: Configuring WinTV PVR 150 card with 5 streams
ivtv: Registered v4l2 device for encoder MPEG minor 1
ivtv: Create DMA encoder MPEG stream: 0 x 32768 buffers (0KB total)
ivtv: Registered v4l2 device for encoder YUV minor 33
ivtv: Create DMA encoder YUV stream: 0 x 10800 buffers (0KB total)
ivtv: Registered v4l2 device for encoder VBI minor 225
ivtv: Create DMA encoder VBI stream: 0 x 8736 buffers (0KB total)
ivtv: Registered v4l2 device for encoder PCM audio minor 25
ivtv: Create DMA encoder PCM audio stream: 0 x 4608 buffers (0KB total)
ivtv: Registered v4l2 device for encoder radio minor 65
ivtv: Create encoder radio stream
ivtv: Setting Tuner 56
tuner: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4)) by ivtv i2c driver #1
cx25840: decoder set norm NTSC
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
ivtv: Switching standard to NTSC.
cx25840: decoder set norm NTSC
ivtv: Initialized WinTV PVR 150, card #1
ivtv: ====================  END INIT IVTV  ====================
ivtv: Switching standard to PAL.
cx25840: decoder set norm PAL
ivtv: ivtv_enc_thread: pid = 2784, itv = 0xe10d5434
ivtv: ivtv_enc_vbi_thread: pid = 2785, itv = 0xe10d5434
cx25840: decoder disable output
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder set size 720x576 (from 720x580) -> scale  0x0, filter 0
ivtv: Switching standard to PAL.
cx25840: decoder set norm PAL
cx25840: decoder disable output
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder set size 720x576 (from 720x580) -> scale  0x0, filter 0


Up to here all looks well, the correct setting seems to be parsed as stated in de set_ivtv_params file but then, everything is reset to default values!

Code:
cx25840: decoder disable output
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder set picture bright=128 contrast=63 saturation=64 hue=0
cx25840: decoder set picture bright=128 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder disable output
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder disable output
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder set picture bright=128 contrast=63 saturation=64 hue=0
cx25840: decoder set picture bright=128 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder disable output
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (0)
input: PC Speaker


I must be missing something but I'm pretty much clueless right now.

Thanks for reading.

BTW, I started out with ivtv-0.3.6z with the same results.


Top
 Profile  
 
PostPosted: Thu Jul 21, 2005 11:17 pm 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
Well, off the top of my head: remember the PVR-500 is seen by ivtv as two separate PVR-150 cards. Some of the options in your ivtv file will need two arguments, not just one (e.g. 1,1 instead of just 1) or, alternately, don't add any options (though I hear that there are still problems with sound if you don't include something, perhaps due to module load order...things are in flux).

Also, when mythtv grabs a tuner, it also sends some ivtvctl commands, so you need to make sure that the settings you've given in mythtv-setup as well as things like screen sizes, etc. are all correct in mythtv.

If you're using the most recent development ivtv, you should also be subscribed to the ivtv-development list.

-brendan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 22, 2005 12:37 am 
Offline
Joined: Thu Jul 21, 2005 1:03 am
Posts: 3
Thanks brendan it looks like I'm on to someting now, if I don't start the mythbackend at boot I get to keep my settings.

Code:
ivtv: ====================  END INIT IVTV  ====================
ivtv: Switching standard to PAL.
cx25840: decoder set norm PAL
ivtv: ivtv_enc_thread: pid = 2786, itv = 0xe10d5434
ivtv: ivtv_enc_vbi_thread: pid = 2787, itv = 0xe10d5434
cx25840: decoder disable output
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder set size 720x576 (from 720x580) -> scale  0x0, filter 0
ivtv: Switching standard to PAL.
cx25840: decoder set norm PAL
cx25840: decoder disable output
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (7)
cx25840: now setting Tuner input
cx25840: set audio input (0)
cx25840: decoder set size 720x576 (from 720x580) -> scale  0x0, filter 0
input: PC Speaker


I'll dig into the mythtv settings more.

It would be nice if someone had a list of all configfiles in KnoppMyth that effects the ivtv driver.

_________________
KnoppMyth R5A16
PIII 1Ghz 512MB
PVR500
FX5200
SBLive


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 22, 2005 4:17 pm 
Offline
Joined: Thu Jul 21, 2005 1:03 am
Posts: 3
Update.

It seems that I tackled the problem. I switched both tuner settings to tuner 1 instead of tuner 0 in the myth-setup capture cards settings.

By doin this mythtv now seems to read the config file.

Code:
/etc/init.d/set_ivtv_params


I had to add the following line to get the right audio input.
Code:
$IVTVCTL -d /dev/video$f -q 1


Tailing /var/log/kern.log show nicely the correct settings.
Code:
Jul 23 00:05:48 mythtv kernel: ivtv: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
Jul 23 00:05:48 mythtv kernel: ivtv: Setup VBI API header 0x0000bd0d pkts 1 buffs 4 ln 36 sz 1456
Jul 23 00:05:48 mythtv kernel: ivtv: Setup VBI start 0x002fea04 frames 4 fpi 1 lines 0x00000140
Jul 23 00:05:49 mythtv kernel: cx25840: decoder disable output
Jul 23 00:05:49 mythtv kernel: cx25840: decoder enable output
Jul 23 00:05:49 mythtv kernel: cx25840: decoder set norm PAL
Jul 23 00:05:49 mythtv kernel: cx25840: decoder set input (7)
Jul 23 00:05:49 mythtv kernel: cx25840: now setting Tuner input
Jul 23 00:05:49 mythtv kernel: cx25840: set audio input (1)
Jul 23 00:06:02 mythtv kernel: cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
Jul 23 00:06:02 mythtv last message repeated 3 times
Jul 23 00:06:02 mythtv kernel: cx25840: decoder disable output
Jul 23 00:06:02 mythtv kernel: cx25840: decoder enable output
Jul 23 00:06:02 mythtv kernel: cx25840: decoder set norm PAL
Jul 23 00:06:02 mythtv kernel: cx25840: decoder set input (7)
Jul 23 00:06:02 mythtv kernel: cx25840: now setting Tuner input
Jul 23 00:06:02 mythtv kernel: cx25840: set audio input (1)
Jul 23 00:06:03 mythtv kernel: ivtv: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
Jul 23 00:06:03 mythtv kernel: ivtv: Setup VBI API header 0x0000bd0d pkts 1 buffs 4 ln 36 sz 1456
Jul 23 00:06:03 mythtv kernel: ivtv: Setup VBI start 0x002fea04 frames 4 fpi 1 lines 0x00000140
Jul 23 00:06:03 mythtv kernel: cx25840: decoder disable output
Jul 23 00:06:03 mythtv kernel: cx25840: decoder enable output
Jul 23 00:06:03 mythtv kernel: cx25840: decoder set norm PAL
Jul 23 00:06:03 mythtv kernel: cx25840: decoder set input (7)
Jul 23 00:06:03 mythtv kernel: cx25840: now setting Tuner input
Jul 23 00:06:03 mythtv kernel: cx25840: set audio input (1)


Works like a charm now. (well this part does, on to the next puzzle...)

_________________
KnoppMyth R5A16
PIII 1Ghz 512MB
PVR500
FX5200
SBLive


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu