Git Product home page Git Product logo

soapyaudio's Introduction

soapyaudio's People

Contributors

cjcliffe avatar guruofquality avatar ncorgan avatar ra1nb0w avatar rdpowerz avatar vsonnier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soapyaudio's Issues

SoapyAudio hamlib control not working for Softrock and presumably other radios with USB control

--------------------------------------------------------------------------------
Problem statement:

I tried to use SoapyAudio with Hamlib support enabled to control the
SoftRock Si570 AVR-USB radio.  I found that SoapyAudio forced me to
provide a serial rate even though USB devices don't have a settable
serial rate.  It seems SoapyAudio was coded presuming all devices are
controlled via serial ports, which may not be the case these days.

I found hamlib works when serial rate is set to zero for this radio. See
below for example of my trial and error efforts.  I found I had to make
small changes to SoapyAudio for its hamlib calls to work with a serial
rate of zero.  See below for code diffs.  

I am hopeful these changes enable all USB-controlled audio 'soundcard'
radios to work.  I improved the error message to help debug things when
they do not work.

Debug environment was Ubuntu 20.04, Hamlib 3.3, gqrx top of tree
(v2.14.1-7-ga98411f-dirty), SoapySDR info is shown below.  I did 
not test on anything but this environment with this radio. The scope
of the changes is limited to the hamlib portions of SoapyAudio so
they should not impact anything else.

--------------------------------------------------------------------------------
Initial build of SoapyAudio: Note use of 'cmake -DUSE_HAMLIB=ON ..'

user@host:~/code/sdr$ git clone https://github.com/pothosware/SoapyAudio
Cloning into 'SoapyAudio'...
remote: Enumerating objects: 165, done.
remote: Total 165 (delta 0), reused 0 (delta 0), pack-reused 165
Receiving objects: 100% (165/165), 194.88 KiB | 2.35 MiB/s, done.
Resolving deltas: 100% (80/80), done.
user@host:~/code/sdr$ cd SoapyAudio
user@host:~/code/sdr/SoapyAudio$ mkdir build; cd build
user@host:~/code/sdr/SoapyAudio/build$ cmake -DUSE_HAMLIB=ON ..
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type not specified: defaulting to release.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'hamlib'
--   Found hamlib, version 3.3
-- Found hamlib 
-- Found hamlib: /usr/include  
-- Performing Test HAS_STD_CXX11
-- Performing Test HAS_STD_CXX11 - Success
-- Checking for module 'rtaudio'
--   Found rtaudio, version 5.0.0
-- Found RtAudio: /usr/lib/x86_64-linux-gnu/librtaudio.so (found version "5.0.0") 
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- Module audioSupport configured with version: 0.1.1-2ae84e3
-- Configuring done
-- Generating done
-- Build files have been written to: ~/code/sdr/SoapyAudio/build
user@host:~/code/sdr/SoapyAudio/build$ (make && sudo make install && sudo ldconfig) |& tee make.log

--------------------------------------------------------------------------------
Finding SoapyAudio's device strings:

Reference: SoapyAudio/Settings.cpp

#ifdef USE_HAMLIB
    t_Rig = nullptr;
    rigThread = nullptr;
    rigModel = 0;
    rigFile = "";
    rigSerialRate = 0;
    
    if (args.count("rig") != 0 && args.at("rig") != "") {
        try {
            rigModel = std::stoi(args.at("rig"));
        } catch (const std::invalid_argument &) {
            throw std::runtime_error("rig is invalid.");
        }
        if (!args.count("rig_rate")) {
            throw std::runtime_error("rig_rate missing.");
        }
        try {
            rigSerialRate = std::stoi(args.at("rig_rate"));
        } catch (const std::invalid_argument &) {
            throw std::runtime_error("rig_rate is invalid.");
        }

        if (!args.count("rig_port")) {
            throw std::runtime_error("rig_port missing.");
        }
        rigFile = args.at("rig_port");
        checkRigThread();
    }
#endif

This shows that:
  - "rig" must be present and must be an integer
  - "rig_rate" must be present and must be an integer
  - "rig_port" must be present and is a file name

--------------------------------------------------------------------------------
Finding hamlib settings using rigctl

1) Find rig type

user@host:~/soapy-debug$ rigctl --l | grep Soft
  2509  SoftRock               Si570 AVR-USB           0.3             Beta

So Softrock is 2509.  Note all the 25xx radios use similar designs.

2) Find the radio's defaults: only one that is relevant is 'rig_pathname'

user@host:~/soapy-debug$ rigctl -m 2509 -L
...
rig_pathname: "Path name to the device file of the rig"
	Default: /dev/rig, Value: 
	String.
