discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gnuradio-companion


From: Sid Boyce
Subject: Re: [Discuss-gnuradio] gnuradio-companion
Date: Tue, 23 Apr 2013 16:57:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

I always build from source as there are some additions  from dl2stg needed for HiQSDR support.
I think I'll ask him to submit them upstream.

# cat /usr/src/gnuradio_audio.diff
diff --git a/gr-audio/lib/alsa/audio_alsa_source.cc b/gr-audio/lib/alsa/audio_alsa_source.cc
index 4f0042b..fe41e43 100644
--- a/gr-audio/lib/alsa/audio_alsa_source.cc
+++ b/gr-audio/lib/alsa/audio_alsa_source.cc
@@ -95,6 +95,7 @@ audio_alsa_source::audio_alsa_source (int sampling_rate,
   int          error;
   int  dir;
 
+  hwParamsSet = false;
   // open the device for capture
   error = snd_pcm_open(&d_pcm_handle, d_device_name.c_str (),
                       SND_PCM_STREAM_CAPTURE, 0);
@@ -231,11 +232,15 @@ audio_alsa_source::check_topology (int ninputs, int noutputs)
     return false;
   }
 
-  // set the parameters into the driver...
-  err = snd_pcm_hw_params(d_pcm_handle, d_hw_params);
-  if (err < 0){
-    output_error_msg ("snd_pcm_hw_params failed", err);
-    return false;
+  // SG
+  if (!hwParamsSet) {
+      // set the parameters into the driver...
+      err = snd_pcm_hw_params(d_pcm_handle, d_hw_params);
+      if (err < 0){
+         output_error_msg ("snd_pcm_hw_params failed", err);
+         return false;
+      }
+      hwParamsSet = true;
   }
 
   d_buffer_size_bytes =
diff --git a/gr-audio/lib/alsa/audio_alsa_source.h b/gr-audio/lib/alsa/audio_alsa_source.h
index e38af38..7fdcdb5 100644
--- a/gr-audio/lib/alsa/audio_alsa_source.h
+++ b/gr-audio/lib/alsa/audio_alsa_source.h
@@ -101,6 +101,9 @@ protected:
   int work_s32_2x1 (int noutput_items,
                    gr_vector_const_void_star &input_items,
                    gr_vector_void_star &output_items);
+
+private:
+  bool hwParamsSet;
 };
 
 #endif /* INCLUDED_AUDIO_ALSA_SOURCE_H */
73 ... Sid.

 
On 23/04/13 15:55, address@hidden wrote:

On 23 Apr 2013 10:51, Sid Boyce wrote:

On 23/04/13 14:51, Bastian Bloessl wrote:
Hello Sid, On 04/23/2013 03:46 PM, Sid Boyce wrote:
# gnuradio-config-info -v v3.6.4.1-106-gf1dbf510 On bot x86_64 and ARM gnuradio used to work now I get a pop-up complaining about PYTHONPATH. "export PYTHONPATH=/usr/lib/python2.7" on ARM and "export PYTHONPATH=/usr/lib64/python2.7" on openSUSE doesn't help.
for me that usually means I forgot sudo ldconfig Best, Bastian
That's not it.
When I initially installed it, gnuradio-companion worked on openSUSE 
x86_64 and Ubuntu ARM for some days, so my guess was that something in 
subsequent updates caused the problem.

That's why I rebuilt the ARM version but got exactly the same problem.
73 ... Sid.

If you initially installed from binary, and then installed from source, the PYTHONPATH locations are different.

A typical source install installs to /usr/local  whereas a packaged install installs to /usr

 

 

 


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Senior Staff Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

reply via email to

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