diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-07-12 22:08:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:45 -0400 |
commit | defd574ec07edaa1587da144d03b18495ab484b1 (patch) | |
tree | bdae7a93277c212096e552779e21891fc1c67d19 /drivers/media | |
parent | 804b4458943f14bf144d3c3ba50097ced9b27b29 (diff) |
V4L/DVB (5836): dvb-ttpci: re-initialize aspect ratio and pan scan after arm crash
Re-initialize aspect ratio and pan scan after arm crash.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 13 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_av.c | 12 |
3 files changed, 18 insertions, 8 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index ef1108c0bf11..2cee9e3bd29f 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -137,6 +137,15 @@ static void init_av7110_av(struct av7110 *av7110) | |||
137 | if (ret < 0) | 137 | if (ret < 0) |
138 | printk("dvb-ttpci:cannot set internal volume to maximum:%d\n",ret); | 138 | printk("dvb-ttpci:cannot set internal volume to maximum:%d\n",ret); |
139 | 139 | ||
140 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, | ||
141 | 1, (u16) av7110->display_ar); | ||
142 | if (ret < 0) | ||
143 | printk("dvb-ttpci: unable to set aspect ratio\n"); | ||
144 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, | ||
145 | 1, av7110->display_panscan); | ||
146 | if (ret < 0) | ||
147 | printk("dvb-ttpci: unable to set pan scan\n"); | ||
148 | |||
140 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 2, wss_cfg_4_3); | 149 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 2, wss_cfg_4_3); |
141 | if (ret < 0) | 150 | if (ret < 0) |
142 | printk("dvb-ttpci: unable to configure 4:3 wss\n"); | 151 | printk("dvb-ttpci: unable to configure 4:3 wss\n"); |
@@ -2639,12 +2648,12 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, | |||
2639 | av7110->mixer.volume_left = volume; | 2648 | av7110->mixer.volume_left = volume; |
2640 | av7110->mixer.volume_right = volume; | 2649 | av7110->mixer.volume_right = volume; |
2641 | 2650 | ||
2642 | init_av7110_av(av7110); | ||
2643 | |||
2644 | ret = av7110_register(av7110); | 2651 | ret = av7110_register(av7110); |
2645 | if (ret < 0) | 2652 | if (ret < 0) |
2646 | goto err_arm_thread_stop_10; | 2653 | goto err_arm_thread_stop_10; |
2647 | 2654 | ||
2655 | init_av7110_av(av7110); | ||
2656 | |||
2648 | /* special case DVB-C: these cards have an analog tuner | 2657 | /* special case DVB-C: these cards have an analog tuner |
2649 | plus need some special handling, so we have separate | 2658 | plus need some special handling, so we have separate |
2650 | saa7146_ext_vv data for these... */ | 2659 | saa7146_ext_vv data for these... */ |
diff --git a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h index 115002b0390c..0cb439527498 100644 --- a/drivers/media/dvb/ttpci/av7110.h +++ b/drivers/media/dvb/ttpci/av7110.h | |||
@@ -194,6 +194,7 @@ struct av7110 { | |||
194 | 194 | ||
195 | int video_blank; | 195 | int video_blank; |
196 | struct video_status videostate; | 196 | struct video_status videostate; |
197 | u16 display_panscan; | ||
197 | int display_ar; | 198 | int display_ar; |
198 | int trickmode; | 199 | int trickmode; |
199 | #define TRICK_NONE 0 | 200 | #define TRICK_NONE 0 |
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c index f7a8219d7cfe..d75e7e48addc 100644 --- a/drivers/media/dvb/ttpci/av7110_av.c +++ b/drivers/media/dvb/ttpci/av7110_av.c | |||
@@ -1082,19 +1082,18 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file, | |||
1082 | case VIDEO_SET_DISPLAY_FORMAT: | 1082 | case VIDEO_SET_DISPLAY_FORMAT: |
1083 | { | 1083 | { |
1084 | video_displayformat_t format = (video_displayformat_t) arg; | 1084 | video_displayformat_t format = (video_displayformat_t) arg; |
1085 | u16 val = 0; | ||
1086 | 1085 | ||
1087 | switch (format) { | 1086 | switch (format) { |
1088 | case VIDEO_PAN_SCAN: | 1087 | case VIDEO_PAN_SCAN: |
1089 | val = VID_PAN_SCAN_PREF; | 1088 | av7110->display_panscan = VID_PAN_SCAN_PREF; |
1090 | break; | 1089 | break; |
1091 | 1090 | ||
1092 | case VIDEO_LETTER_BOX: | 1091 | case VIDEO_LETTER_BOX: |
1093 | val = VID_VC_AND_PS_PREF; | 1092 | av7110->display_panscan = VID_VC_AND_PS_PREF; |
1094 | break; | 1093 | break; |
1095 | 1094 | ||
1096 | case VIDEO_CENTER_CUT_OUT: | 1095 | case VIDEO_CENTER_CUT_OUT: |
1097 | val = VID_CENTRE_CUT_PREF; | 1096 | av7110->display_panscan = VID_CENTRE_CUT_PREF; |
1098 | break; | 1097 | break; |
1099 | 1098 | ||
1100 | default: | 1099 | default: |
@@ -1104,7 +1103,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file, | |||
1104 | break; | 1103 | break; |
1105 | av7110->videostate.display_format = format; | 1104 | av7110->videostate.display_format = format; |
1106 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, | 1105 | ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, |
1107 | 1, (u16) val); | 1106 | 1, av7110->display_panscan); |
1108 | break; | 1107 | break; |
1109 | } | 1108 | } |
1110 | 1109 | ||
@@ -1466,8 +1465,9 @@ int av7110_av_register(struct av7110 *av7110) | |||
1466 | av7110->videostate.play_state = VIDEO_STOPPED; | 1465 | av7110->videostate.play_state = VIDEO_STOPPED; |
1467 | av7110->videostate.stream_source = VIDEO_SOURCE_DEMUX; | 1466 | av7110->videostate.stream_source = VIDEO_SOURCE_DEMUX; |
1468 | av7110->videostate.video_format = VIDEO_FORMAT_4_3; | 1467 | av7110->videostate.video_format = VIDEO_FORMAT_4_3; |
1469 | av7110->videostate.display_format = VIDEO_CENTER_CUT_OUT; | 1468 | av7110->videostate.display_format = VIDEO_LETTER_BOX; |
1470 | av7110->display_ar = VIDEO_FORMAT_4_3; | 1469 | av7110->display_ar = VIDEO_FORMAT_4_3; |
1470 | av7110->display_panscan = VID_VC_AND_PS_PREF; | ||
1471 | 1471 | ||
1472 | init_waitqueue_head(&av7110->video_events.wait_queue); | 1472 | init_waitqueue_head(&av7110->video_events.wait_queue); |
1473 | spin_lock_init(&av7110->video_events.lock); | 1473 | spin_lock_init(&av7110->video_events.lock); |