diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 12:25:37 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 12:25:37 -0500 |
commit | 21dcd8ccd76e80118f524b1a730c35ab1c46c09e (patch) | |
tree | 4a08b0416ef74fbeecfb83eb84658c425c625020 /drivers | |
parent | 9bb13a6dc3a6f68c990264838ff0493d900c48d7 (diff) |
V4L/DVB (3234): Included advanced debug option to tvp5150.c
- Included advanced debug option to tvp5150.c
- Now, advanced debug info is the first item at V4L menu.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/Kconfig | 16 | ||||
-rw-r--r-- | drivers/media/video/tvp5150.c | 24 |
2 files changed, 33 insertions, 7 deletions
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index c89cc0a922ee..2fe260fff85d 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -7,6 +7,15 @@ menu "Video For Linux" | |||
7 | 7 | ||
8 | comment "Video Adapters" | 8 | comment "Video Adapters" |
9 | 9 | ||
10 | config VIDEO_ADV_DEBUG | ||
11 | bool "Enable advanced debug functionality" | ||
12 | depends on VIDEO_DEV | ||
13 | default n | ||
14 | ---help--- | ||
15 | Say Y here to enable advanced debugging functionality on some | ||
16 | V4L devices. | ||
17 | In doubt, say N. | ||
18 | |||
10 | config VIDEO_BT848 | 19 | config VIDEO_BT848 |
11 | tristate "BT848 Video For Linux" | 20 | tristate "BT848 Video For Linux" |
12 | depends on VIDEO_DEV && PCI && I2C | 21 | depends on VIDEO_DEV && PCI && I2C |
@@ -344,11 +353,4 @@ config VIDEO_DECODER | |||
344 | Say Y here to compile drivers for SAA7115, SAA7127 and CX25840 | 353 | Say Y here to compile drivers for SAA7115, SAA7127 and CX25840 |
345 | video decoders. | 354 | video decoders. |
346 | 355 | ||
347 | config VIDEO_ADV_DEBUG | ||
348 | bool "Enable advanced debug functionality" | ||
349 | depends on VIDEO_DEV && VIDEO_DECODER && EXPERIMENTAL | ||
350 | ---help--- | ||
351 | Say Y here to enable advanced debugging functionality in the | ||
352 | SAA7115, SAA7127 and CX25840 video decoders. | ||
353 | |||
354 | endmenu | 356 | endmenu |
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 9ed839d688eb..07ad675cd58e 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -850,6 +850,30 @@ static int tvp5150_command(struct i2c_client *c, | |||
850 | *(v4l2_std_id *)arg = decoder->norm; | 850 | *(v4l2_std_id *)arg = decoder->norm; |
851 | break; | 851 | break; |
852 | 852 | ||
853 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
854 | case VIDIOC_INT_G_REGISTER: | ||
855 | { | ||
856 | struct v4l2_register *reg = arg; | ||
857 | |||
858 | if (reg->i2c_id != I2C_DRIVERID_TVP5150) | ||
859 | return -EINVAL; | ||
860 | reg->val = tvp5150_read(c, reg->reg & 0xff); | ||
861 | break; | ||
862 | } | ||
863 | |||
864 | case VIDIOC_INT_S_REGISTER: | ||
865 | { | ||
866 | struct v4l2_register *reg = arg; | ||
867 | |||
868 | if (reg->i2c_id != I2C_DRIVERID_TVP5150) | ||
869 | return -EINVAL; | ||
870 | if (!capable(CAP_SYS_ADMIN)) | ||
871 | return -EPERM; | ||
872 | tvp5150_write(c, reg->reg & 0xff, reg->val & 0xff); | ||
873 | break; | ||
874 | } | ||
875 | #endif | ||
876 | |||
853 | case DECODER_DUMP: | 877 | case DECODER_DUMP: |
854 | dump_reg(c); | 878 | dump_reg(c); |
855 | break; | 879 | break; |