diff options
author | Mike Isely <isely@pobox.com> | 2007-12-02 23:47:12 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:08 -0500 |
commit | 3d290bdb283c9dc897c5fd160fe3d07ead426c45 (patch) | |
tree | 8ee8c7080683069175daab46ffe0a1a0925901f0 /drivers/media/video/pvrusb2 | |
parent | 4ca7f7092815cad5cb3a9377dce211202fe4b328 (diff) |
V4L/DVB (6709): pvrusb2: minor rework for default video standard handling
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 08b513b6014f..54d2c4ab7a31 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -1441,9 +1441,6 @@ static v4l2_std_id get_default_standard(struct pvr2_hdw *hdw) | |||
1441 | tp = video_std[unit_number]; | 1441 | tp = video_std[unit_number]; |
1442 | if (tp) return tp; | 1442 | if (tp) return tp; |
1443 | } | 1443 | } |
1444 | if (hdw->hdw_desc->default_std_mask) { | ||
1445 | return hdw->hdw_desc->default_std_mask; | ||
1446 | } | ||
1447 | return 0; | 1444 | return 0; |
1448 | } | 1445 | } |
1449 | 1446 | ||
@@ -1526,9 +1523,10 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) | |||
1526 | { | 1523 | { |
1527 | char buf[40]; | 1524 | char buf[40]; |
1528 | unsigned int bcnt; | 1525 | unsigned int bcnt; |
1529 | v4l2_std_id std1,std2; | 1526 | v4l2_std_id std1,std2,std3; |
1530 | 1527 | ||
1531 | std1 = get_default_standard(hdw); | 1528 | std1 = get_default_standard(hdw); |
1529 | std3 = std1 ? 0 : hdw->hdw_desc->default_std_mask; | ||
1532 | 1530 | ||
1533 | bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom); | 1531 | bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom); |
1534 | pvr2_trace(PVR2_TRACE_STD, | 1532 | pvr2_trace(PVR2_TRACE_STD, |
@@ -1538,7 +1536,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) | |||
1538 | 1536 | ||
1539 | hdw->std_mask_avail = hdw->std_mask_eeprom; | 1537 | hdw->std_mask_avail = hdw->std_mask_eeprom; |
1540 | 1538 | ||
1541 | std2 = std1 & ~hdw->std_mask_avail; | 1539 | std2 = (std1|std3) & ~hdw->std_mask_avail; |
1542 | if (std2) { | 1540 | if (std2) { |
1543 | bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2); | 1541 | bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2); |
1544 | pvr2_trace(PVR2_TRACE_STD, | 1542 | pvr2_trace(PVR2_TRACE_STD, |
@@ -1560,6 +1558,16 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) | |||
1560 | pvr2_hdw_internal_find_stdenum(hdw); | 1558 | pvr2_hdw_internal_find_stdenum(hdw); |
1561 | return; | 1559 | return; |
1562 | } | 1560 | } |
1561 | if (std3) { | ||
1562 | bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std3); | ||
1563 | pvr2_trace(PVR2_TRACE_STD, | ||
1564 | "Initial video standard" | ||
1565 | " (determined by device type): %.*s",bcnt,buf); | ||
1566 | hdw->std_mask_cur = std3; | ||
1567 | hdw->std_dirty = !0; | ||
1568 | pvr2_hdw_internal_find_stdenum(hdw); | ||
1569 | return; | ||
1570 | } | ||
1563 | 1571 | ||
1564 | { | 1572 | { |
1565 | unsigned int idx; | 1573 | unsigned int idx; |