diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2014-01-13 04:58:12 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-13 08:21:56 -0500 |
commit | 429df502d480aae10104e42181b8066a0e23bd3d (patch) | |
tree | ff1425dec8860ae0fcde065f95189ca8f0d13b8c | |
parent | f251b3e78cc57411627d825eae3c911da77b4035 (diff) |
[media] solo6x10: fix broken PAL support
The video_type was never set correctly for PAL: it's not a bool, instead
it is a register value.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: tomdev@freenet.de
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/solo6x10/solo6x10-v4l2.c | 7 | ||||
-rw-r--r-- | drivers/staging/media/solo6x10/solo6x10.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index d582c5b84c14..ce9e5aaf7fd4 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | |||
@@ -964,7 +964,7 @@ static int solo_enc_s_std(struct file *file, void *priv, v4l2_std_id std) | |||
964 | { | 964 | { |
965 | struct solo_enc_dev *solo_enc = video_drvdata(file); | 965 | struct solo_enc_dev *solo_enc = video_drvdata(file); |
966 | 966 | ||
967 | return solo_set_video_type(solo_enc->solo_dev, std & V4L2_STD_PAL); | 967 | return solo_set_video_type(solo_enc->solo_dev, std & V4L2_STD_625_50); |
968 | } | 968 | } |
969 | 969 | ||
970 | static int solo_enum_framesizes(struct file *file, void *priv, | 970 | static int solo_enum_framesizes(struct file *file, void *priv, |
diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2.c b/drivers/staging/media/solo6x10/solo6x10-v4l2.c index 7b26de3488da..47e72dac9b13 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2.c | |||
@@ -527,7 +527,7 @@ static int solo_g_std(struct file *file, void *priv, v4l2_std_id *i) | |||
527 | return 0; | 527 | return 0; |
528 | } | 528 | } |
529 | 529 | ||
530 | int solo_set_video_type(struct solo_dev *solo_dev, bool type) | 530 | int solo_set_video_type(struct solo_dev *solo_dev, bool is_50hz) |
531 | { | 531 | { |
532 | int i; | 532 | int i; |
533 | 533 | ||
@@ -537,7 +537,8 @@ int solo_set_video_type(struct solo_dev *solo_dev, bool type) | |||
537 | for (i = 0; i < solo_dev->nr_chans; i++) | 537 | for (i = 0; i < solo_dev->nr_chans; i++) |
538 | if (vb2_is_busy(&solo_dev->v4l2_enc[i]->vidq)) | 538 | if (vb2_is_busy(&solo_dev->v4l2_enc[i]->vidq)) |
539 | return -EBUSY; | 539 | return -EBUSY; |
540 | solo_dev->video_type = type; | 540 | solo_dev->video_type = is_50hz ? SOLO_VO_FMT_TYPE_PAL : |
541 | SOLO_VO_FMT_TYPE_NTSC; | ||
541 | /* Reconfigure for the new standard */ | 542 | /* Reconfigure for the new standard */ |
542 | solo_disp_init(solo_dev); | 543 | solo_disp_init(solo_dev); |
543 | solo_enc_init(solo_dev); | 544 | solo_enc_init(solo_dev); |
@@ -551,7 +552,7 @@ static int solo_s_std(struct file *file, void *priv, v4l2_std_id std) | |||
551 | { | 552 | { |
552 | struct solo_dev *solo_dev = video_drvdata(file); | 553 | struct solo_dev *solo_dev = video_drvdata(file); |
553 | 554 | ||
554 | return solo_set_video_type(solo_dev, std & V4L2_STD_PAL); | 555 | return solo_set_video_type(solo_dev, std & V4L2_STD_625_50); |
555 | } | 556 | } |
556 | 557 | ||
557 | static int solo_s_ctrl(struct v4l2_ctrl *ctrl) | 558 | static int solo_s_ctrl(struct v4l2_ctrl *ctrl) |
diff --git a/drivers/staging/media/solo6x10/solo6x10.h b/drivers/staging/media/solo6x10/solo6x10.h index f1bbb8cb74e6..8964f8be158e 100644 --- a/drivers/staging/media/solo6x10/solo6x10.h +++ b/drivers/staging/media/solo6x10/solo6x10.h | |||
@@ -398,7 +398,7 @@ int solo_p2m_dma_desc(struct solo_dev *solo_dev, | |||
398 | int desc_cnt); | 398 | int desc_cnt); |
399 | 399 | ||
400 | /* Global s_std ioctl */ | 400 | /* Global s_std ioctl */ |
401 | int solo_set_video_type(struct solo_dev *solo_dev, bool type); | 401 | int solo_set_video_type(struct solo_dev *solo_dev, bool is_50hz); |
402 | void solo_update_mode(struct solo_enc_dev *solo_enc); | 402 | void solo_update_mode(struct solo_enc_dev *solo_enc); |
403 | 403 | ||
404 | /* Set the threshold for motion detection */ | 404 | /* Set the threshold for motion detection */ |