Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-708

Demo radio app high pitched whine/ring

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • None
    • Multimedia
    • None

      There is a prominent whining/ringing noise when playing the radio from the demo radio app, on all channels.

      When I do it from the command line:

      root@porter:~# rtl_fm -M wbfm -f 98.9M -s 256000 -r 48000 | aplay -t raw -r 48000 -c 1 -f S16_LE
      Found 1 device(s):
        0:  Realtek, RTL2838UHIDIR, SNr820t 0-001a: destroying instance
      : 00000001
      
      Ususb 2-1.1: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully deinitialized and disconnected
      ing device 0: Generic RTL2832U OEM
      Detached kernel driver
      Found Rafael Micro R820T tuner
      Tuner gain set to automatic.
      Tuned to 99172000 Hz.
      Oversampling input by: 4x.
      Oversampling output by: 1x.
      Buffer size: 8.00ms
      Sampling at 1024000 S/s.
      Output at 256000 Hz.
      Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
      underrun!!! (at least 126.411 ms long)
      

      it sounds fine. 200000 has the ringing noise, 256000 does not. I'm thinking it might use some value by default that isn't used in the radio app's implementation of rtl_fm. I can't spot it on my skim through rtl_fm.c's original source vs. the one in the radio app.

      I also ran the SDR# app in Windows to confirm it wasn't a problem with the dongle

      I've tried to edit the app to allow me to configure the sample rate (instead of hardcoding to 200000, I read a value from /etc/xdg/AGL.conf, currently set to 256000, equivalent to s 256000 on the rtl_fm command line–I can submit a patch for that if you'd like) but it doesn't get rid of the ringing the way it does on the command line.

      ay 11 16:51:09 porter afb-daemon[2448]: Using FM Bandplan: US
      May 11 16:51:09 porter afb-daemon[2448]: Found 1 device(s):
      May 11 16:51:09 porter afb-daemon[2448]:   0:  Realtek, RTL2838UHIDIR, SN: 00000001
      May 11 16:51:09 porter afb-daemon[2448]: Using device 0: Generic RTL2832U OEM
      May 11 16:51:09 porter kernel: r820t 0-001a: destroying instance
      May 11 16:51:09 porter kernel[411]: r820t 0-001a: destroying instance
      May 11 16:51:09 porter kernel: usb 2-1.1: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully deinitialized and disconnected
      May 11 16:51:09 porter kernel[411]: usb 2-1.1: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully deinitialized and disconnected
      May 11 16:51:09 porter afb-daemon[2448]: Detached kernel driver
      May 11 16:51:09 porter afb-daemon[2448]: Found Rafael Micro R820T tuner
      May 11 16:51:09 porter afb-daemon[2448]: Tuner gain set to automatic.
      ...
      May 11 16:51:14 porter afb-daemon[2448]: Tuned to 99172000 Hz.
      May 11 16:51:14 porter afb-daemon[2448]: Oversampling input by: 4x.
      May 11 16:51:14 porter afb-daemon[2448]: Oversampling output by: 1x.
      May 11 16:51:14 porter afb-daemon[2448]: Buffer size: 8.00ms
      May 11 16:51:14 porter afb-daemon[2448]: Sampling at 1024000 S/s.
      May 11 16:51:14 porter afb-daemon[2448]: Output at 256000 Hz.
      May 11 16:51:14 porter afb-daemon[2448]: output_thread_fn running
      May 11 16:51:14 porter afb-daemon[2448]: demod_thread_fn running
      May 11 16:51:14 porter afb-daemon[2448]: dongle_thread_fn running
      

      I can't spot what's the difference between the way rtl_fm does it and the way the radio app does it.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            scottm Scott Murray
            fury Dennis Field
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: