On Fri, 2010-01-22 at 14:02 -0800, Tony Ross wrote:

> May I ask please how one "looks" at, or sets the register settings? I see
> that "v4l2-ctl --set-ctrl=<ctrl>=<val>[,<ctrl>=<val>...]" allows one to
> alter the value of various controls returned by the "-l" (ell) option, but I
> don't see any obvious way to list or set the values of the various registers
> on the chip.

v4l-dbg, with debugging compiled into the ivtv, cx25840, cx18, and
videodev modules is the easiest way.  You have to be root to use it.

Just so you know, an HVR-1600 will show this:

# v4l2-dbg -d /dev/video0 -S
host0: cx23418    revision 0x01010000
host1: cx23418_843 revision 0x00008430
i2c 0x4c: cs5345     revision 0x00000000

# 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)


And a PVR-150 will show this:

# v4l2-dbg -d /dev/video1 -S
host0: cx23416    revision 0x00000000
i2c 0x1b: wm8775     revision 0x00000000
i2c 0x44: cx25843    revision 0x00008433

# v4l2-dbg -d /dev/video1 -c 0x44 --list-registers=min=0x100,max=0x10f
ioctl: VIDIOC_DBG_G_REGISTER

          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000100: 33 84 02 76 80 dd 04 07 0f 04 0a 10 fe e2 2b 00
          ^^^^^
(This indicates you're accessing the CX25843)
 


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.


> Of course I'd like to be able to somehow return to the current settings if
> something gets mucked up. <g>

Well, the CX25843 has a *cough* helpful *cough* autoconfig.  If you muck
with some registers, it reconfigures some others by itself.  The cx25840
driver leaves autoconfig on and cleans up after it when it happens.
(You will find that frustrating but can clean it up with a switch to
another input and then back IIRC).  The cx18 driver turns autoconfig off
(plus the chip appears to ignore it) and no auto register config
happens.

I have attached my notes on CX25843 register autoconfig.  It is all from
the datasheet, but just in one place.

Again, if you can test with the HVR-1600 and the "technician controls"
patches, I'd do that.

Regards,
Andy

3.4.1
        INPUT_MODE of VID_MODE_CTRL2 (0x401)
3.4.2
        INPUT_MODE of VID_MODE_CTRL2 (0x401)
3.4.2.2
        SQ_PIXEL of VID_MODE_CTRL1 (0x400)
        VID_FMT_SEL of VID_MODE_CTRL1 (0x400)
        ACFG_DIS of MISC_CHIP_CTLR (0x102), is set no autoconfig will be done.
3.22
5.6.3
        VID_FMT_SEL of VID_MODE_CTRL1 (0x400) by user or hw autoconfig
                sets regs 0x470-0x481
5.8 Video Mode autoconfig
        VID_FMT_SEL of VID_MODE_CTRL1 (0x400) if not set to auto, 
                won't do some auto stuff

cx18_av_write
cx18_av_and_or

Auto Configed   Trigger                 Prevent
0x102           0x401 INPUT_MODE        0x102 CHIP_ACFG_DIS
0x104-0x106     0x401 INPUT_MODE        0x102 CHIP_ACFG_DIS

0x108-0x109     0x400 SQ_PIXEL          0x102 CHIP_ACFG_DIS
0x10c-0x10f     0x400 VID_FMT_SEL Write 0x102 CHIP_ACFG_DIS
                0x400 VID_FMT_SEL Auto  0x102 CHIP_ACFG_DIS, 0x400 VID_FMT_SEL

0x470-0x47f     0x400 VID_FMT_SEL Write 0x400 ACFG_DIS
                0x400 VID_FMT_SEL Auto  0x400 ACFG_DIS, 0x400 VID_FMT_SEL
                0x400 AFD_PAL_SEL       0x400 ACFG_DIS
                0x400 AFD_NTSC_SEL      0x400 ACFG_DIS
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users

Reply via email to