summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/usbtv
diff options
context:
space:
mode:
authorJorge Maidana <jorgem.linux@gmail.com>2022-05-13 19:29:22 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-06-20 10:30:30 +0100
commit6aaf006c67798ac693eb24940953ab2e1b4d5577 (patch)
tree2821326a33b387606279e90efcc5d3955d52e794 /drivers/media/usb/usbtv
parent6f0c460fbd7ce67e08ba4c3e1b32e13f842aa800 (diff)
downloadlinux-6aaf006c67798ac693eb24940953ab2e1b4d5577.tar.bz2
media: usbtv: Add PAL-Nc standard
Add PAL-Nc support to usbtv, the corresponding register value "0x00fe" comes from the Windows driver "Active Development Co., Ltd. v2.1.1.2". Signed-off-by: Jorge Maidana <jorgem.linux@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/usb/usbtv')
-rw-r--r--drivers/media/usb/usbtv/usbtv-video.c5
-rw-r--r--drivers/media/usb/usbtv/usbtv.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c
index a714ad77ca8e..1e30e05953dc 100644
--- a/drivers/media/usb/usbtv/usbtv-video.c
+++ b/drivers/media/usb/usbtv/usbtv-video.c
@@ -136,6 +136,8 @@ static uint16_t usbtv_norm_to_16f_reg(v4l2_std_id norm)
return 0x00a8;
if (norm & (V4L2_STD_PAL_M | V4L2_STD_PAL_60))
return 0x00bc;
+ if (norm & V4L2_STD_PAL_Nc)
+ return 0x00fe;
/* Fallback to automatic detection for other standards */
return 0x0000;
}
@@ -241,7 +243,8 @@ static int usbtv_select_norm(struct usbtv *usbtv, v4l2_std_id norm)
static const v4l2_std_id ntsc_mask =
V4L2_STD_NTSC | V4L2_STD_NTSC_443;
static const v4l2_std_id pal_mask =
- V4L2_STD_PAL | V4L2_STD_PAL_60 | V4L2_STD_PAL_M;
+ V4L2_STD_PAL | V4L2_STD_PAL_60 | V4L2_STD_PAL_M |
+ V4L2_STD_PAL_Nc;
if (norm & ntsc_mask)
ret = usbtv_set_regs(usbtv, ntsc, ARRAY_SIZE(ntsc));
diff --git a/drivers/media/usb/usbtv/usbtv.h b/drivers/media/usb/usbtv/usbtv.h
index 77a368e90fd0..b9fa7c0088c9 100644
--- a/drivers/media/usb/usbtv/usbtv.h
+++ b/drivers/media/usb/usbtv/usbtv.h
@@ -68,7 +68,8 @@
#define USBTV_ODD(chunk) ((be32_to_cpu(chunk[0]) & 0x0000f000) >> 15)
#define USBTV_CHUNK_NO(chunk) (be32_to_cpu(chunk[0]) & 0x00000fff)
-#define USBTV_TV_STD (V4L2_STD_525_60 | V4L2_STD_PAL | V4L2_STD_SECAM)
+#define USBTV_TV_STD (V4L2_STD_525_60 | V4L2_STD_PAL | \
+ V4L2_STD_PAL_Nc | V4L2_STD_SECAM)
/* parameters for supported TV norms */
struct usbtv_norm_params {