Aaron Bonner was correct.  I have the PVR-150 and was unable to get
the audio working also.  The tuner audio came through when composite
input was selected however.  I tried to apply his patch but it gave me
some errors and it was ineffective.  I begin comparing the differences
between the two inputs and narrowed done three changes that need to be
made.

On a side note, I have only been able to get the tuner=50 from
video4linux snapshot sources to work correctly.  I can tune every
channel with this one.  Stubs included in ivtv sources do not work,
and type=47 (as some have suggesed) does not tune correclty but only
show video for the default frequency it starts at.  No tuner in 2.6.10
i tried worked correctly.  If this tuner is in the kernel sources I
dont know which number it is.  tuner.c in the kernel source and
video4linux source diverge somewhere in the 40s i believe so they have
incompitable numbering schemes.  I didnt look very hard since I use
video4linux snapshots.  The mpeg looks a little grainy when I play it
directly from mplayer after loading the modules.  However after
playing it in mythtv the grainyness goes away.  I compared ivtvctl
dumps from before and after but they are identical.  Perhaps I am
missing something or it is just weird.  And I think I read in the
readme file that brightness/contrast/hue/saturation where not
implemented yet so the values shouldnt matter.  It was also said that
scaling was not implemented yet either.  I can confirm this because
capture at smaller resolution results in cropped video.

I included my patch file.  I tested it against ivtv-0.3.2b source.  I
noted the significant items below.  I imagine this patch would break
audio for PAL users as it appears to be handled differently.  Perhaps
NTSC audio does go through wm8775.  Soemone would eventually need to
test this against PAL and add appropriate code to handle either case. 
It works great in mythtv and mplayer can play /dev/video0 without any
problem with great audio.  I have not tested the lirc patch someone
sent in a earlier thread, but hope to work on that this evening.

decoder_set_input case 6 (tuner) in cx258840-driver.c

CX25840_SET_AUX_PLL_POST(0x0018), //was 0x0020 but causes distortation
without composite setting

CX25840_SET_PATH1_SEL_CTL(0x0002), //was 0x0000 this one appears to
select the audio input

CX25840_SET_START_MICROCNTL(0x0000), // FW Start was 0x0001, but dont
get audio if firmware is started

This of course leaves composite audio still broken and havent tested
svideo, but i imagine it uses same audio configuration as composite
and will be broken.  Will have to try find correct audio mux select
line for it later.

I suppose it is out of the question to get a datasheet that explains
what all these commands do.  Kudos to Ulf for deciphering this chip or
snagging a datasheet somewhere.  Goodluck!  Please share successful
configurations.

My current configuation is:

Linux version 2.6.10 ([EMAIL PROTECTED]) (gcc version 3.3.4 20040623 (Gentoo
Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)) #1 Mon Jan 3 14:54:38 EST
2005

8KB stacks, non SMP, Preemptible, no regparms.

IVTV 0.3.2b
video4linux-20050111-141748

Hauppauge PVR-150 model 1045 (NTSC)

START load.sh (videodev already loaded)
insmod driver/cx25840.ko debug=1
insmod /usr/src/video4linux/tuner.ko debug=1
insmod driver/wm8775.ko debug=1
insmod driver/ivtv.ko ivtv_std=0 tuner=50
END load.sh