...
<CTRL-D>

At this point, try the following to get the rig to open.

Configure 'gqrx' to use the following device string (all one line):

device="default_input=True,default_output=False,device_id=0,
driver=audio,soapy=0,rig=2509,rig_rate=9600,rig_port=/dev/ttyS0

gives (in red):

[ERROR] Rig failed to init.

3) Try to get frequency using rig 2509, rig_port /dev/rig, rig_rate 9600 baud

user@host:~/soapy-debug$ rigctl -m 2509 -r /dev/rig -s 9600 f
rig_open: error = IO error 

4) Try lots of different common rig serial rates, the only one that works is 0

user@host:~/soapy-debug$ rigctl -m 2509 -r /dev/rig -s 0 f
7050099

5) Now we can set the frequency to 10.0 MHz and read it back

user@host:~/soapy-debug$ rigctl -m 2509 -r /dev/rig -s 0 F 10000000
user@host:~/soapy-debug$ rigctl -m 2509 -r /dev/rig -s 0 f
10000000

6) Start gqxr with device strings as below:

device="default_input=True,default_output=False,device_id=0,
driver=audio,soapy=0,rig=2509,rig_rate=0,rig_port=/dev/rig

7) Now gqrx starts and we receive WWV at 10.0 MHz even though the frequency 
displayed is wrong. Also, changing frequency does nothing, and we also see:

[ERROR] Rig failed to init.

8) Change code to support rig_rate=0 because rigctl shows that serial rate 0
is what works for USB controlled radios, diff below

--------------------------------------------------------------------------------
Code changes:

Notes:
  - Allow rig_rate (serialRate) to be 0 since this works for Softrock as
    shown via the rigctl command
  - When serialRate is 0 don't update the serial rate data structure, this
    seems to be union and writing it for USB radios causes the open call
    to fail 
  - Enhance the error handling for hamlib open and init calls
  - When rig open fails, show the settings made it into SoapyAudio along with 
    the hamlib error string
  - Eliminate unused 'status' variable so warnings go away

