commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6065 - gnuradio/branches/releases/3.0/usrp/host/lib


From: jcorgan
Subject: [Commit-gnuradio] r6065 - gnuradio/branches/releases/3.0/usrp/host/lib
Date: Thu, 26 Jul 2007 08:17:09 -0600 (MDT)

Author: jcorgan
Date: 2007-07-26 08:17:08 -0600 (Thu, 26 Jul 2007)
New Revision: 6065

Modified:
   gnuradio/branches/releases/3.0/usrp/host/lib/fusb.h
   gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_darwin.cc
   gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_generic.cc
   gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_linux.cc
   gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_ra_wb.cc
   gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_win32.cc
   gnuradio/branches/releases/3.0/usrp/host/lib/usrp_basic.cc
Log:
Applied changeset r5253 on trunk to release branch.

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/fusb.h
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/fusb.h 2007-07-25 17:01:29 UTC 
(rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/fusb.h 2007-07-26 14:17:08 UTC 
(rev 6065)
@@ -119,13 +119,18 @@
   static fusb_devhandle *make_devhandle (usb_dev_handle *udh);
 
   /*!
-   * \brief returns max block size hard limit
+   * \brief Returns max block size in bytes (hard limit).
    */
   static int max_block_size ();
 
   /*!
-   * \brief returns the default buffer size
+   * \brief Returns default block size in bytes.
    */
+  static int default_block_size ();
+
+  /*!
+   * \brief Returns the default buffer size in bytes.
+   */
   static int default_buffer_size ();
 
 };

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_darwin.cc
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_darwin.cc       
2007-07-25 17:01:29 UTC (rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_darwin.cc       
2007-07-26 14:17:08 UTC (rev 6065)
@@ -24,7 +24,7 @@
 #include <fusb_darwin.h>
 
 static const int MAX_BLOCK_SIZE = 32 * 1024;           // hard limit
-static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB (was 8 MB)
+static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB
 
 fusb_devhandle *
 fusb_sysconfig::make_devhandle (usb_dev_handle *udh)
@@ -37,6 +37,11 @@
   return MAX_BLOCK_SIZE;
 }
 
+int fusb_sysconfig::default_block_size ()
+{
+  return fusb_sysconfig::max_block_size ();
+}
+
 int fusb_sysconfig::default_buffer_size ()
 {
   return FUSB_BUFFER_SIZE;

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_generic.cc
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_generic.cc      
2007-07-25 17:01:29 UTC (rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_generic.cc      
2007-07-26 14:17:08 UTC (rev 6065)
@@ -24,7 +24,7 @@
 #include <fusb_generic.h>
 
 static const int MAX_BLOCK_SIZE = 16 * 1024;           // hard limit
-static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB (was 8 MB)
+static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB
 
 fusb_devhandle *
 fusb_sysconfig::make_devhandle (usb_dev_handle *udh)
@@ -37,6 +37,11 @@
   return MAX_BLOCK_SIZE;
 }
 
+int fusb_sysconfig::default_block_size ()
+{
+  return fusb_sysconfig::max_block_size ();
+}
+
 int fusb_sysconfig::default_buffer_size ()
 {
   return FUSB_BUFFER_SIZE;

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_linux.cc
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_linux.cc        
2007-07-25 17:01:29 UTC (rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_linux.cc        
2007-07-26 14:17:08 UTC (rev 6065)
@@ -23,8 +23,9 @@
 #include <fusb.h>
 #include <fusb_linux.h>
 
-static const int MAX_BLOCK_SIZE = 16 * 1024;           // hard limit
-static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB (was 8 MB)
+static const int MAX_BLOCK_SIZE     =  16 * 1024;      // hard limit
+static const int DEFAULT_BLOCK_SIZE =   4 * 1024;      // fewer kernel memory 
problems
+static const int FUSB_BUFFER_SIZE   =   1 * (1L << 20); // 1MB
 
 fusb_devhandle *
 fusb_sysconfig::make_devhandle (usb_dev_handle *udh)
@@ -37,6 +38,11 @@
   return MAX_BLOCK_SIZE;
 }
 
+int fusb_sysconfig::default_block_size ()
+{
+  return DEFAULT_BLOCK_SIZE;
+}
+
 int fusb_sysconfig::default_buffer_size ()
 {
   return FUSB_BUFFER_SIZE;

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_ra_wb.cc
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_ra_wb.cc        
2007-07-25 17:01:29 UTC (rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_ra_wb.cc        
2007-07-26 14:17:08 UTC (rev 6065)
@@ -41,6 +41,11 @@
   return MAX_BLOCK_SIZE;
 }
 
+int fusb_sysconfig::default_block_size ()
+{
+  return fusb_sysconfig::max_block_size ();
+}
+
 int fusb_sysconfig::default_buffer_size ()
 {
   return FUSB_BUFFER_SIZE;

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_win32.cc
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_win32.cc        
2007-07-25 17:01:29 UTC (rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/fusb_sysconfig_win32.cc        
2007-07-26 14:17:08 UTC (rev 6065)
@@ -24,7 +24,7 @@
 #include <fusb_win32.h>
 
 static const int MAX_BLOCK_SIZE = 64 * 1024;           // Windows kernel hard 
limit
-static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB (was 8 MB)
+static const int FUSB_BUFFER_SIZE = 2 * (1L << 20);    // 2 MB
        
 fusb_devhandle *
 fusb_sysconfig::make_devhandle (usb_dev_handle *udh)
@@ -37,6 +37,11 @@
   return MAX_BLOCK_SIZE;
 }
 
+int fusb_sysconfig::default_block_size ()
+{
+  return fusb_sysconfig::max_block_size ();
+}
+
 int fusb_sysconfig::default_buffer_size ()
 {
   return FUSB_BUFFER_SIZE;

Modified: gnuradio/branches/releases/3.0/usrp/host/lib/usrp_basic.cc
===================================================================
--- gnuradio/branches/releases/3.0/usrp/host/lib/usrp_basic.cc  2007-07-25 
17:01:29 UTC (rev 6064)
+++ gnuradio/branches/releases/3.0/usrp/host/lib/usrp_basic.cc  2007-07-26 
14:17:08 UTC (rev 6065)
@@ -475,7 +475,7 @@
     throw std::out_of_range ("usrp_basic_rx: invalid fusb_nblocks");
   
   if (fusb_block_size == 0)
-    fusb_block_size = FUSB_BLOCK_SIZE;
+    fusb_block_size = fusb_sysconfig::default_block_size();
 
   if (fusb_nblocks == 0)
     fusb_nblocks = std::max (1, FUSB_BUFFER_SIZE / fusb_block_size);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]