summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-12-02 22:47:12 -0600
committerMike Isely <isely@pobox.com>2007-12-02 22:47:12 -0600
commit74ad60100684b29485d113272840d70af61d8026 (patch)
tree7c87780eae7d56b1fe309056012cba8a83ecbd20 /linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
parentca31a764dce00de5f60c73c819d4d4a3be4e32f7 (diff)
downloadmediapointer-dvb-s2-74ad60100684b29485d113272840d70af61d8026.tar.gz
mediapointer-dvb-s2-74ad60100684b29485d113272840d70af61d8026.tar.bz2
pvrusb2: minor rework for default video standard handling
From: Mike Isely <isely@pobox.com> pvrusb2: When a per-device-type default video standard is declared, handle it in such a way that it can be correctly and unambiguously reported in the system log. Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 8a27129b1..22d9c8f5c 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1451,9 +1451,6 @@ static v4l2_std_id get_default_standard(struct pvr2_hdw *hdw)
tp = video_std[unit_number];
if (tp) return tp;
}
- if (hdw->hdw_desc->default_std_mask) {
- return hdw->hdw_desc->default_std_mask;
- }
return 0;
}
@@ -1536,9 +1533,10 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
{
char buf[40];
unsigned int bcnt;
- v4l2_std_id std1,std2;
+ v4l2_std_id std1,std2,std3;
std1 = get_default_standard(hdw);
+ std3 = std1 ? 0 : hdw->hdw_desc->default_std_mask;
bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom);
pvr2_trace(PVR2_TRACE_STD,
@@ -1548,7 +1546,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
hdw->std_mask_avail = hdw->std_mask_eeprom;
- std2 = std1 & ~hdw->std_mask_avail;
+ std2 = (std1|std3) & ~hdw->std_mask_avail;
if (std2) {
bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2);
pvr2_trace(PVR2_TRACE_STD,
@@ -1570,6 +1568,16 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
pvr2_hdw_internal_find_stdenum(hdw);
return;
}
+ if (std3) {
+ bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std3);
+ pvr2_trace(PVR2_TRACE_STD,
+ "Initial video standard"
+ " (determined by device type): %.*s",bcnt,buf);
+ hdw->std_mask_cur = std3;
+ hdw->std_dirty = !0;
+ pvr2_hdw_internal_find_stdenum(hdw);
+ return;
+ }
{
unsigned int idx;