Mailing List Archive

cx18: horizontal sync issue with analog composite 1 input
We have 3 cx18 cards installed in a rhel5 box with the latest drivers
installed.

Audio recording is ok, but the video appears to have no horizontal sync.

I have searched the archives as well as the ³normal² places and have came up
short.

Any suggestions?

Thanks.

Tom
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
Sorry to post so soon, I fixed it by upping the gain on the cards.

Thanks!


On 7/22/09 1:08 PM, "Tom Ryan" <tomryan@camlaw.rutgers.edu> wrote:

> We have 3 cx18 cards installed in a rhel5 box with the latest drivers
> installed.
>
> Audio recording is ok, but the video appears to have no horizontal sync.
>
> I have searched the archives as well as the ³normal² places and have came up
> short.
>
> Any suggestions?
>
> Thanks.
>
> Tom
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
Well, it worked good for a day and then started sync issues again. We have narrowed the issue down to the particular device connected to the analog composite input (a sony SSC-DC374 camera). If we connect a vcr or a sony handycam to the cable, all is perfect. If we connect a tv (instead of the card) to the cable, the output from the SSC is perfect.

The camera has an AGC (automatic gain correction) as well as a level adjustment. We have tried adjusting them to various levels and settings to no avail. (We have not worked the full gamut though :)

Any ideas, an option to the module load, etc that we're missing???

Thanks!

Tom


-----Original Message-----
From: Tom Ryan
Sent: Wed 7/22/2009 1:52 PM
To: ivtv-users@ivtvdriver.org
Subject: Re: cx18: horizontal sync issue with analog composite 1 input

Sorry to post so soon, I fixed it by upping the gain on the cards.

Thanks!


On 7/22/09 1:08 PM, "Tom Ryan" <tomryan@camlaw.rutgers.edu> wrote:

> We have 3 cx18 cards installed in a rhel5 box with the latest drivers
> installed.
>
> Audio recording is ok, but the video appears to have no horizontal sync.
>
> I have searched the archives as well as the ³normal² places and have came up
> short.
>
> Any suggestions?
>
> Thanks.
>
> Tom
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On Thu, 2009-07-23 at 17:19 -0400, Tom Ryan wrote:
> Well, it worked good for a day and then started sync issues again. We
> have narrowed the issue down to the particular device connected to the
> analog composite input (a sony SSC-DC374 camera). If we connect a vcr
> or a sony handycam to the cable, all is perfect. If we connect a tv
> (instead of the card) to the cable, the output from the SSC is
> perfect.
>
> The camera has an AGC (automatic gain correction) as well as a level
> adjustment. We have tried adjusting them to various levels and
> settings to no avail. (We have not worked the full gamut though :)
>
> Any ideas, an option to the module load, etc that we're missing???

There are no module options to set for this, nor user controls.

The horizontal sync problem that I am aware of is rare but it does
happen. Normally the first few lines of a frame, espcially when going
from a dark image to a light image, will not sync, but most lines of the
image will be OK. It arsies due to an unfortunate combination of
circumstances. It usually exhibits a few "false" syncs, not usually
complete loss of hsync. It can be fixed with adaptive reconfiguration
of the AGC and +12 dB boost in the CX23418 A/V core.

Complete loss of horizontal sync is something that I would not expect,
unless you have a really weak signal or one with a large DC offset.

If you look in cx18-av-core.c:cx18_av_initialize() there is a comment
that states the droop compenstation, sync tip clamping, and extra +12 dB
is disabled for all three analog input channels. Turning one or more of
those on may fix your problem.

The analog front end is reconfigured on every input switch near the end
of cx18-av-core.c:set_input(), BTW.

So:

1. What card are you using?
2. What driver version are you using?
3. How did you "up the gain on the cards" before?
4. What is the output of v4l2-ctl -d /dev/videoN --log-status when you
don't have horizontal lock and when you do?
5. Do you have an oscilliscope to look at the video signal coming out
from the SSC-DC374 to compare it with a known working video signal?
(It'll take the guessing out of troubleshooting)

You may also want to try the quick hack of a patch below. It will make
tuning operations and input switches take ~1/3 of a second though.


Regards,
Andy

diff -r 892610bec939 linux/drivers/media/video/cx18/cx18-av-core.c
--- a/linux/drivers/media/video/cx18/cx18-av-core.c Wed Jul 22 20:24:53 2009 -0400
+++ b/linux/drivers/media/video/cx18/cx18-av-core.c Thu Jul 23 20:25:20 2009 -0400
@@ -560,6 +560,16 @@
v |= 0x10;
cx18_av_write_expect(cx, 0x803, v, v, 0x1f);
}
+
+ cx18_msleep_timeout(300, 0);
+ v = cx18_av_read(cx, CXADEC_DFE_CTRL1);
+ if (v > 0x35) {
+ /*
+ * Variable Gain Amplifier adjustment settled at > +8.38 dB, so
+ * enable +12 dB for channel 0: CVBS or Y input
+ */
+ cx18_av_and_or4(cx, CXADEC_AFE_CTRL, 0xFFFFFFFE, 0x00000001);
+ }
}

