aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2011-02-13 15:31:55 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 19:32:21 -0400
commit9bf98321b4894b1e6787b4b93cd8fb81906a0f79 (patch)
tree77bc60e5f2eecc33b4fbcdbf2660fd7deef4d379 /drivers/media
parent2b74334d12914eb10b8dac90300c3799a2115569 (diff)
[media] pvrusb2: Handle change of mode before handling change of video standard
pvrusb2: Recognize and handle mode change before dealing with changes related to the video standard. Even though the video standard should only matter when in analog mode, doing this way is technically cleaner in case there's other stuff that might depend on both. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 66ad516bdfd..55074a89966 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -3165,6 +3165,19 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
3165 struct pvr2_ctrl *cptr; 3165 struct pvr2_ctrl *cptr;
3166 int disruptive_change; 3166 int disruptive_change;
3167 3167
3168 if (hdw->input_dirty && hdw->state_pathway_ok &&
3169 (((hdw->input_val == PVR2_CVAL_INPUT_DTV) ?
3170 PVR2_PATHWAY_DIGITAL : PVR2_PATHWAY_ANALOG) !=
3171 hdw->pathway_state)) {
3172 /* Change of mode being asked for... */
3173 hdw->state_pathway_ok = 0;
3174 trace_stbit("state_pathway_ok", hdw->state_pathway_ok);
3175 }
3176 if (!hdw->state_pathway_ok) {
3177 /* Can't commit anything until pathway is ok. */
3178 return 0;
3179 }
3180
3168 /* Handle some required side effects when the video standard is 3181 /* Handle some required side effects when the video standard is
3169 changed.... */ 3182 changed.... */
3170 if (hdw->std_dirty) { 3183 if (hdw->std_dirty) {
@@ -3199,18 +3212,6 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
3199 } 3212 }
3200 } 3213 }
3201 3214
3202 if (hdw->input_dirty && hdw->state_pathway_ok &&
3203 (((hdw->input_val == PVR2_CVAL_INPUT_DTV) ?
3204 PVR2_PATHWAY_DIGITAL : PVR2_PATHWAY_ANALOG) !=
3205 hdw->pathway_state)) {
3206 /* Change of mode being asked for... */
3207 hdw->state_pathway_ok = 0;
3208 trace_stbit("state_pathway_ok",hdw->state_pathway_ok);
3209 }
3210 if (!hdw->state_pathway_ok) {
3211 /* Can't commit anything until pathway is ok. */
3212 return 0;
3213 }
3214 /* The broadcast decoder can only scale down, so if 3215 /* The broadcast decoder can only scale down, so if
3215 * res_*_dirty && crop window < output format ==> enlarge crop. 3216 * res_*_dirty && crop window < output format ==> enlarge crop.
3216 * 3217 *