Messages:
Jan 12 17:10:54 lotus kernel: cx25840: Ignoring new-style parameters
in presence of obsolete ones
Jan 12 17:10:54 lotus kernel: wm8775: Ignoring new-style parameters in
presence of obsolete ones
Jan 12 17:10:54 lotus kernel: ivtv: ==================== START INIT
IVTV ====================
Jan 12 17:10:54 lotus kernel: ivtv: version 0.3.2 (a) loading
Jan 12 17:10:54 lotus kernel: ivtv: Linux version: 2.6.10 preempt K7 gcc-3.3
Jan 12 17:10:54 lotus kernel: ivtv: In case of problems please include
the debug info
Jan 12 17:10:54 lotus kernel: ivtv: between the START INIT IVTV and
END INIT IVTV lines when
Jan 12 17:10:54 lotus kernel: ivtv: mailing the ivtv-devel mailinglist. 
Jan 12 17:10:54 lotus kernel: ivtv: Autodetected WinTV PVR 150 card
Jan 12 17:10:54 lotus kernel: ivtv: Found an iTVC16 based chip 
Jan 12 17:10:54 lotus kernel: ACPI: PCI interrupt 0000:00:09.0[A] ->
GSI 11 (level, low) -> IRQ 11
Jan 12 17:10:54 lotus kernel: ivtv: VIA PCI device: 0x3116 vendor: 0x1106
Jan 12 17:10:58 lotus kernel: cx25840: FW image
'/lib/modules/HcwMakoA.ROM' of size 13883 loaded.
Jan 12 17:10:58 lotus kernel: cx25840: FW image md5 digest:
a6f6a90a3be338cdb89d59e835798408
Jan 12 17:10:58 lotus kernel: cx25840: FW image sha1 digest:
ad2872fb98ad43b6c4afa45d239a57010edebe84
Jan 12 17:10:58 lotus kernel: ivtv: i2c attach [client=cx25840[0],ok]
Jan 12 17:10:58 lotus kernel: tuner: chip found at addr 0xc2 i2c-bus
ivtv i2c driver #0
Jan 12 17:10:58 lotus kernel: ivtv: i2c attach [client=(tuner unset),ok]
Jan 12 17:10:58 lotus kernel: ivtv: i2c attach [client=wm8775[0],ok]
Jan 12 17:10:59 lotus kernel: ivtv: Encoder revision: 0x02050032
Jan 12 17:10:59 lotus kernel: ivtv: Encoder Firmware may be buggy, use
version 0x02040011
Jan 12 17:10:59 lotus kernel: ivtv: Configuring WinTV PVR 150 card
with 4 streams
Jan 12 17:10:59 lotus kernel: ivtv: Create DMA stream 0 using 256
16384 byte buffers  4194304 kbytes total
Jan 12 17:10:59 lotus kernel: ivtv: Registered v4l2 device, streamtype 0 minor 0
Jan 12 17:10:59 lotus kernel: ivtv: Create DMA stream 1 
Jan 12 17:10:59 lotus kernel: ivtv: Registered v4l2 device, streamtype
1 minor 32
Jan 12 17:10:59 lotus kernel: ivtv: Create stream 2 using 40 52224
byte buffers  2097152 kbytes total
Jan 12 17:10:59 lotus kernel: ivtv: Registered v4l2 device, streamtype
2 minor 224
Jan 12 17:10:59 lotus kernel: ivtv: Create DMA stream 3 using 455 4608
byte buffers  2097152 kbytes total
Jan 12 17:10:59 lotus kernel: ivtv: Registered v4l2 device, streamtype
3 minor 24
Jan 12 17:10:59 lotus kernel: ivtv: Setting Tuner 50
Jan 12 17:10:59 lotus kernel: tuner: type set to 50 (TCL 2002N) by
ivtv i2c driver #0
Jan 12 17:10:59 lotus kernel: tuner: tv freq set to 67.25
Jan 12 17:10:59 lotus kernel: tv: VHF lowrange
Jan 12 17:10:59 lotus kernel: tuner: tv 0x07 0x10 0x8e 0x01
Jan 12 17:10:59 lotus kernel: ivtv: ivtv_enc_thread: pid = 6821, itv =
0xe0c794e0
Jan 12 17:10:59 lotus kernel: ivtv: Switching standard to NTSC.
Jan 12 17:10:59 lotus kernel: tv: VHF lowrange
Jan 12 17:10:59 lotus kernel: tuner: tv 0x07 0x10 0x8e 0x01
Jan 12 17:10:59 lotus kernel: ivtv: Initialized WinTV PVR 150, card #0
Jan 12 17:10:59 lotus kernel: ivtv: ====================  END INIT
IVTV  ====================
Jan 12 17:22:07 lotus kernel: tuner: tv freq set to 271.25
Jan 12 17:22:07 lotus kernel: tv: VHF high range 
Jan 12 17:22:07 lotus kernel: tuner: tv 0x13 0xd0 0x8e 0x02
Jan 12 17:29:06 lotus kernel: tuner: tv freq set to 547.25
Jan 12 17:29:06 lotus kernel: tv: UHF range
Jan 12 17:29:06 lotus kernel: tuner: tv 0x25 0x10 0x8e 0x08
Jan 12 17:29:52 lotus kernel: tuner: tv freq set to 271.25
Jan 12 17:29:52 lotus kernel: tv: VHF high range 
Jan 12 17:29:52 lotus kernel: tuner: tv 0x13 0xd0 0x8e 0x02
Jan 12 17:46:55 lotus kernel: ivtv: Removing Card #0.
Jan 12 17:46:56 lotus kernel: ivtv: Removed WinTV PVR 150, card #0


On 15 Jan 2005 15:24:20 -0000, Matt <[EMAIL PROTECTED]> wrote:
>  
> I tried your suggestions and I am able to get some crackling with the audio
> but I still can't get a video signal. I ran "ivtvctl -a" and noticed the
> following. 
>  
>  ioctl: VIDIOC_G_STD 
>  Standard = 0x00003000 
>  ioctl: VIDIOC_QUERYCTRL 
>  Brightness = -761183072 
>  Contrast = -384250599 
>  Saturation = -881205648 
>  Hue = 0 
>  Volume = 65535 
>  Mute = 1 
>  
>  notice the values for Brightness, Contrast and Saturation. These values are
> set correctly when I use the version "a" driver which incidently also gives
> good video. Also, I can't seem to change any of the values using ivtvctl. 
>  
> 
> 
> _________________________________________________________________Get your
> FREE Budweiser E-mail account at http://budweiser.com Budweiser E-Mail must
> be used responsibly and only is for consumers 21 years of age and older!
> Disclaimer: Neither Anheuser-Busch, Inc. (the makers of BUDWEISER beer) nor
> the operator of this E-Mail service or their respective affiliates have
> seen, endorsed or approved any of the content in this e-mail and expressly
> disclaim all liability for the content in whole and in part.
>

Attachment: ntscaudio.patch
Description: Binary data

Reply via email to