diff --git a/RigThread.cpp b/RigThread.cpp
index ac96cc2..cd3c03c 100644
--- a/RigThread.cpp
+++ b/RigThread.cpp
@@ -33,17 +33,28 @@ void RigThread::setup(rig_model_t rig_model, std::string rig_file, int serial_ra
 };
 
 void RigThread::run() {
-    int retcode, status;
+    int retcode;
 
     SoapySDR_log(SOAPY_SDR_DEBUG, "Rig thread starting.");    
 
     rig = rig_init(rigModel);
+    if (rig == NULL) {
+        SoapySDR_log(SOAPY_SDR_ERROR, "Rig failed to init.");
+        terminated.store(true);
+        return;
+    }
+
 	strncpy(rig->state.rigport.pathname, rigFile.c_str(), FILPATHLEN - 1);
-	rig->state.rigport.parm.serial.rate = serialRate;
+    if (serialRate > 0)  // bypass for rate 0 used for USB controlled radios
+	    rig->state.rigport.parm.serial.rate = serialRate;
+
 	retcode = rig_open(rig);
-    
     if (retcode != 0) {
-        SoapySDR_log(SOAPY_SDR_ERROR, "Rig failed to init.");
+        char s[BUFSIZ];
+        snprintf(s, BUFSIZ, "Rig failed to open, rig: %d rig_rate: %d "
+            "rig_port: %s error: %s.", 
+            rigModel, serialRate, rigFile.c_str(), rigerror(retcode));
+        SoapySDR_log(SOAPY_SDR_ERROR, s);
         terminated.store(true);
         return;
     }
@@ -57,7 +68,7 @@ void RigThread::run() {
     while (!terminated.load()) {
         std::this_thread::sleep_for(std::chrono::milliseconds(150));
         if (freqChanged.load()) {
-            status = rig_get_freq(rig, RIG_VFO_CURR, &freq);
+            rig_get_freq(rig, RIG_VFO_CURR, &freq);
             if (freq != newFreq) {
                 freq = newFreq;
                 rig_set_freq(rig, RIG_VFO_CURR, freq);
@@ -66,7 +77,7 @@ void RigThread::run() {
             
             freqChanged.store(false);
         } else {
-            status = rig_get_freq(rig, RIG_VFO_CURR, &freq);
+            rig_get_freq(rig, RIG_VFO_CURR, &freq);
         }
         
         SoapySDR_logf(SOAPY_SDR_DEBUG, "Rig Freq: %f", freq);
@@ -98,4 +109,4 @@ void RigThread::terminate() {
 bool RigThread::isTerminated() {
     return terminated.load();
 }
-#endif
\ No newline at end of file
+#endif
diff --git a/Settings.cpp b/Settings.cpp
index 172e5e4..10e0074 100644
--- a/Settings.cpp
+++ b/Settings.cpp
@@ -584,7 +584,7 @@ chanSetup SoapyAudio::chanSetupStrToEnum(std::string chanOpt) {
 
 #ifdef USE_HAMLIB
 void SoapyAudio::checkRigThread() {    
-    if (!rigModel || !rigSerialRate || rigFile == "") {
+    if (!rigModel || (rigSerialRate < 0) || rigFile == "") {
         return;
     }
     if (!rigThread) {
@@ -600,4 +600,4 @@ void SoapyAudio::checkRigThread() {
     }
 }
 
-#endif
\ No newline at end of file
+#endif

--------------------------------------------------------------------------------
SoapySDR Info

user@host:~/soapy-debug$ SoapySDRUtil --info
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.8.0-g926c86d9
API Version: v0.8.0
ABI Version: v0.8
Install root: /usr/local
Search path:  /usr/local/lib/SoapySDR/modules0.8
Module found: /usr/local/lib/SoapySDR/modules0.8/libHackRFSupport.so   (0.3.3-7d53087)
Module found: /usr/local/lib/SoapySDR/modules0.8/libairspyhfSupport.so (0.1.1-b6cfbf5)
Module found: /usr/local/lib/SoapySDR/modules0.8/libaudioSupport.so    (0.1.1-2ae84e3)
Module found: /usr/local/lib/SoapySDR/modules0.8/libremoteSupport.so   (0.6.0-c09b2f1)
Module found: /usr/local/lib/SoapySDR/modules0.8/librtlsdrSupport.so   (0.3.1-52cb5c0)
Available factories... airspyhf, audio, hackrf, remote, rtlsdr
Available converters...
 -  CF32 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS16 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS32 -> [CS32]
 -   CS8 -> [CF32, CS16, CS8, CU16, CU8]
 -  CU16 -> [CF32, CS16, CS8]
 -   CU8 -> [CF32, CS16, CS8]
 -   F32 -> [F32, S16, S8, U16, U8]
 -   S16 -> [F32, S16, S8, U16, U8]
 -   S32 -> [S32]
 -    S8 -> [F32, S16, S8, U16, U8]
 -   U16 -> [F32, S16, S8]
 -    U8 -> [F32, S16, S8]

SoapyAudio with USE_HAMLIB=1 fails to compile with Hamlib version >= 4.6

I am compiling SoapyAudio with the current top-of-tree Hamlib which is 4.6-git.

In git blame for include/hamlib/rig.h we see that the first arg to rig_list_foreach() has gone from 'const int' to just 'int'.

This results in the error:

SoapyAudio/Registration.cpp:92:25: error: invalid conversion from ‘int (*)(const rig_caps*, void*)’ to ‘int (*)(rig_caps*, void*)’ [-fpermissive]
   92 |         rig_list_foreach(SoapyAudio::add_hamlib_rig, 0);
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         int (*)(const rig_caps*, void*)

The fix is easy, just get rid of 'const' in two places:

$ git diff | cat
diff --git a/Registration.cpp b/Registration.cpp
index 82a3452..dae1891 100644
--- a/Registration.cpp
+++ b/Registration.cpp
@@ -97,7 +97,7 @@ static std::vector<SoapySDR::Kwargs> findAudio(const SoapySDR::Kwargs &args)
 }
 
 #ifdef USE_HAMLIB
-int SoapyAudio::add_hamlib_rig(const struct rig_caps *rc, void* f)
+int SoapyAudio::add_hamlib_rig(struct rig_caps *rc, void* f)
 {
     rigCaps.push_back(rc);
 	return 1;
diff --git a/SoapyAudio.hpp b/SoapyAudio.hpp
index 6eefb76..1a68589 100644
--- a/SoapyAudio.hpp
+++ b/SoapyAudio.hpp
@@ -259,7 +259,7 @@ public:
 
 #ifdef USE_HAMLIB
 public:
-    static int add_hamlib_rig(const struct rig_caps *rc, void* f);
+    static int add_hamlib_rig(struct rig_caps *rc, void* f);
     static std::vector<const struct rig_caps *> rigCaps;
     
     void checkRigThread();

I will leave it up to the SoapyAudio maintainers as to when and how to fix this.

The compiler is hinting that '-fpermissive' would make this error go away.

Maybe that's the best way to handle it, either on the command line or in a directive in the source code, given that it's best to tolerate both old and new versions of hamlib.

Regards,
Dave, N1AI

Hamlib 4.2

In hamlib 4.2 the FILPATHLEN was replaced by HAMLIB_FILPATHLEN. Please fix line 47 of RigThread.cpp

Support for rtaudio 6

Hi! I'm currently trying to rebuild this project against rtaudio 6 on Arch Linux.
Unfortunately, this currently fails:

-- The CXX compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAS_STD_CXX11
-- Performing Test HAS_STD_CXX11 - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for module 'rtaudio'
--   Found rtaudio, version 6.0.1
-- Found RtAudio: /usr/lib/librtaudio.so (found version "6.0.1")
-- Module audioSupport configured with version: 0.1.1
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /build/soapyaudio/src/build
Change Dir: '/build/soapyaudio/src/build'

Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile
/usr/bin/cmake -S/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 -B/build/soapyaudio/src/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /build/soapyaudio/src/build/CMakeFiles /build/soapyaudio/src/build//CMakeFiles/progress.marks
/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/build/soapyaudio/src/build'
/usr/bin/make  -f CMakeFiles/audioSupport.dir/build.make CMakeFiles/audioSupport.dir/depend
make[2]: Entering directory '/build/soapyaudio/src/build'
cd /build/soapyaudio/src/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 /build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 /build/soapyaudio/src/build /build/soapyaudio/src/build /build/soapyaudio/src/build/CMakeFiles/audioSupport.dir/DependInfo.cmake "--co
lor="
make[2]: Leaving directory '/build/soapyaudio/src/build'
/usr/bin/make  -f CMakeFiles/audioSupport.dir/build.make CMakeFiles/audioSupport.dir/build
make[2]: Entering directory '/build/soapyaudio/src/build'
[ 40%] Building CXX object CMakeFiles/audioSupport.dir/Registration.cpp.o
[ 40%] Building CXX object CMakeFiles/audioSupport.dir/Version.cpp.o
[ 80%] Building CXX object CMakeFiles/audioSupport.dir/Streaming.cpp.o
[ 80%] Building CXX object CMakeFiles/audioSupport.dir/Settings.cpp.o
/usr/bin/c++ -D_REENTRANT -DaudioSupport_EXPORTS -I/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 -I/usr/include/rtaudio -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSE
RTIONS -g -ffile-prefix-map=/build/soapyaudio/src=/usr/src/debug/soapyaudio -flto=auto -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -Wno-unused-parameter -Wall -Wextra -Wnon-virtual-dtor -MD -MT CMakeFiles/audioSupport.dir/Registration.cpp.o -MF CMakeFiles/audioSupport.dir/Registration.cpp.o.d -o
 CMakeFiles/audioSupport.dir/Registration.cpp.o -c /build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Registration.cpp
/usr/bin/c++ -D_REENTRANT -DaudioSupport_EXPORTS -I/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 -I/usr/include/rtaudio -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSE
RTIONS -g -ffile-prefix-map=/build/soapyaudio/src=/usr/src/debug/soapyaudio -flto=auto -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -Wno-unused-parameter -Wall -Wextra -Wnon-virtual-dtor -MD -MT CMakeFiles/audioSupport.dir/Version.cpp.o -MF CMakeFiles/audioSupport.dir/Version.cpp.o.d -o CMakeFile
s/audioSupport.dir/Version.cpp.o -c /build/soapyaudio/src/build/Version.cpp
/usr/bin/c++ -D_REENTRANT -DaudioSupport_EXPORTS -I/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 -I/usr/include/rtaudio -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSE
RTIONS -g -ffile-prefix-map=/build/soapyaudio/src=/usr/src/debug/soapyaudio -flto=auto -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -Wno-unused-parameter -Wall -Wextra -Wnon-virtual-dtor -MD -MT CMakeFiles/audioSupport.dir/Settings.cpp.o -MF CMakeFiles/audioSupport.dir/Settings.cpp.o.d -o CMakeFi
les/audioSupport.dir/Settings.cpp.o -c /build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Settings.cpp
/usr/bin/c++ -D_REENTRANT -DaudioSupport_EXPORTS -I/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1 -I/usr/include/rtaudio -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSE
RTIONS -g -ffile-prefix-map=/build/soapyaudio/src=/usr/src/debug/soapyaudio -flto=auto -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -Wno-unused-parameter -Wall -Wextra -Wnon-virtual-dtor -MD -MT CMakeFiles/audioSupport.dir/Streaming.cpp.o -MF CMakeFiles/audioSupport.dir/Streaming.cpp.o.d -o CMake
Files/audioSupport.dir/Streaming.cpp.o -c /build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Streaming.cpp
/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Streaming.cpp: In member function ‘virtual int SoapyAudio::activateStream(SoapySDR::Stream*, int, long long int, size_t)’:
/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Streaming.cpp:242:14: error: ‘RtAudioError’ does not name a type; did you mean ‘RtAudioErrorType’?
  242 |     } catch (RtAudioError& e) {
      |              ^~~~~~~~~~~~
      |              RtAudioErrorType
/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Streaming.cpp:243:59: error: ‘e’ was not declared in this scope
  243 |         throw std::runtime_error("RtAudio init error '" + e.getMessage());
      |                                                           ^
/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Settings.cpp: In member function ‘virtual void SoapyAudio::writeSetting(const std::string&, const std::string&)’:
/build/soapyaudio/src/SoapyAudio-soapy-audio-0.1.1/Settings.cpp:497:40: warning: catching polymorphic type ‘class std::invalid_argument’ by value [-Wcatch-value=]
  497 |         } catch (std::invalid_argument e) { }
      |                                        ^
make[2]: *** [CMakeFiles/audioSupport.dir/build.make:104: CMakeFiles/audioSupport.dir/Streaming.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build/soapyaudio/src/build'
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/audioSupport.dir/all] Error 2
make[1]: Leaving directory '/build/soapyaudio/src/build'
make: *** [Makefile:136: all] Error 2

It would be great if this project could be made compatible with/ updated to the latest rtaudio, as it is currently blocking our rebuild TODO.

Two devices reported as single device when reported in uhd_find_devices

SoapySDRUtil correctly reports two separate audio devices as two devices, as does the PothosFlow host explorer.

ncorgan@edi:~/dev/sdr/build/SoapyAudio$ SoapySDRUtil --find=driver=audio
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################


RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.

Found device 0
  default_input = True
  default_output = False
  device_id = 0
  driver = audio
  label = hw:HDA Intel PCH,0

Found device 1
  default_input = False
  default_output = False
  device_id = 2
  driver = audio
  label = default

However, uhd_find_devices outputs:

ncorgan@edi:~/dev/sdr/build/SoapyAudio$ uhd_find_devices 
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501; UHD_3.14.1.HEAD-0-gbfb9c1c7

RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.

--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: 
    default_input: False
    default_input: True
    default_output: False
    device_id: 0
    device_id: 2
    driver: audio
    label: default
    label: hw:HDA Intel PCH,0
    type: soapy

uhd_usrp_probe just crashes, but that may be a separate issue.

Off by one sample problems

During the development of the OpenRadio SDR[1] it was discovered that some sound cards present samples from one channel with a permanent delay of one sample, needs to be corrected for in sotware, see comments on [2].

I know quisk uses the 'channel_delay' option to configure it, not sure where in quisk's source code it gets handled!

[1] http://openradio.net.au/index.php/OpenRadio_SDR
[2] https://ceworkbench.wordpress.com/2011/05/27/a-homebrew-soundcard-using-the-pcm2904/

Basic wiki page

  • soapy logo + speaker logo
  • dependencies
  • source build instructions
  • example use

Multiple audio source.

I'm try to use four FCD pro on remote PC via CubicSDR/SoapyRemote/SoapyAudio:

  1. How can i select FCD dongle? I'm see only one device - PulseAudio and can not specify source (if i connect to remote PC via SSH then i can select FCD via switch audio source but switch audio source via SoapyRemote impossible).
  2. FCD pro sample rate is 192k but only 96k may be selected via SoapyAudio.
  3. I'm can not freq manipulate via hamlib - rigctl work (i'm can not specify FCD dongle, but i can see freq from first of all), but freq not show in CubicSDR.

rtaudio library

I read #7 about rtaudio system library; is there some technical reason to avoid it or only lack of time? thanks

CAT ham radio serial control

Where available allow supplying path/device name for serial port so that Frequency, etc. control can be controlled/read via CAT serial commands.

  • basic frequency control and feedback via hamlib
  • figure out what else we can shoehorn in from hamlib without going overboard :)

Audio Output

  • Support audio output as Real Mono/Stereo and Complex Stereo on default device
  • Support device and Output port selection
  • Support hamlib CAT control (#3) for radio TX operation

Audio Input

  • Use Default Soundcard Mic as single source
  • Input as Real (stereo) or Complex (I/Q) source
  • Support Device selection and Mic/Line/etc input source

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.