Mailing List Archive

[Fwd: Re: video "features" - how to remove?]
On Sat, 2010-01-23 at 10:51 -0800, Tony Ross wrote:
> Andy Walls wrote:
>
> > # v4l2-dbg -d /dev/video0 -c host1
> > --list-registers=min=0x100,max=0x11f
> > ioctl: VIDIOC_DBG_G_REGISTER
> >
> > 00 04 08 0C 10 14
> > 18 1C 00000100: 76028430 07005d00 160e040f 002be2fe 005227ad
> > 00078c00 00000002 00000000 ^^^^
> > (This indicates you're accessing the CX23418 integrated digitizer)
>
> Some diferences here, not sure if they're important in any way:

Nope. Not at this point of verifying you can access the registers.

> # ./v4l2-dbg -c host1 --list-registers=min=0x100,max=0x11f
> ioctl: VIDIOC_DBG_G_REGISTER
>
> 00 04 08 0C 10 14 18
> 1C
> 00000100: d0008430 07005c00 210e040f 002be2fe 005227ad 00078c00 00000002
> 00000000

Good so far.


...
> > But honestly, I'd recommend using my "technician controls" for the
> > HVR-1600 first. They are in this oldish repository here:
> >
> > http://linuxtv.org/hg/~awalls/v4l-dvb-ctls/
> >
> > And an email on what they mean:
> > http://ivtvdriver.org/pipermail/ivtv-users/2009-August/009513.html
> >
> > It saves much of the bit counting on a number of registers I
> > recommended you might twiddle.
> ...
> > Again, if you can test with the HVR-1600 and the "technician controls"
> > patches, I'd do that.
>
> Thank you, the HVR-1600 is installed, the v4l-dvb-ctls-c9f13db7a53e.tar.bz2
> has been installed, /dev/video0 is functional (although the audio has some
> annoying static; can that be modified?)

The audio is probably fixed in a leter version of the driver. This repo
is a little old, but has the controls to make life easier for you. Once
you figure out the settings to fix the sync, we'll get those fixes on
the latest driver.


> and the dmesg output is:
>
> cx18: Start initialization, version 1.2.0
> cx18-0: Initializing card 0
> cx18-0: Autodetected Hauppauge card
> PCI: Enabling device 0000:03:05.0 (0010 -> 0012)
> ACPI: PCI Interrupt 0000:03:05.0[A] -> GSI 18 (level, low) -> IRQ 217
> cx18-0: cx23418 revision 01010000 (B)
[...]
> cx18-0: Initialized card: Hauppauge HVR-1600
> cx18: End initialization
> cx18-0: loaded v4l-cx23418-cpu.fw firmware (158332 bytes)
> cx18-0: loaded v4l-cx23418-apu.fw firmware V00120000 (141200 bytes)
> cx18-0: FW version: 0.0.74.0 (Release 2007/03/12)
> cx18-0 843: loaded v4l-cx23418-dig.fw firmware (16382 bytes)
> cx18-0 843: verified load of v4l-cx23418-dig.fw firmware (16382 bytes)
>
> A look at some of the registers you previously mentioned yields:
>
> # (for i in 0x402 0x40e 0x104 0x106; do ./v4l2-dbg --get-register=$i; done;
> ./v4l2-dbg --list-registers=min=0x488,max=0x49a) | grep -v VIDIOC
> Register 0x00000402 = e587h (58759d 11100101 10000111b)
> Register 0x0000040e = 1001e597h (268559767d 00010000 00000001 11100101
> 10010111b)
> Register 0x00000104 = e7900104h (3884974340d 11100111 10010000 00000001
> 00000100b)
> Register 0x00000106 = 6081e790h (1619126160d 01100000 10000001 11100111
> 10010000b)
>
> 00 04 08 0C 10 14 18
> 1C
> 00000480: e59f38a8 e5976060 e3a01000 e59f58a0 e59f88a0

You should check these against the CX25840/1/2/3 data sheet, so you can
understand what they mean.


> I'll confess some confusion about the use of the "technician controls" you
> mentioned in this version, as the v4l2-dbg output appears the same as the
> other code.

v4l2-ctl -d /dev/video0 -L should list a number of controls that the
standard driver does not have. This means you can *avoid* manipulating
registers by hand with v42-dbg (that's a good thing). The controls and
short explanations are listed in this post:

http://ivtvdriver.org/pipermail/ivtv-users/2009-August/009513.html

Quoting some of the more interesting controls for your problem:

> sync_tip_height (int) : min=0 max=255 step=1 default=220 value=220 flags=slider
>
> This is the height of the sync tip the timing circuitry is expecting or
> the AGC circuitry is aiming to achieve (I'm not sure which, maybe both).
> I don't know what the unit are.
>
>
> auto_sync_height_crush (bool) : default=1 value=1
>
> This control lets the digital front end adjust the sync_tip_height
> register downward, if a sync signal comes in that exceeds the range of
> the AGC. I;m not sure what the consequences are of turning it off.
> I've never seen mine adjust the sync_tip_height (not that I've looked
> alot).
>
>
> sync_acquired_error_threshold (int) : min=0 max=255 step=1 default=16 value=16 flags=slider
> sync_lost_error_threshold (int) : min=0 max=255 step=1 default=32 value=32 flags=slider
>
> These two are sync tracking lock declaration thresholds. If the
> measured sync signal is within the acquired error of the sync tip
> height, lock is declared. If the measrued sync signal is outside of the
> lost error tolerance, then the sync circuitry will delare sync was lost
> and begin a search algorithm.
>
> Note that the difference in values gives you some hysteresis. For
> meaningful operation, the acquire error threshold must be less than the
> lost error threshold.



> I also understand that the aforementioned registers were on the cx2584x
> chip. I'm not sure what registers to address on the cx18, as there's no
> datasheet for it at http://dl.ivtvdriver.org/datasheets/video and it would
> challenge my understanding to even find the pertinent data there if it were
> available.

The CX25840/1/2/3 datasheet should give you all the information that I
can give you.

If you use

v4l2-dbg -d /dev/video0 -c host1 ...
^^^^^^^^

then you get logically mapped into the registers as if the registers were
as specified in Chapter 5 of the CX25840/1/2/3 datasheet.


> Your (and Devin's, and anyone else's) help and guidance is much appreciated
> and needed.

If you read the CX2584x datasheet, you'll see that there is an Analog
Front End (Figure 3-1 and Figure 3-2 for a different perspective) and a
Digital Front End that follows it (Figure 3-4).

Note in Figure 3-4 the Analog front End feeds the Digital Front End at
the bottom of the Figure 3-4. The "Sample Rate Convert, Horizontal
Timing Loop" block near the bottom of Figure 3-4 is responsible for
finding and declaring the VSYNC and also tracking and declaring the
HSYNC.

If the sync signal is screwed up to the point that it is not cleaned up
after getting through that block, then you will notice line or frame
syncronization artifacts.


The Analog Front End is mostly controlled by registers in the
0x100-0x1ff range.

The rest of Video Processing including the Digital Front End and control
loops for the Analog Front End are controlled by the registes in the
0x400-0x4ff range.


All of the "technician" controls were added to help someone out with a
Security camera that appeared to have a horizontal sync tip problem.
You will probably want to ignore the Chroma related controls, as the
sync comes in on the Luma.


> I may be able to find someone with knowledge of how to use their storage
> oscilloscope. May I ask if it would somehow be helpful to grab the data
> associated with one of the problem areas on the tape? What sort of request
> should I make of the technician? I'm not familiar with such an instrument,
> but if it's possible to email some kind of file with the "sillyscope"
> output, then what would work best for you,

Yes.

I would need to see a capture of a line with normal hsyncs for the VCR
along with the hysncs for distorted lines (Which may rule out
triggering on the falling edge of hysnc - I don't know). It would also
be nice if the signal were not AC coupled, so I can see the DC levels.

*If* you are having a problem with vertical sync of hsync at the top of
a field as well (I didn't look at the problem video yet, I have a low BW
Internet connection), then also at the end of a field, if he could
capture all the "lines" of double rate HSYNC, the "lines" of VSYNC, and
the "lines" of double rate equlization HSYNCs , then that could help.

I don't have any scope myself, so any sort of graphics file would work
or a files with data and a documented format (so I could decode it)
would be fine.

Regards,
Andy

> if indeed you're willing and have
> the time to deal with such a task?
>


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