diff options
author | Mike Isely <isely@pobox.com> | 2009-03-06 22:08:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:34 -0400 |
commit | 40f07111be99b71c1e8d40c13cdc38445add787f (patch) | |
tree | 901193dfb0d08e4430fb03ac1eec2259f5a88991 | |
parent | d8f5b9ba82482cab344c2d54c2c487b607e34864 (diff) |
V4L/DVB (11166): pvrusb2: Implement status fetching from sub-devices
Implement status fetching operations in terms of calling out to
sub-device(s).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 14 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-i2c-track.c | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 4e50e7bc5745..d619e807a339 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -4816,7 +4816,21 @@ int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val) | |||
4816 | 4816 | ||
4817 | void pvr2_hdw_status_poll(struct pvr2_hdw *hdw) | 4817 | void pvr2_hdw_status_poll(struct pvr2_hdw *hdw) |
4818 | { | 4818 | { |
4819 | struct v4l2_tuner *vtp = &hdw->tuner_signal_info; | ||
4820 | memset(vtp, 0, sizeof(*vtp)); | ||
4819 | pvr2_i2c_core_status_poll(hdw); | 4821 | pvr2_i2c_core_status_poll(hdw); |
4822 | /* Note: There apparently is no replacement for VIDIOC_CROPCAP | ||
4823 | using v4l2-subdev - therefore we can't support that AT ALL right | ||
4824 | now. (Of course, no sub-drivers seem to implement it either. | ||
4825 | But now it's a a chicken and egg problem...) */ | ||
4826 | v4l2_device_call_all(&hdw->v4l2_dev, 0, tuner, g_tuner, | ||
4827 | &hdw->tuner_signal_info); | ||
4828 | pvr2_trace(PVR2_TRACE_CHIPS, "client status poll" | ||
4829 | " type=%u strength=%u audio=0x%x cap=0x%x" | ||
4830 | " low=%u hi=%u", | ||
4831 | vtp->type, | ||
4832 | vtp->signal, vtp->rxsubchans, vtp->capability, | ||
4833 | vtp->rangelow, vtp->rangehigh); | ||
4820 | } | 4834 | } |
4821 | 4835 | ||
4822 | 4836 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-track.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-track.c index 3387897ed897..7ca1b660cbe4 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-track.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-track.c | |||
@@ -112,20 +112,12 @@ void pvr2_i2c_core_status_poll(struct pvr2_hdw *hdw) | |||
112 | { | 112 | { |
113 | struct pvr2_i2c_client *cp; | 113 | struct pvr2_i2c_client *cp; |
114 | mutex_lock(&hdw->i2c_list_lock); do { | 114 | mutex_lock(&hdw->i2c_list_lock); do { |
115 | struct v4l2_tuner *vtp = &hdw->tuner_signal_info; | ||
116 | memset(vtp,0,sizeof(*vtp)); | ||
117 | list_for_each_entry(cp, &hdw->i2c_clients, list) { | 115 | list_for_each_entry(cp, &hdw->i2c_clients, list) { |
118 | if (!cp->detected_flag) continue; | 116 | if (!cp->detected_flag) continue; |
119 | if (!cp->status_poll) continue; | 117 | if (!cp->status_poll) continue; |
120 | cp->status_poll(cp); | 118 | cp->status_poll(cp); |
121 | } | 119 | } |
122 | hdw->tuner_signal_stale = 0; | 120 | hdw->tuner_signal_stale = 0; |
123 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c status poll" | ||
124 | " type=%u strength=%u audio=0x%x cap=0x%x" | ||
125 | " low=%u hi=%u", | ||
126 | vtp->type, | ||
127 | vtp->signal,vtp->rxsubchans,vtp->capability, | ||
128 | vtp->rangelow,vtp->rangehigh); | ||
129 | } while (0); mutex_unlock(&hdw->i2c_list_lock); | 121 | } while (0); mutex_unlock(&hdw->i2c_list_lock); |
130 | } | 122 | } |
131 | 123 | ||