From 1a920bce8160ad3389c8ba7940cff7f07317f7cf Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 8 Nov 2012 18:46:24 -0800 Subject: uhd: added args member to tune_request object --- host/include/uhd/types/tune_request.hpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/host/include/uhd/types/tune_request.hpp b/host/include/uhd/types/tune_request.hpp index 9c498bfe9..dd6123a9f 100644 --- a/host/include/uhd/types/tune_request.hpp +++ b/host/include/uhd/types/tune_request.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2012 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #define INCLUDED_UHD_TYPES_TUNE_REQUEST_HPP #include +#include namespace uhd{ @@ -88,6 +89,18 @@ namespace uhd{ */ double dsp_freq; + /*! + * The args parameter is used to pass arbitrary key/value pairs. + * Possible keys used by args (depends on implementation): + * + * - mode_n: Allows the user to tell the daughterboard tune code + * to choose between an integer N diviver or fractional N divider. + * Default is fractional N on boards that support fractional N tuning. + * Fractional N provides greater tuning acuracy at the expense of spurs. + * Possible options for this key: "integer" or "fractional". + */ + device_addr_t args; + }; } //namespace uhd -- cgit v1.2.3 From 43e0bd799e5f3dbee8429b16b61b88d25ae2f957 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 8 Nov 2012 18:46:57 -0800 Subject: usrp: poke tune args into dboards that support it --- host/lib/usrp/multi_usrp.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 0331cf93a..46dd8b670 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -139,6 +139,14 @@ static tune_result_t tune_xx_subdev_and_dsp( if (bw > rate) lo_offset = std::min((bw - rate)/2, rate/2); } + //------------------------------------------------------------------ + //-- poke the tune request args into the dboard + //------------------------------------------------------------------ + if (rf_fe_subtree->exists("tune_args")) + { + rf_fe_subtree->access("tune_args").set(tune_request.args); + } + //------------------------------------------------------------------ //-- set the RF frequency depending upon the policy //------------------------------------------------------------------ -- cgit v1.2.3