[hpsdr] ghpsdr on Fedora

John Melton John.Melton at Sun.COM
Mon May 11 13:50:59 PDT 2009


Thanks - I have updated the svn.  Didn't catch this as I am not seeing 
the problem with the test version of the new FPGA code.

Regards,

John g0orx/n6lyt


On 05/11/09 21:00, Lars E. Pettersson wrote:
> ***** High Performance Software Defined Radio Discussion List *****
> 
> On 05/11/2009 12:30 AM, Lars E. Pettersson wrote:
>> I got a couple of "process_ozy_input_buffer: did not find sync" 
>> (somewhat above 100), followed by a bunch of "ozy_ringbuffer_put: 
>> space=1 wanted=64" (almost 200 of those). Sometimes it lasted 5-10 
>> minutes before dying, sometimes it died directly after starting it.
>>
>> After some reading of the code, and some simple tests, I found a 
>> solution to the symptoms above, but not a cure for the illness 
>> though... :-)  The quick and dirty fix was:
> 
> The proper bug fix is to move pthread_mutex_lock() to the beginning of 
> ozy_ringbuffer_put(), see below.
> 
> This fixes the problem with the program dying for me, after sync errors. 
> The audio drop outs etc. are still there, but the program at least 
> continuous to run. Hopefully the new FPGA software will fix this, when 
> it is released.
> 
> 73 de Lars, sm6rpz
> 
> [lars at localhost ghpsdr]$ svn diff ozy_ringbuffer.c
> Index: ozy_ringbuffer.c
> ===================================================================
> --- ozy_ringbuffer.c    (revision 1037)
> +++ ozy_ringbuffer.c    (working copy)
> @@ -83,6 +83,9 @@
>  */
>  int ozy_ringbuffer_put(struct ozy_ringbuffer* buffer,char* f,int n) {
>      int bytes;
> +
> +    pthread_mutex_lock(&ozy_output_buffer_mutex);
> +
>      bytes=n;
>      if(ozy_ringbuffer_space(buffer)<=n) {
>  fprintf(stderr,"ozy_ringbuffer_put: space=%d 
> wanted=%d\n",ozy_ringbuffer_space(buffer),n);
> @@ -90,8 +93,6 @@
>      }
>      ozy_put_bytes+=bytes;
> 
> -    pthread_mutex_lock(&ozy_output_buffer_mutex);
> -
>      if(bytes>0) {
> 
>          if((buffer->insert_index+bytes)<=buffer->size) {
> [lars at localhost ghpsdr]$
> 

 1242075059.0


More information about the Hpsdr mailing list