Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
429df502 f251b3e7

+6 -5
+1 -1
drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
··· 964 964 { 965 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 970 static int solo_enum_framesizes(struct file *file, void *priv,
+4 -3
drivers/staging/media/solo6x10/solo6x10-v4l2.c
··· 527 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 532 int i; 533 533 ··· 537 537 for (i = 0; i < solo_dev->nr_chans; i++) 538 538 if (vb2_is_busy(&solo_dev->v4l2_enc[i]->vidq)) 539 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 542 /* Reconfigure for the new standard */ 542 543 solo_disp_init(solo_dev); 543 544 solo_enc_init(solo_dev); ··· 552 551 { 553 552 struct solo_dev *solo_dev = video_drvdata(file); 554 553 555 - return solo_set_video_type(solo_dev, std & V4L2_STD_PAL); 554 + return solo_set_video_type(solo_dev, std & V4L2_STD_625_50); 556 555 } 557 556 558 557 static int solo_s_ctrl(struct v4l2_ctrl *ctrl)
+1 -1
drivers/staging/media/solo6x10/solo6x10.h
··· 398 398 int desc_cnt); 399 399 400 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 402 void solo_update_mode(struct solo_enc_dev *solo_enc); 403 403 404 404 /* Set the threshold for motion detection */