diff options
author | Mike Isely <isely@pobox.com> | 2009-03-06 22:01:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:33 -0400 |
commit | 5ceaad14eac97662afd4ed1dddf343cfb322caa3 (patch) | |
tree | 2d822712b62e315aa1c915c68afed17ba684bcdc /drivers/media/video/pvrusb2/pvrusb2-hdw.c | |
parent | 446dfdc6cc62890098a1b92a4a84019a34dce0cc (diff) |
V4L/DVB (11163): pvrusb2: Lay foundation for triggering sub-device updates
These changes set up the spot where we'll check for and set general
updates to any attached sub-devices.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index c764f360a774..4c24028856a3 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2839,6 +2839,14 @@ static const char *get_ctrl_typename(enum pvr2_ctl_type tp) | |||
2839 | } | 2839 | } |
2840 | 2840 | ||
2841 | 2841 | ||
2842 | /* Execute whatever commands are required to update the state of all the | ||
2843 | sub-devices so that it matches our current control values. */ | ||
2844 | static void pvr2_subdev_update(struct pvr2_hdw *hdw) | ||
2845 | { | ||
2846 | /* ????? */ | ||
2847 | } | ||
2848 | |||
2849 | |||
2842 | /* Figure out if we need to commit control changes. If so, mark internal | 2850 | /* Figure out if we need to commit control changes. If so, mark internal |
2843 | state flags to indicate this fact and return true. Otherwise do nothing | 2851 | state flags to indicate this fact and return true. Otherwise do nothing |
2844 | else and return false. */ | 2852 | else and return false. */ |
@@ -3009,12 +3017,6 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw) | |||
3009 | the client drivers in order to keep everything in sync */ | 3017 | the client drivers in order to keep everything in sync */ |
3010 | pvr2_i2c_core_check_stale(hdw); | 3018 | pvr2_i2c_core_check_stale(hdw); |
3011 | 3019 | ||
3012 | for (idx = 0; idx < hdw->control_cnt; idx++) { | ||
3013 | cptr = hdw->controls + idx; | ||
3014 | if (!cptr->info->clear_dirty) continue; | ||
3015 | cptr->info->clear_dirty(cptr); | ||
3016 | } | ||
3017 | |||
3018 | if (hdw->active_stream_type != hdw->desired_stream_type) { | 3020 | if (hdw->active_stream_type != hdw->desired_stream_type) { |
3019 | /* Handle any side effects of stream config here */ | 3021 | /* Handle any side effects of stream config here */ |
3020 | hdw->active_stream_type = hdw->desired_stream_type; | 3022 | hdw->active_stream_type = hdw->desired_stream_type; |
@@ -3034,6 +3036,15 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw) | |||
3034 | } | 3036 | } |
3035 | } | 3037 | } |
3036 | 3038 | ||
3039 | for (idx = 0; idx < hdw->control_cnt; idx++) { | ||
3040 | cptr = hdw->controls + idx; | ||
3041 | if (!cptr->info->clear_dirty) continue; | ||
3042 | cptr->info->clear_dirty(cptr); | ||
3043 | } | ||
3044 | |||
3045 | /* Check and update state for all sub-devices. */ | ||
3046 | pvr2_subdev_update(hdw); | ||
3047 | |||
3037 | /* Now execute i2c core update */ | 3048 | /* Now execute i2c core update */ |
3038 | pvr2_i2c_core_sync(hdw); | 3049 | pvr2_i2c_core_sync(hdw); |
3039 | 3050 | ||
@@ -3190,8 +3201,8 @@ void pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw) | |||
3190 | { | 3201 | { |
3191 | int nr = pvr2_hdw_get_unit_number(hdw); | 3202 | int nr = pvr2_hdw_get_unit_number(hdw); |
3192 | LOCK_TAKE(hdw->big_lock); do { | 3203 | LOCK_TAKE(hdw->big_lock); do { |
3193 | hdw->log_requested = !0; | ||
3194 | printk(KERN_INFO "pvrusb2: ================= START STATUS CARD #%d =================\n", nr); | 3204 | printk(KERN_INFO "pvrusb2: ================= START STATUS CARD #%d =================\n", nr); |
3205 | hdw->log_requested = !0; | ||
3195 | pvr2_i2c_core_check_stale(hdw); | 3206 | pvr2_i2c_core_check_stale(hdw); |
3196 | pvr2_i2c_core_sync(hdw); | 3207 | pvr2_i2c_core_sync(hdw); |
3197 | hdw->log_requested = 0; | 3208 | hdw->log_requested = 0; |