aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-09-08 21:32:12 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:14:34 -0400
commit56585386e297c54a65feef55810c13b4313bdf1e (patch)
treee41f894e348c8fe5340fe7b4e369265bfacbf3bf /drivers/media
parent9f66d4eac6be2428901ab6e0cbb6747d5b6794ef (diff)
V4L/DVB (6211): pvrusb2: Allocate a debug mask bit for reporting video standard things
It's useful to see specific details for how the pvrusb2 driver is figuring out things related to the video standard, independent of other initialization activities. So let's set up a separate debug mask bit for this and turn it on. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-debug.h53
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c10
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-main.c1
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-std.c8
4 files changed, 37 insertions, 35 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debug.h b/drivers/media/video/pvrusb2/pvrusb2-debug.h
index d95a8588e4f8..da6441b88f31 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-debug.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-debug.h
@@ -26,32 +26,33 @@ extern int pvrusb2_debug;
26 26
27/* These are listed in *rough* order of decreasing usefulness and 27/* These are listed in *rough* order of decreasing usefulness and
28 increasing noise level. */ 28 increasing noise level. */
29#define PVR2_TRACE_INFO (1 << 0) // Normal messages 29#define PVR2_TRACE_INFO (1 << 0) /* Normal messages */
30#define PVR2_TRACE_ERROR_LEGS (1 << 1) // error messages 30#define PVR2_TRACE_ERROR_LEGS (1 << 1) /* error messages */
31#define PVR2_TRACE_TOLERANCE (1 << 2) // track tolerance-affected errors 31#define PVR2_TRACE_TOLERANCE (1 << 2) /* track tolerance-affected errors */
32#define PVR2_TRACE_TRAP (1 << 3) // Trap & report misbehavior from app 32#define PVR2_TRACE_TRAP (1 << 3) /* Trap & report app misbehavior */
33#define PVR2_TRACE_INIT (1 << 4) // misc initialization steps 33#define PVR2_TRACE_STD (1 << 4) /* Log video standard stuff */
34#define PVR2_TRACE_START_STOP (1 << 5) // Streaming start / stop 34#define PVR2_TRACE_INIT (1 << 5) /* misc initialization steps */
35#define PVR2_TRACE_CTL (1 << 6) // commit of control changes 35#define PVR2_TRACE_START_STOP (1 << 6) /* Streaming start / stop */
36#define PVR2_TRACE_DEBUG (1 << 7) // Temporary debug code 36#define PVR2_TRACE_CTL (1 << 7) /* commit of control changes */
37#define PVR2_TRACE_EEPROM (1 << 8) // eeprom parsing / report 37#define PVR2_TRACE_DEBUG (1 << 8) /* Temporary debug code */
38#define PVR2_TRACE_STRUCT (1 << 9) // internal struct creation 38#define PVR2_TRACE_EEPROM (1 << 9) /* eeprom parsing / report */
39#define PVR2_TRACE_OPEN_CLOSE (1 << 10) // application open / close 39#define PVR2_TRACE_STRUCT (1 << 10) /* internal struct creation */
40#define PVR2_TRACE_CREG (1 << 11) // Main critical region entry / exit 40#define PVR2_TRACE_OPEN_CLOSE (1 << 11) /* application open / close */
41#define PVR2_TRACE_SYSFS (1 << 12) // Sysfs driven I/O 41#define PVR2_TRACE_CREG (1 << 12) /* Main critical region entry / exit */
42#define PVR2_TRACE_FIRMWARE (1 << 13) // firmware upload actions 42#define PVR2_TRACE_SYSFS (1 << 13) /* Sysfs driven I/O */
43#define PVR2_TRACE_CHIPS (1 << 14) // chip broadcast operation 43#define PVR2_TRACE_FIRMWARE (1 << 14) /* firmware upload actions */
44#define PVR2_TRACE_I2C (1 << 15) // I2C related stuff 44#define PVR2_TRACE_CHIPS (1 << 15) /* chip broadcast operation */
45#define PVR2_TRACE_I2C_CMD (1 << 16) // Software commands to I2C modules 45#define PVR2_TRACE_I2C (1 << 16) /* I2C related stuff */
46#define PVR2_TRACE_I2C_CORE (1 << 17) // I2C core debugging 46#define PVR2_TRACE_I2C_CMD (1 << 17) /* Software commands to I2C modules */
47#define PVR2_TRACE_I2C_TRAF (1 << 18) // I2C traffic through the adapter 47#define PVR2_TRACE_I2C_CORE (1 << 18) /* I2C core debugging */
48#define PVR2_TRACE_V4LIOCTL (1 << 19) // v4l ioctl details 48#define PVR2_TRACE_I2C_TRAF (1 << 19) /* I2C traffic through the adapter */
49#define PVR2_TRACE_ENCODER (1 << 20) // mpeg2 encoder operation 49#define PVR2_TRACE_V4LIOCTL (1 << 20) /* v4l ioctl details */
50#define PVR2_TRACE_BUF_POOL (1 << 21) // Track buffer pool management 50#define PVR2_TRACE_ENCODER (1 << 21) /* mpeg2 encoder operation */
51#define PVR2_TRACE_BUF_FLOW (1 << 22) // Track buffer flow in system 51#define PVR2_TRACE_BUF_POOL (1 << 22) /* Track buffer pool management */
52#define PVR2_TRACE_DATA_FLOW (1 << 23) // Track data flow 52#define PVR2_TRACE_BUF_FLOW (1 << 23) /* Track buffer flow in system */
53#define PVR2_TRACE_DEBUGIFC (1 << 24) // Debug interface actions 53#define PVR2_TRACE_DATA_FLOW (1 << 24) /* Track data flow */
54#define PVR2_TRACE_GPIO (1 << 25) // GPIO state bit changes 54#define PVR2_TRACE_DEBUGIFC (1 << 25) /* Debug interface actions */
55#define PVR2_TRACE_GPIO (1 << 26) /* GPIO state bit changes */
55 56
56 57
57#endif /* __PVRUSB2_HDW_INTERNAL_H */ 58#endif /* __PVRUSB2_HDW_INTERNAL_H */
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 20dc573bc150..eec83d6ae788 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1741,7 +1741,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
1741 std1 = get_default_standard(hdw); 1741 std1 = get_default_standard(hdw);
1742 1742
1743 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom); 1743 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom);
1744 pvr2_trace(PVR2_TRACE_INIT, 1744 pvr2_trace(PVR2_TRACE_STD,
1745 "Supported video standard(s) reported by eeprom: %.*s", 1745 "Supported video standard(s) reported by eeprom: %.*s",
1746 bcnt,buf); 1746 bcnt,buf);
1747 1747
@@ -1750,7 +1750,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
1750 std2 = std1 & ~hdw->std_mask_avail; 1750 std2 = std1 & ~hdw->std_mask_avail;
1751 if (std2) { 1751 if (std2) {
1752 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2); 1752 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2);
1753 pvr2_trace(PVR2_TRACE_INIT, 1753 pvr2_trace(PVR2_TRACE_STD,
1754 "Expanding supported video standards" 1754 "Expanding supported video standards"
1755 " to include: %.*s", 1755 " to include: %.*s",
1756 bcnt,buf); 1756 bcnt,buf);
@@ -1761,7 +1761,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
1761 1761
1762 if (std1) { 1762 if (std1) {
1763 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std1); 1763 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std1);
1764 pvr2_trace(PVR2_TRACE_INIT, 1764 pvr2_trace(PVR2_TRACE_STD,
1765 "Initial video standard forced to %.*s", 1765 "Initial video standard forced to %.*s",
1766 bcnt,buf); 1766 bcnt,buf);
1767 hdw->std_mask_cur = std1; 1767 hdw->std_mask_cur = std1;
@@ -1781,7 +1781,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
1781 hdw->std_mask_eeprom)) continue; 1781 hdw->std_mask_eeprom)) continue;
1782 bcnt = pvr2_std_id_to_str(buf,sizeof(buf), 1782 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),
1783 std_eeprom_maps[idx].std); 1783 std_eeprom_maps[idx].std);
1784 pvr2_trace(PVR2_TRACE_INIT, 1784 pvr2_trace(PVR2_TRACE_STD,
1785 "Initial video standard guessed as %.*s", 1785 "Initial video standard guessed as %.*s",
1786 bcnt,buf); 1786 bcnt,buf);
1787 hdw->std_mask_cur = std_eeprom_maps[idx].std; 1787 hdw->std_mask_cur = std_eeprom_maps[idx].std;
@@ -1796,7 +1796,7 @@ static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw)
1796 hdw->std_enum_cur = 1; 1796 hdw->std_enum_cur = 1;
1797 hdw->std_mask_cur = hdw->std_defs[hdw->std_enum_cur-1].id; 1797 hdw->std_mask_cur = hdw->std_defs[hdw->std_enum_cur-1].id;
1798 hdw->std_dirty = !0; 1798 hdw->std_dirty = !0;
1799 pvr2_trace(PVR2_TRACE_INIT, 1799 pvr2_trace(PVR2_TRACE_STD,
1800 "Initial video standard auto-selected to %s", 1800 "Initial video standard auto-selected to %s",
1801 hdw->std_defs[hdw->std_enum_cur-1].name); 1801 hdw->std_defs[hdw->std_enum_cur-1].name);
1802 return; 1802 return;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c
index 1ea0939096ae..ca9e2789c8ca 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -41,6 +41,7 @@
41 41
42#define DEFAULT_DEBUG_MASK (PVR2_TRACE_ERROR_LEGS| \ 42#define DEFAULT_DEBUG_MASK (PVR2_TRACE_ERROR_LEGS| \
43 PVR2_TRACE_INFO| \ 43 PVR2_TRACE_INFO| \
44 PVR2_TRACE_STD| \
44 PVR2_TRACE_TOLERANCE| \ 45 PVR2_TRACE_TOLERANCE| \
45 PVR2_TRACE_TRAP| \ 46 PVR2_TRACE_TRAP| \
46 0) 47 0)
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c
index 81de26ba41d9..63e55bb59fcb 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -298,7 +298,7 @@ static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id)
298 std->id = id; 298 std->id = id;
299 bcnt = pvr2_std_id_to_str(std->name,sizeof(std->name)-1,id); 299 bcnt = pvr2_std_id_to_str(std->name,sizeof(std->name)-1,id);
300 std->name[bcnt] = 0; 300 std->name[bcnt] = 0;
301 pvr2_trace(PVR2_TRACE_INIT,"Set up standard idx=%u name=%s", 301 pvr2_trace(PVR2_TRACE_STD,"Set up standard idx=%u name=%s",
302 std->index,std->name); 302 std->index,std->name);
303 return !0; 303 return !0;
304} 304}
@@ -320,11 +320,11 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
320 v4l2_std_id idmsk,cmsk,fmsk; 320 v4l2_std_id idmsk,cmsk,fmsk;
321 struct v4l2_standard *stddefs; 321 struct v4l2_standard *stddefs;
322 322
323 if (pvrusb2_debug & PVR2_TRACE_INIT) { 323 if (pvrusb2_debug & PVR2_TRACE_STD) {
324 char buf[50]; 324 char buf[50];
325 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),id); 325 bcnt = pvr2_std_id_to_str(buf,sizeof(buf),id);
326 pvr2_trace( 326 pvr2_trace(
327 PVR2_TRACE_INIT,"Mapping standards mask=0x%x (%.*s)", 327 PVR2_TRACE_STD,"Mapping standards mask=0x%x (%.*s)",
328 (int)id,bcnt,buf); 328 (int)id,bcnt,buf);
329 } 329 }
330 330
@@ -355,7 +355,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
355 bcnt,buf); 355 bcnt,buf);
356 } 356 }
357 357
358 pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", 358 pvr2_trace(PVR2_TRACE_STD,"Setting up %u unique standard(s)",
359 std_cnt); 359 std_cnt);
360 if (!std_cnt) return NULL; // paranoia 360 if (!std_cnt) return NULL; // paranoia
361 361