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.
Environment
Renesas R-Car M2 Porter
* 4-port USB 3 hub (Sabrent HB-UMP3)
** USB sound card
** GeChic 1502i touchscreen
** cinolink Bluetooth dongle
** Radio dongle purchased from RTL-SDR.com
*** DVB-T+DAB+FM+SDR
*** RTL2832U R820T2 TCXO+BIAS T+HF
*** V.3
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.