]> err.no Git - linux-2.6/blobdiff - drivers/media/video/pvrusb2/pvrusb2-std.c
V4L/DVB (7779): pvrusb2-dvb: quiet down noise in kernel log for feed debug
[linux-2.6] / drivers / media / video / pvrusb2 / pvrusb2-std.c
index 81de26ba41d9af1527f87f6a68d7bf9cda025a7b..fdc5a2b49ca8568cf73adb1b3f5fe6d69859a814 100644 (file)
@@ -50,6 +50,10 @@ struct std_name {
         V4L2_STD_NTSC_M_KR| \
         V4L2_STD_NTSC_443)
 
+#define CSTD_ATSC \
+       (V4L2_STD_ATSC_8_VSB| \
+        V4L2_STD_ATSC_16_VSB)
+
 #define CSTD_SECAM \
        (V4L2_STD_SECAM_B| \
         V4L2_STD_SECAM_D| \
@@ -75,13 +79,14 @@ struct std_name {
 #define TSTD_Nc  (V4L2_STD_PAL_Nc)
 #define TSTD_60  (V4L2_STD_PAL_60)
 
-#define CSTD_ALL (CSTD_PAL|CSTD_NTSC|CSTD_SECAM)
+#define CSTD_ALL (CSTD_PAL|CSTD_NTSC|CSTD_ATSC|CSTD_SECAM)
 
 /* Mapping of standard bits to color system */
 static const struct std_name std_groups[] = {
        {"PAL",CSTD_PAL},
        {"NTSC",CSTD_NTSC},
        {"SECAM",CSTD_SECAM},
+       {"ATSC",CSTD_ATSC},
 };
 
 /* Mapping of standard bits to modulation system */
@@ -104,6 +109,8 @@ static const struct std_name std_items[] = {
        {"N",TSTD_N},
        {"Nc",TSTD_Nc},
        {"60",TSTD_60},
+       {"8VSB",V4L2_STD_ATSC_8_VSB},
+       {"16VSB",V4L2_STD_ATSC_16_VSB},
 };
 
 
@@ -298,7 +305,7 @@ static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id)
        std->id = id;
        bcnt = pvr2_std_id_to_str(std->name,sizeof(std->name)-1,id);
        std->name[bcnt] = 0;
-       pvr2_trace(PVR2_TRACE_INIT,"Set up standard idx=%u name=%s",
+       pvr2_trace(PVR2_TRACE_STD,"Set up standard idx=%u name=%s",
                   std->index,std->name);
        return !0;
 }
@@ -320,11 +327,11 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
        v4l2_std_id idmsk,cmsk,fmsk;
        struct v4l2_standard *stddefs;
 
-       if (pvrusb2_debug & PVR2_TRACE_INIT) {
-               char buf[50];
+       if (pvrusb2_debug & PVR2_TRACE_STD) {
+               char buf[100];
                bcnt = pvr2_std_id_to_str(buf,sizeof(buf),id);
                pvr2_trace(
-                       PVR2_TRACE_INIT,"Mapping standards mask=0x%x (%.*s)",
+                       PVR2_TRACE_STD,"Mapping standards mask=0x%x (%.*s)",
                        (int)id,bcnt,buf);
        }
 
@@ -345,8 +352,11 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
                if ((id & std_mixes[idx2]) == std_mixes[idx2]) std_cnt++;
        }
 
+       /* Don't complain about ATSC standard values */
+       fmsk &= ~CSTD_ATSC;
+
        if (fmsk) {
-               char buf[50];
+               char buf[100];
                bcnt = pvr2_std_id_to_str(buf,sizeof(buf),fmsk);
                pvr2_trace(
                        PVR2_TRACE_ERROR_LEGS,
@@ -355,7 +365,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
                        bcnt,buf);
        }
 
-       pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)",
+       pvr2_trace(PVR2_TRACE_STD,"Setting up %u unique standard(s)",
                   std_cnt);
        if (!std_cnt) return NULL; // paranoia