Mailing List Archive

HVR-1600 Analog issue
AMD64, 2.6.35-23 (ubuntu), hvr1600 w/ TCL M30WTP-4N-E tuner

OTA Digital works great out-of the-box. Analog has been a pita though. I've
tried forcing the tuner to a known working channel and dumped the mpeg
stream to a file for review. Everything turns up with a blank red screen.
Tried setting vmalloc=256M just for fun (it didn't seem to be a necessity)
but same results. Using mythtv's channel scanner, every single channel
scanned locks and is added to the database. Not even the channels that
should be working show up in LiveTV, though - just blank red screen. There
is no cable box involved here and the cable works just fine otherwise.

dmsg| grep cx18
[ 23.370875] cx18: Start initialization, version 1.4.0
[ 23.370912] cx18-0: Initializing card 0
[ 23.370916] cx18-0: Autodetected Hauppauge card
[ 23.370990] cx18 0000:02:00.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[ 23.376071] cx18-0: cx23418 revision 01010000 (B)
[ 23.628748] cx18-0: Autodetected Hauppauge HVR-1600
[ 23.628750] cx18-0: Simultaneous Digital and Analog TV capture supported
[ 25.250796] tuner 2-0043: chip found @ 0x86 (cx18 i2c driver #0-1)
[ 25.416319] tuner 2-0061: chip found @ 0xc2 (cx18 i2c driver #0-1)
[ 25.691922] cs5345 1-004c: chip found @ 0x98 (cx18 i2c driver #0-0)
[ 26.646320] cx18-0: Registered device video0 for encoder MPEG (64 x 32.00
kB)
[ 26.646324] DVB: registering new adapter (cx18)
[ 27.293734] cx18-0: DVB Frontend registered
[ 27.293737] cx18-0: Registered DVB adapter0 for TS (32 x 32.00 kB)
[ 27.293767] cx18-0: Registered device video32 for encoder YUV (20 x
101.25 kB)
[ 27.293795] cx18-0: Registered device vbi0 for encoder VBI (20 x 51984
bytes)
[ 27.293820] cx18-0: Registered device video24 for encoder PCM audio (256
x 4.00 kB)
[ 27.293823] cx18-0: Initialized card: Hauppauge HVR-1600
[ 27.293845] cx18: End initialization
[ 27.604590] cx18-alsa: module loading...
[ 28.455730] cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
[ 28.985414] cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000 (141200
bytes)
[ 29.013554] cx18-0: FW version: 0.0.74.0 (Release 2007/03/12)
[ 30.236535] cx18-0 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
[ 30.273337] cx18-0 843: verified load of v4l-cx23418-dig.fw firmware
(16382 bytes)

dmesg | grep tveeprom
[ 23.628728] tveeprom 1-0050: Hauppauge model 74041, rev C6G8, serial#
7249596
[ 23.628733] tveeprom 1-0050: MAC address is 00:0d:fe:6e:9e:bc
[ 23.628736] tveeprom 1-0050: tuner model is TCL M30WTP-4N-E (idx 168,
type 85)
[ 23.628739] tveeprom 1-0050: TV standards NTSC(M) (eeprom 0x08)
[ 23.628741] tveeprom 1-0050: audio processor is CX23418 (idx 38)
[ 23.628744] tveeprom 1-0050: decoder processor is CX23418 (idx 31)
[ 23.628746] tveeprom 1-0050: has no radio, has IR receiver, has IR
transmitter

Thoughts? Suggestions? Wild speculation?
--
View this message in context: http://ivtv-users.838874.n2.nabble.com/HVR-1600-Analog-issue-tp5802291p5802291.html
Sent from the ivtv users mailing list archive at Nabble.com.

_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: HVR-1600 Analog issue [ In reply to ]
On 12/03/10 23:47, joshr wrote:
>
> AMD64, 2.6.35-23 (ubuntu), hvr1600 w/ TCL M30WTP-4N-E tuner
>
> OTA Digital works great out-of the-box. Analog has been a pita though. I've
> tried forcing the tuner to a known working channel and dumped the mpeg
> stream to a file for review. Everything turns up with a blank red screen.
> Tried setting vmalloc=256M just for fun (it didn't seem to be a necessity)
> but same results. Using mythtv's channel scanner, every single channel
> scanned locks and is added to the database. Not even the channels that
> should be working show up in LiveTV, though - just blank red screen. There
> is no cable box involved here and the cable works just fine otherwise.
>
<snip>
> Thoughts? Suggestions? Wild speculation?

I have a pair of hvr-1600s, and occasionally have red-screen problems.
When it hits me, I do a complete power-off, including the hard switch on
the back of the power supply. (or unplug the cord) Then upon power-up,
all is well again. I also occasionally have no sound, and that can be
fixed unloading and reloading the drivers.

Dale Pontius

_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: HVR-1600 Analog issue [ In reply to ]
On Fri, 2010-12-03 at 20:47 -0800, joshr wrote:
> AMD64, 2.6.35-23 (ubuntu), hvr1600 w/ TCL M30WTP-4N-E tuner
>
> OTA Digital works great out-of the-box. Analog has been a pita though. I've
> tried forcing the tuner to a known working channel and dumped the mpeg
> stream to a file for review. Everything turns up with a blank red screen.
> Tried setting vmalloc=256M just for fun (it didn't seem to be a necessity)
> but same results. Using mythtv's channel scanner, every single channel
> scanned locks and is added to the database. Not even the channels that
> should be working show up in LiveTV, though - just blank red screen. There
> is no cable box involved here and the cable works just fine otherwise.

> Thoughts? Suggestions? Wild speculation?

This has been reported before, but there is no known solution.

<speculation type=mild>
Either the CX23418's intergrated '843 Audio/Video decoder isn't
converting the analog signals into video and audio properly, or the
video data isn't successfuly getting written into the DDR RAM on the
HVR-1600.
</speculation>

<speculation type=wild>
The root cause may be:

- some PCI bus errors during driver load that messes up the setup of the
CX23418's A/V decoder or RAM controller.

- you have a marginal or defective HVR-1600 or something about your
systems' PCI bus or power is marginal.

- some kernel bug somewhere trashing the the CX23418 register space.
</speculation>


If the problem is reliably reproducable you could:

1. Try the HVR-1600 in a Windows box to see if it is defective

2. Try the HVR-1600 under Windows on the problem machine

3. Remove all uneeded PCI cards and USB devices, and see if it works
when there is less power draw by peripherials.

4. ensure you're not using the closed source drivers with your kernel.
The CX23418 register space is 32 MB, That's a big target in kernel
space for a kernel or driver bug to hit with an errant stray write.

Those are just suggestions. None are guaranteed to be sane or make
anything better.

You can dump the cx23418's '843 register space (from 0x0 - 0x9ff) with
v4l2-dbg. However IIRC, the last time someone provided that for the red
screen problem, all the '843 registers looked OK.

Regards,
Andy


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: HVR-1600 Analog issue [ In reply to ]
Andy - thanks for the excellent speculation!

Follow-up: Frustration got the best of me after being unable to obtain
any useful debug output from the tveeprom and cx18 drivers. I
reinstalled, going from ubuntu 10.10 proper to mythbuntu 10.10. Upon
reinstall, symptoms went from every channel locking in the mythtv
scanner to no channels locking. On a lark, I switched to the nouveau X
driver from the proprietary nvidia driver (the stock nv driver didn't
seem to like the HDMI output on my card). Upon doing so, I was finally
able to obtain expected output from the analog portion of the card and
the mythtv channel scan completed successfully.

I'd be curious to know if a switch to the nouveau driver rectifies
this issue for anyone else.

thanks,
josh restivo

On Sat, Dec 4, 2010 at 2:04 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> On Fri, 2010-12-03 at 20:47 -0800, joshr wrote:
>> AMD64, 2.6.35-23 (ubuntu), hvr1600 w/ TCL M30WTP-4N-E tuner
>>
>> OTA Digital works great out-of the-box. Analog has been a pita though. I've
>> tried forcing the tuner to a known working channel and dumped the mpeg
>> stream to a file for review. Everything turns up with a blank red screen.
>> Tried setting vmalloc=256M just for fun (it didn't seem to be a necessity)
>> but same results. Using mythtv's channel scanner, every single channel
>> scanned locks and is added to the database. Not even the channels that
>> should be working show up in LiveTV, though - just blank red screen. There
>> is no cable box involved here and the cable works just fine otherwise.
>
>> Thoughts? Suggestions? Wild speculation?
>
> This has been reported before, but there is no known solution.
>
> <speculation type=mild>
> Either the CX23418's intergrated '843 Audio/Video decoder isn't
> converting the analog signals into video and audio properly, or the
> video data isn't successfuly getting written into the DDR RAM on the
> HVR-1600.
> </speculation>
>
> <speculation type=wild>
> The root cause may be:
>
> - some PCI bus errors during driver load that messes up the setup of the
> CX23418's A/V decoder or RAM controller.
>
> - you have a marginal or defective HVR-1600 or something about your
> systems' PCI bus or power is marginal.
>
> - some kernel bug somewhere trashing the the CX23418 register space.
> </speculation>
>
>
> If the problem is reliably reproducable you could:
>
> 1. Try the HVR-1600 in a Windows box to see if it is defective
>
> 2. Try the HVR-1600 under Windows on the problem machine
>
> 3. Remove all uneeded PCI cards and USB devices, and see if it works
> when there is less power draw by peripherials.
>
> 4. ensure you're not using the closed source drivers with your kernel.
> The CX23418 register space is 32 MB,  That's a big target in kernel
> space for a kernel or driver bug to hit with an errant stray write.
>
> Those are just suggestions.  None are guaranteed to be sane or make
> anything better.
>
> You can dump the cx23418's '843 register space (from 0x0 - 0x9ff) with
> v4l2-dbg.  However IIRC, the last time someone provided that for the red
> screen problem, all the '843 registers looked OK.
>
> Regards,
> Andy
>
>

_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: HVR-1600 Analog issue [ In reply to ]
Josh,

Thanks for the follow-up report. :)

On Sun, 2010-12-05 at 07:54 -0600, Josh Restivo wrote:
> Andy - thanks for the excellent speculation!

You're welcome. (But I now wonder what metrics and criteria should be
applied to measure the "goodness" of speculation. ;)

> Follow-up: Frustration got the best of me after being unable to obtain
> any useful debug output from the tveeprom and cx18 drivers. I
> reinstalled, going from ubuntu 10.10 proper to mythbuntu 10.10. Upon
> reinstall, symptoms went from every channel locking in the mythtv
> scanner to no channels locking. On a lark, I switched to the nouveau X
> driver from the proprietary nvidia driver (the stock nv driver didn't
> seem to like the HDMI output on my card). Upon doing so, I was finally
> able to obtain expected output from the analog portion of the card and
> the mythtv channel scan completed successfully.

OK, good to know.

There is a kernel bug somewhere that is trashing a portion of the
CX23418 registers and on-card RAM. That's a 64 MB region in vmalloc
address space, that nothing but the cx18 driver should be reading or
writing.

This explanation is consistent with Dale Pontius' occasional red screen
problem after boot up, if we assume things in the kernel occasionally
get initialized or allocated in a different order on boot up.


It could be a bug in the kernel memory allocator or virtual memory
mapping (doubtful) or a bug in some other driver in the kernel (more
likely). Although I would like to blame the nv driver, we can't know
for sure it is the culprit, since *any* code in kernel address space
could be at fault.

One may be able to trap kernel writes to the addresses shown in

# cat /proc/iomem | grep cx18

and check if the cx18 driver did it or something else.

The in kernel MMIO trace could be used and looking at the "Map ID" that
accesses the CX23418 IO region, and then convert that "MAP ID" back to
the driver that created the IO mapping. But the Kernel MMIO tracer
would have to be started before any of the suspected culprit device
drivers are started:

http://www.mjmwired.net/kernel/Documentation/trace/mmiotrace.txt

I'm not sure how much of that is actually possible.


> I'd be curious to know if a switch to the nouveau driver rectifies
> this issue for anyone else.


Dale,

Do you use Ubuntu and/or the nv driver in your machine?

Regards,
Andy

> thanks,
> josh restivo
>
> On Sat, Dec 4, 2010 at 2:04 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> > On Fri, 2010-12-03 at 20:47 -0800, joshr wrote:
> >> AMD64, 2.6.35-23 (ubuntu), hvr1600 w/ TCL M30WTP-4N-E tuner
> >>
> >> OTA Digital works great out-of the-box. Analog has been a pita though. I've
> >> tried forcing the tuner to a known working channel and dumped the mpeg
> >> stream to a file for review. Everything turns up with a blank red screen.
> >> Tried setting vmalloc=256M just for fun (it didn't seem to be a necessity)
> >> but same results. Using mythtv's channel scanner, every single channel
> >> scanned locks and is added to the database. Not even the channels that
> >> should be working show up in LiveTV, though - just blank red screen. There
> >> is no cable box involved here and the cable works just fine otherwise.
> >
> >> Thoughts? Suggestions? Wild speculation?
> >
> > This has been reported before, but there is no known solution.
> >
> > <speculation type=mild>
> > Either the CX23418's intergrated '843 Audio/Video decoder isn't
> > converting the analog signals into video and audio properly, or the
> > video data isn't successfuly getting written into the DDR RAM on the
> > HVR-1600.
> > </speculation>
> >
> > <speculation type=wild>
> > The root cause may be:
> >
> > - some PCI bus errors during driver load that messes up the setup of the
> > CX23418's A/V decoder or RAM controller.
> >
> > - you have a marginal or defective HVR-1600 or something about your
> > systems' PCI bus or power is marginal.
> >
> > - some kernel bug somewhere trashing the the CX23418 register space.
> > </speculation>
> >
> >
> > If the problem is reliably reproducable you could:
> >
> > 1. Try the HVR-1600 in a Windows box to see if it is defective
> >
> > 2. Try the HVR-1600 under Windows on the problem machine
> >
> > 3. Remove all uneeded PCI cards and USB devices, and see if it works
> > when there is less power draw by peripherials.
> >
> > 4. ensure you're not using the closed source drivers with your kernel.
> > The CX23418 register space is 32 MB, That's a big target in kernel
> > space for a kernel or driver bug to hit with an errant stray write.
> >
> > Those are just suggestions. None are guaranteed to be sane or make
> > anything better.
> >
> > You can dump the cx23418's '843 register space (from 0x0 - 0x9ff) with
> > v4l2-dbg. However IIRC, the last time someone provided that for the red
> > screen problem, all the '843 registers looked OK.
> >
> > Regards,
> > Andy
> >



_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: HVR-1600 Analog issue [ In reply to ]
On 12/05/10 16:26, Andy Walls wrote:
<snip>
> This explanation is consistent with Dale Pontius' occasional red screen
> problem after boot up, if we assume things in the kernel occasionally
> get initialized or allocated in a different order on boot up.
<snip>
> Dale,
>
> Do you use Ubuntu and/or the nv driver in your machine?
>
Just saw this thread and my name in it, sorry for taking so long to
respond. Everything I've run MythTV on so far has used the nvidia
drivers. All of my systems run Gentoo. For a while both of my kids
were running Ubuntu 9.04, and I believe I moved them both to the
proprietary binaries. When I installed those systems nouveau was
nowhere near ready, and nv was just too slow.

I just realized that nothing on a client machine matters - you're
looking for interactions on the backend machine. My backend machine has
2 hvr-1600s, an nVidia 6200 running Gentoo's "stable" driver selection,
currently 260.19.29. I also have "vmalloc=256MB" on the kernel command
line. Oh, and some time back, perhaps late spring, I moved to in-kernel
drivers for the hvr-1600s. (If you need more info, just let me know.)

Incidentally, I don't believe I've had any red-screen problems since
this past summer. I don't appear to have enough kernel history laying
around, but I believe they stopped somewhere around 2.6.34 or 2.6.35.
Nor is it easy to time-slide a level of nvidia-drivers, either. I never
noticed exactly when they stopped - it's one of those things where one
day it dawns on you that something annoying is gone.

By the same token, I haven't had the silent audio problem on either
hvr-1600 recently, either. Again, I don't have an exact date, but it
kept happening after the red-screen stopped. It may well have stopped
when I started running 2.6.36. I don't believe the disappearance of
that problem time-aligns well with any nvidia-drivers update.

Dale

_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users