static int cx18_av_s_frequency(struct v4l2_subdev *sd,





> Thanks!
>
> Tom
>
>
> -----Original Message-----
> From: Tom Ryan
> Sent: Wed 7/22/2009 1:52 PM
> To: ivtv-users@ivtvdriver.org
> Subject: Re: cx18: horizontal sync issue with analog composite 1 input
>
> Sorry to post so soon, I fixed it by upping the gain on the cards.
>
> Thanks!
>
>
> On 7/22/09 1:08 PM, "Tom Ryan" <tomryan@camlaw.rutgers.edu> wrote:
>
> > We have 3 cx18 cards installed in a rhel5 box with the latest
> drivers
> > installed.
> >
> > Audio recording is ok, but the video appears to have no horizontal
> sync.
> >
> > I have searched the archives as well as the ³normal² places and have
> came up
> > short.
> >
> > Any suggestions?
> >
> > Thanks.
> >
> > Tom
>
>
>
>
>
> _______________________________________________
> ivtv-users mailing list
> ivtv-users@ivtvdriver.org
> http://ivtvdriver.org/mailman/listinfo/ivtv-users


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
My answers are below..


On 7/23/09 8:28 PM, "Andy Walls" <awalls@radix.net> wrote:

> On Thu, 2009-07-23 at 17:19 -0400, Tom Ryan wrote:
>> > Well, it worked good for a day and then started sync issues again. We
>> > have narrowed the issue down to the particular device connected to the
>> > analog composite input (a sony SSC-DC374 camera). If we connect a vcr
>> > or a sony handycam to the cable, all is perfect. If we connect a tv
>> > (instead of the card) to the cable, the output from the SSC is
>> > perfect.
>> >
>> > The camera has an AGC (automatic gain correction) as well as a level
>> > adjustment. We have tried adjusting them to various levels and
>> > settings to no avail. (We have not worked the full gamut though :)
>> >
>> > Any ideas, an option to the module load, etc that we're missing???
>
> 1. What card are you using?
> 2. What driver version are you using?
>
> Driver name : cx18
> Card type : Hauppauge HVR-1600
> Bus info : PCI:0000:01:08.0
> Driver version: 66048
>
>
> 3. How did you "up the gain on the cards" before?
>
> -c cx23418 -s 0x104 0x1
>
> 4. What is the output of v4l2-ctl -d /dev/videoN --log-status when you
> don't have horizontal lock and when you do?
>
> no change
>
> 5. Do you have an oscilliscope to look at the video signal coming out
> from the SSC-DC374 to compare it with a known working video signal?
> (It'll take the guessing out of troubleshooting)
>
> I do not. The patch didn¹t help..
>
> in case this helps
>
I found a user with the similar issue with another hauppauge card.

http://www.videohelp.com/forum/archive/hsync-issue-on-composite-capture-pvr5
00-t334215.html?layout=0&layoutalign=Center


???????

Should I just get new cameras? Are there ones that people know will work???
:)

Thanks!

Tom
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On Tue, 2009-07-28 at 14:30 -0400, Tom Ryan wrote:
> My answers are below..
>
>
> On 7/23/09 8:28 PM, "Andy Walls" <awalls@radix.net> wrote:
>
> On Thu, 2009-07-23 at 17:19 -0400, Tom Ryan wrote:
> > Well, it worked good for a day and then started sync issues
> again. We
> > have narrowed the issue down to the particular device
> connected to the
> > analog composite input (a sony SSC-DC374 camera). If we
> connect a vcr
> > or a sony handycam to the cable, all is perfect. If we
> connect a tv
> > (instead of the card) to the cable, the output from the SSC
> is
> > perfect.
> >
> > The camera has an AGC (automatic gain correction) as well as
> a level
> > adjustment. We have tried adjusting them to various levels
> and
> > settings to no avail. (We have not worked the full gamut
> though :)
> >
> > Any ideas, an option to the module load, etc that we're
> missing???
>
> 1. What card are you using?
> 2. What driver version are you using?
>
> Driver name : cx18
> Card type : Hauppauge HVR-1600
> Bus info : PCI:0000:01:08.0
> Driver version: 66048
>
>
> 3. How did you "up the gain on the cards" before?
>
> -c cx23418 -s 0x104 0x1

Hmm. I think you meant "-c cx23418_843", otherwise nothing should have
happened.


> 4. What is the output of v4l2-ctl -d /dev/videoN --log-status
> when you
> don't have horizontal lock and when you do?
>
> no change
>
> 5. Do you have an oscilliscope to look at the video signal
> coming out
> from the SSC-DC374 to compare it with a known working video
> signal?
> (It'll take the guessing out of troubleshooting)
>
> I do not. The patch didn’t help..

Hmmm. So much for adaptive gain adjustment via heuristics.

I have added a user control to the cx18 driver in a patch here:

http://linuxtv.org/hg/~awalls/v4l-dvb/
http://linuxtv.org/hg/~awalls/v4l-dvb/rev/2ef91a4f42a9

With the patched driver, turning on the extra +12dB of gain should be as
simple as this:

$ v4l2-ctl -i2
$ v4l2-ctl -L
$ v4l2-ctl -c extra_12db_gain=1

This control only boosts Luma (Y) and Chroma (C, Pb, Pr) signals and not
the tuner SIF audio. It will re-adjust on input switches between Tuner,
CVBS, and SVideo to keep boosting (or not) the Luma and Chroma signals
for the new input configuration.

> in case this helps
>
> I found a user with the similar issue with another hauppauge card.
>
> http://www.videohelp.com/forum/archive/hsync-issue-on-composite-capture-pvr500-t334215.html?layout=0&layoutalign=Center

I find it surprising a PVR-xxx board had this problem.

> ???????
>
> Should I just get new cameras? Are there ones that people know will
> work??? :)

It may be cheaper to by a video signal amp/restorer for the camera. (An
RF modulator from baseband up to channel 3 might work too.) The camera
must have either a weak signal, large DC offset, or a really weird
output impeadence.

Hopefully the patch will give you the signal quality needed for
horizontal locking, so no new hardware is necessary.

Regards,
Andy

> Thanks!
>
> Tom



_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On 7/29/09 12:21 AM, "Andy Walls" <awalls@radix.net> wrote:
>
> I have added a user control to the cx18 driver in a patch here:
>
> http://linuxtv.org/hg/~awalls/v4l-dvb/
> http://linuxtv.org/hg/~awalls/v4l-dvb/rev/2ef91a4f42a9
>
> With the patched driver, turning on the extra +12dB of gain should be as
> simple as this:
>
> $ v4l2-ctl -i2
> $ v4l2-ctl -L
> $ v4l2-ctl -c extra_12db_gain=1
>
> This control only boosts Luma (Y) and Chroma (C, Pb, Pr) signals and not
> the tuner SIF audio. It will re-adjust on input switches between Tuner,
> CVBS, and SVideo to keep boosting (or not) the Luma and Chroma signals
> for the new input configuration.
>
No luck with the patch :(

extra_12db_gain (bool) : default=0 value=1


We are going to go the composite->rf adapter way since that appears to be
the cheapest fix.

Thanks for your efforts, I appreciate them.

Tom
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On 7/29/09 12:19 PM, "Tom Ryan" <tomryan@camlaw.rutgers.edu> wrote:
>>
> No luck with the patch :(
>
> extra_12db_gain (bool) : default=0 value=1
>
>
> We are going to go the composite->rf adapter way since that appears to be the
> cheapest fix.
>
> Thanks for your efforts, I appreciate them.
>
> Tom

We just tried the RF hookup (using a vcr) and get the same sync issues :(
(picture looks beautiful on a local tv, just not via the card :(

Not sure if it helps, but the camera¹s specs are:

Video out: BNC, 1.0 Vp-p, 75 ohm, sync negative
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On Wed, 2009-07-29 at 14:22 -0400, Tom Ryan wrote:
>
>
>
> On 7/29/09 12:19 PM, "Tom Ryan" <tomryan@camlaw.rutgers.edu> wrote:
>
> No luck with the patch :(
>
> extra_12db_gain (bool) : default=0 value=1
>

Bummer.

> We are going to go the composite->rf adapter way since that
> appears to be the cheapest fix.
>
> Thanks for your efforts, I appreciate them.
>
> Tom
>
> We just tried the RF hookup (using a vcr) and get the same sync
> issues :( (picture looks beautiful on a local tv, just not via the
> card :(

Bummer.

> Not sure if it helps, but the camera’s specs are:
>
> Video out: BNC, 1.0 Vp-p, 75 ohm, sync negative
>

Tom,

What I'm going to do is implement a number of additional cx18 specific
user controls with which you can experiment and some recommendations on
what might work. I'm pretty sure some combination of settings should
solve your problem, but without direct access to an oscilloscope and the
video signal I'm not going to be able to guess what those are.

Experience has taught me that, when I don't have the problem device,
iterating back and forth in e-mail tweaking one parameter at a time is
painful.

Since, I've now implemented 1 custom control, adding more should be
pretty easy. Give me a few days, and I should have something for you to
play with.

Regards,
Andy


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On 7/30/09 7:38 AM, "Andy Walls" <awalls@radix.net> wrote:
>
> Since, I've now implemented 1 custom control, adding more should be
> pretty easy. Give me a few days, and I should have something for you to
> play with.


Thanks very much! I am trying to track down an oscilloscope (would a video
of the output suffice?) and I would be willing to ship you one of the
cameras if you¹re interested and these changes don¹t work out.

Let me know.

Tom
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On Thu, 2009-07-30 at 11:42 -0400, Tom Ryan wrote:
>
> On 7/30/09 7:38 AM, "Andy Walls" <awalls@radix.net> wrote:
>
> Since, I've now implemented 1 custom control, adding more
> should be
> pretty easy. Give me a few days, and I should have something
> for you to
> play with.

Tom,

OK. I've got about 14 or so new user controls in the cx18 driver at

http://linuxtv.org/hg/~awalls/v4l-dvb

They are:

extra_12db_gain (bool) : default=0 value=0

Use this if you suspect a weak signal. Since these are locally
connected cameras on 24 VAC with hopefully a short cable run for
testing, I doubt you need this,



luma_droop_compensation (bool) : default=0 value=0
chroma_droop_compensation (bool) : default=0 value=0

If you enable these, they will turn on impedance boosting for CVBS/Y and
C/Pr/Pb respectively. You would use these, if you had a cable or a
source that wasn't 75 ohms or some ohter reason for a bad impedance
match. This setting can cause the signal to get a DC offset, on the
boards, so if you use this, you should also use clamping (see below)



luma_clamping (bool) : default=0 value=0

This will enable clamping of the CVBS/Y sync tip to a specific analog
voltage level that should be below the midcode output level of the ADC.
This will remove positive DC offset, but can also give very weak signals
a negative DC offset in manual mode (see below). You should probably try
this setting. You likely have to use this setting if droop compensation
is enabled.


chroma_clamping (bool) : default=0 value=0

This will enable claming of the C/Pr/Pb signal voltage to 0 V, the ADC
midcode clamp level. This doesn't matter for your security camera.


auto_luma_clamping_level (bool) : default=1 value=1

When luma_clamping is enabled and this setting is enabled, the CX23418
will attempt to automatically adjust the sync tip clamping level for
you. You will want to leave this set at automatic when you first enable
clamping, to see if the CX23418 can do the work for you. If not, turn
it off, and set the clamp level manually (see below).


luma_clamping_voltage (menu) : min=0 max=7 default=0 value=0
0: -1.05 V
1: -0.8 V
2: -0.606 V
3: -0.460 V
4: -0.348 V
5: -0.264 V
6: -0.2 V
7: 0 V

This lets you manually set the luma sync tip clamping level to some
voltage below the midcode point (0 V) of the ADC. You must turn luma
clamping and turn off auto luma clamping level for this to be control to
be effective. Setting the sync tip clamp to 0 V will for sure be
useless. In my mind, the lower the voltage the better.



auto_digital_gain_control (bool) : default=1 value=1
digital_gain_level (int) : min=0 max=4095 step=1 default=256 value=1092 flags=slider

These control the digital front end gain that are applied digitally
after the analog gain stages and the AGC. This gain level is a rather
fine adjustment. There probably not much point on setting this to
manual and fine tuning the digital front end gain, unless you've already
done a manual setting of the analog front end gain first (see below).


auto_analog_gain_control (bool) : default=1 value=1
analog_gain_level (int) : min=16 max=248 step=1 default=64 value=32 flags=slider

This gain controls the analog stages before the ADC. You have to take
it out of auto before your manual gain setting will take effect. The
extra 12 dB gain stage comes before this one (in case you had it enabled
for a very weak signal).



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.




>
> Thanks very much! I am trying to track down an oscilloscope (would a
> video of the output suffice?)

Yes, actaully a picture would do. I'd need to see the voltage levels
relative to 0 V, the shape of hysnc tip, some of the active video, and
I'd need the time scale too.

I'll need to knwo how the measurement was taken:

1. clipped to the cable ground and probe tip on the cable center pin
with no load

2. a 75 ohm resistor connected from cable center pin to ground, and the
signal measured across the resistor

3. the camera connected to the HVR-1600 with a 75 ohm T connector
located close the HVR-1600 end, with the measurement made from the
center pin and ground of the open T.



> and I would be willing to ship you one of the cameras if you’re
> interested and these changes don’t work out.

There are some more setting I have yet to program in as user controls.
The chip is extremely flexible. So I wouldn't want a camera sent jjust
yet. I also have very little time in the next month, so I'd prefer not
to have someone's equipment until I know I have time.

Regards,
Andy

> Let me know.
>
> Tom
>
> _______________________________________________
> ivtv-users mailing list
> ivtv-users@ivtvdriver.org
> http://ivtvdriver.org/mailman/listinfo/ivtv-users


_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
2009. 08. 1, szombat keltezéssel 00.30-kor Andy Walls ezt írta:
> On Thu, 2009-07-30 at 11:42 -0400, Tom Ryan wrote:
> >
> > On 7/30/09 7:38 AM, "Andy Walls" <awalls@radix.net> wrote:
> >
> > Since, I've now implemented 1 custom control, adding more
> > should be
> > pretty easy. Give me a few days, and I should have something
> > for you to
> > play with.
>
> Tom,
>
> OK. I've got about 14 or so new user controls in the cx18 driver at
>
> http://linuxtv.org/hg/~awalls/v4l-dvb
>
> ...

Hello Andy,

Would it be possible to add such controls for the ivtv cards as well (if
they make sense)? It's good to have lots of parameters to play with if
the picture is suboptimal or when you have sync problems.

Levente



_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
On Sat, 2009-08-01 at 12:49 +0200, Levente Novák wrote:
> 2009. 08. 1, szombat keltezéssel 00.30-kor Andy Walls ezt írta:
> > On Thu, 2009-07-30 at 11:42 -0400, Tom Ryan wrote:
> > >
> > > On 7/30/09 7:38 AM, "Andy Walls" <awalls@radix.net> wrote:
> > >
> > > Since, I've now implemented 1 custom control, adding more
> > > should be
> > > pretty easy. Give me a few days, and I should have something
> > > for you to
> > > play with.
> >
> > Tom,
> >
> > OK. I've got about 14 or so new user controls in the cx18 driver at
> >
> > http://linuxtv.org/hg/~awalls/v4l-dvb
> >
> > ...
>
> Hello Andy,
>
> Would it be possible to add such controls for the ivtv cards as well (if
> they make sense)? It's good to have lots of parameters to play with if
> the picture is suboptimal or when you have sync problems.


Yes. It will be a little more work. The cx25840 module needs some
cleanup which I've had the best intentions of actually doing for some
time now (but haven't :( ). Also the ivtv driver can support different
diigtizers than the CX2584x, so the control handling for when one has a
CX2584x, or not, might be more complex.

Hans was supposed to be reworking general v4l2 control logic this
weekend. I need to ask him about a number of things: adding a
"technician" controls class, supporting mutliple sets of audio controls,
doing menu controls across the main driver/v4l2_subdevice driver
boundary, and generally making controls easier to implement. (They are
a little tedious - maybe that's because I've never needed to make them
before.)

In short, I can add them, but I'm pretty sure it's not going to happen
soon. I have travel this month and in September, and an IR controller
implementation I want to get done first:

http://www.kernellabs.com/blog/?p=592

Regards,
Andy

> Levente



_______________________________________________
ivtv-users mailing list
ivtv-users@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-users
Re: cx18: horizontal sync issue with analog composite 1 input [ In reply to ]
Andy,

Thanks for these changes. I've been trying various combinations with no success so far.. :(

will do some more testing tomorrow.

thanks

Tom

-----Original Message-----
From: ivtv-users-bounces@ivtvdriver.org on behalf of Andy Walls
Sent: Sat 8/1/2009 12:30 AM
To: User discussion about IVTV
Subject: Re: [ivtv-users] cx18: horizontal sync issue with analog composite 1 input

On Thu, 2009-07-30 at 11:42 -0400, Tom Ryan wrote:
>
> On 7/30/09 7:38 AM, "Andy Walls" <awalls@radix.net> wrote:
>
> Since, I've now implemented 1 custom control, adding more
> should be
> pretty easy. Give me a few days, and I should have something
> for you to
> play with.

Tom,

OK. I've got about 14 or so new user controls in the cx18 driver at

http://linuxtv.org/hg/~awalls/v4l-dvb

They are:

extra_12db_gain (bool) : default=0 value=0

Use this if you suspect a weak signal. Since these are locally
connected cameras on 24 VAC with hopefully a short cable run for
testing, I doubt you need this,



luma_droop_compensation (bool) : default=0 value=0
chroma_droop_compensation (bool) : default=0 value=0

If you enable these, they will turn on impedance boosting for CVBS/Y and
C/Pr/Pb respectively. You would use these, if you had a cable or a
source that wasn't 75 ohms or some ohter reason for a bad impedance
match. This setting can cause the signal to get a DC offset, on the
boards, so if you use this, you should also use clamping (see below)



luma_clamping (bool) : default=0 value=0

This will enable clamping of the CVBS/Y sync tip to a specific analog
voltage level that should be below the midcode output level of the ADC.
This will remove positive DC offset, but can also give very weak signals
a negative DC offset in manual mode (see below). You should probably try
this setting. You likely have to use this setting if droop compensation
is enabled.


chroma_clamping (bool) : default=0 value=0

This will enable claming of the C/Pr/Pb signal voltage to 0 V, the ADC
midcode clamp level. This doesn't matter for your security camera.


auto_luma_clamping_level (bool) : default=1 value=1

When luma_clamping is enabled and this setting is enabled, the CX23418
will attempt to automatically adjust the sync tip clamping level for
you. You will want to leave this set at automatic when you first enable
clamping, to see if the CX23418 can do the work for you. If not, turn
it off, and set the clamp level manually (see below).


luma_clamping_voltage (menu) : min=0 max=7 default=0 value=0
0: -1.05 V
1: -0.8 V
2: -0.606 V
3: -0.460 V
4: -0.348 V
5: -0.264 V
6: -0.2 V
7: 0 V

This lets you manually set the luma sync tip clamping level to some
voltage below the midcode point (0 V) of the ADC. You must turn luma
clamping and turn off auto luma clamping level for this to be control to
be effective. Setting the sync tip clamp to 0 V will for sure be
useless. In my mind, the lower the voltage the better.



auto_digital_gain_control (bool) : default=1 value=1
digital_gain_level (int) : min=0 max=4095 step=1 default=256 value=1092 flags=slider

These control the digital front end gain that are applied digitally
after the analog gain stages and the AGC. This gain level is a rather
fine adjustment. There probably not much point on setting this to
manual and fine tuning the digital front end gain, unless you've already
done a manual setting of the analog front end gain first (see below).


auto_analog_gain_control (bool) : default=1 value=1
analog_gain_level (int) : min=16 max=248 step=1 default=64 value=32 flags=slider

This gain controls the analog stages before the ADC. You have to take
it out of auto before your manual gain setting will take effect. The
extra 12 dB gain stage comes before this one (in case you had it enabled
for a very weak signal).



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.




>
> Thanks very much! I am trying to track down an oscilloscope (would a
> video of the output suffice?)

Yes, actaully a picture would do. I'd need to see the voltage levels
relative to 0 V, the shape of hysnc tip, some of the active video, and
I'd need the time scale too.

I'll need to knwo how the measurement was taken:

1. clipped to the cable ground and probe tip on the cable center pin
with no load

2. a 75 ohm resistor connected from cable center pin to ground, and the
signal measured across the resistor

3. the camera connected to the HVR-1600 with a 75 ohm T connector
located close the HVR-1600 end, with the measurement made from the
center pin and ground of the open T.



> and I would be willing to ship you one of the cameras if you're
> interested and these changes don't work out.

There are some more setting I have yet to program in as user controls.
The chip is extremely flexible. So I wouldn't want a camera sent jjust
yet. I also have very little time in the next month, so I'd prefer not
to have someone's equipment until I know I have time.

Regards,
Andy

> Let me know.
>
> Tom
>
> _______________________________________________
> ivtv-users mailing list
> ivtv-users@ivtvdriver.org
> http://ivtvdriver.org/mailman/listinfo/ivtv-users


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