Before I go any further with a project I though I would ask if anyone has had any problems using openGLES and the GPU FFT functions in the same application ?
PeterO
GL ES with FFT: Any Problems ? Works on PI2
Last edited by PeterO on Sat Feb 07, 2015 4:23 pm, edited 3 times in total.
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
I guess no one else has tried this because first indications are that it is totally broken 
Running hello_fft while an openGLES application is running stops the openGLES application dead, and it won't run again until the PI is rebooted.
And until the reboot the fft won't work again either ! This is really very disappointing
PeterO

Running hello_fft while an openGLES application is running stops the openGLES application dead, and it won't run again until the PI is rebooted.
And until the reboot the fft won't work again either ! This is really very disappointing

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
I'm getting help from Andrew Holme (author of the gpu_fft code) and things are looking promising 
PeterO

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
Just a quick update... Thanks to Andrew and dom this is now working
I believe some uber-gpu-foo was used to fix the problems 
Now I can get on with my code
PeterO


Now I can get on with my code

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
- hanzelpeter
- Posts: 75
- Joined: Mon Jul 09, 2012 11:56 am
Re: GL ES with FFT: Any Problems ?
Can you write where was the problem?
Re: GL ES with FFT: Any Problems ?
Sorry I don't know what the problems were other then it was something to do with the mailbox code in the firmware and the cache configuration for the fft.hanzelpeter wrote:Can you write where was the problem?

That is a 1024 point FFT being computed and displayed 20 times a second. Input data is currently comming from a 96kHz wav file until I get the alsa sound recording code developed.
Next task is a waterfall display in the bottom half of the screen.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
That's cool!PeterO wrote:And now with a waterfall dispaly as well
http://www.peteronion.org.uk/PiPics/pipan1.mpeg
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 5709
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: GL ES with FFT: Any Problems ?
The uber-gpu-foo should now be in rpi-update firmware.PeterO wrote:Just a quick update... Thanks to Andrew and dom this is now workingI believe some uber-gpu-foo was used to fix the problems
Re: GL ES with FFT: Any Problems ?
My plan was to drive this display from a 96kHz I2S audio ADC, but now that I've looked at I2S suport I see the state of the I2S drivers is so poor that the whole thing is now looking unworkable.
Why people think it is acceptable to produce I2S hardware for which users have to build custom kernels is beyond me. I though those days were long past
PeterO
Why people think it is acceptable to produce I2S hardware for which users have to build custom kernels is beyond me. I though those days were long past

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
Actually, having run rpi-update last evening I can now successfully capture 96kHz audio from my USB soundcard so there is no need to mess about with the broken I2S sub-sysytem.
PeterO
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ?
http://www.peteronion.org.uk/PiPics/pipan2.mpeg
Real time display using 96kHz sampling from a USB soundcard... And not even overclocked !
PeterO
G0DZB
Real time display using 96kHz sampling from a USB soundcard... And not even overclocked !
PeterO
G0DZB
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 5709
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: GL ES with FFT: Any Problems ?
I like it!PeterO wrote:Real time display using 96kHz sampling from a USB soundcard... And not even overclocked !
Years ago I remember eavesdropping pager messages with this sort of equipment. I wonder if people even use pagers now...
Re: GL ES with FFT: Any Problems ?
I wondered if you have a callsign, now I think I know what FFT and waterfalls are for. Hopefully psk and RTTY will be supported. 
Ken
M0GBP

Ken
M0GBP
PeterO wrote:http://www.peteronion.org.uk/PiPics/pipan2.mpeg
Real time display using 96kHz sampling from a USB soundcard... And not even overclocked !
PeterO
G0DZB
Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Download from http://pipresents.wordpress.com
Re: GL ES with FFT: Any Problems ?
Twitchers do, pagers have better coverage than mobile phones. That, the internet, and digital photography have changed the face of twitching in the last few years.dom wrote:I like it!PeterO wrote:Real time display using 96kHz sampling from a USB soundcard... And not even overclocked !
Years ago I remember eavesdropping pager messages with this sort of equipment. I wonder if people even use pagers now...
Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Download from http://pipresents.wordpress.com
Re: GL ES with FFT: Any Problems ?
Ken,KenT wrote:I wondered if you have a callsign, now I think I know what FFT and waterfalls are for. Hopefully psk and RTTY will be supported.
Ken
M0GBP
I've got no plans at the monent to do anything other than a panadapter. It still needs to have a graticule and axis labels, then USB interface to radio to read the center frequency, then mouse control for manual scaling etc.
TBH for narrow band data mode decoding I think it is better (and easier) to use the demodulated and filtered audio from the radio than to start from raw broadband I/Q signals.
PeterO
G0DZB
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ? (not any more!)
Graticule added to graph, and improved spectum calculation that uses all of the available I/Q samples rather than throwing 3/4 of them away. Result is better S/N due to some averaging over 4 transforms. Still some work to do in that area including trying overlapping transforms.
Next is some axis labels.
http://www.peteronion.org.uk/PiPics/PiPan2.png
PeterO
G0DZB
Next is some axis labels.
http://www.peteronion.org.uk/PiPics/PiPan2.png
PeterO
G0DZB
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ? (not any more!)
utube of latest version http://youtu.be/0IZxzm4R1bo
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ? (not any more!)
Yesterday I decided the time had come for a major "code refactoring" to more cleanly separate the alsa,rig control,fft,and opeGLES into theor own source files. I also started to review the code, clean out dead "experimental" code and improve comments. All working towards the first release of the source code.
Then I spent some time on IM with the Fun Cube Dongle developer trying to get that to work reliably on the RPI. It's pretty close to working but it seems 192kHz sampling pushes the USB system just over the edge of it's capabilities. But we've not given up hope yet.
Latest version has rig control via hamlib libraries and mouse contol of a set of cross hairs. Clicking the left mouse button retunes the radio to put the signals under the cross-hairs into the reciever passband.
PeterO
G0DZB
Then I spent some time on IM with the Fun Cube Dongle developer trying to get that to work reliably on the RPI. It's pretty close to working but it seems 192kHz sampling pushes the USB system just over the edge of it's capabilities. But we've not given up hope yet.
Latest version has rig control via hamlib libraries and mouse contol of a set of cross hairs. Clicking the left mouse button retunes the radio to put the signals under the cross-hairs into the reciever passband.
PeterO
G0DZB
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
-
- Posts: 42
- Joined: Fri Feb 14, 2014 7:21 pm
Re: GL ES with FFT: Any Problems ?
Was this display produced w/ OpenGL?PeterO wrote:
That is a 1024 point FFT being computed and displayed 20 times a second. Input data is currently comming from a 96kHz wav file until I get the alsa sound recording code developed.
Next task is a waterfall display in the bottom half of the screen.
PeterO
Re: GL ES with FFT: Any Problems ? (not any more!)
Yes, all the graphics are produced using openGL ES
http://www.youtube.com/watch?v=0IZxzm4R1bo
http://www.youtube.com/watch?v=0IZxzm4R1bo
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
- deltalimablahblah²
- Posts: 33
- Joined: Sat Dec 22, 2012 5:33 pm
Re: GL ES with FFT: Any Problems ? (not any more!)
Hi Peter.
Since I had a first Pi (about 2012?!) I'm waiting for a pan adapter like this. I tried to build Pappsdr on Raspian. Since now w/o any success. Ether software starts with FFT, but no sound. Or sound works, but no FFT ???.
Pappradio (a low budged SDR frontend) has I/Q out for soundcards. So I'm very interested in your pan adapter soft. Where can I get the code? Is it free/os code? My goal: to use FFT as pan adapter and write my own "cat software" to control the Pappradio.
Next Problem: sound. But is another page of the book
.
Glad to hear (read) from you.
Since I had a first Pi (about 2012?!) I'm waiting for a pan adapter like this. I tried to build Pappsdr on Raspian. Since now w/o any success. Ether software starts with FFT, but no sound. Or sound works, but no FFT ???.
Pappradio (a low budged SDR frontend) has I/Q out for soundcards. So I'm very interested in your pan adapter soft. Where can I get the code? Is it free/os code? My goal: to use FFT as pan adapter and write my own "cat software" to control the Pappradio.
Next Problem: sound. But is another page of the book

Glad to hear (read) from you.
Re: GL ES with FFT: Any Problems ? (not any more!)
I've not been doing much with this for a couple of months.... But to day I made a change to the top part of the display....
http://youtu.be/TnDgFKHmjHc
PeterO
http://youtu.be/TnDgFKHmjHc
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: GL ES with FFT: Any Problems ? (not any more!)
Added some filtering to the recovered signal, now looks a lot cleaner and should be easier to decode!

PeterO

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
- deltalimablahblah²
- Posts: 33
- Joined: Sat Dec 22, 2012 5:33 pm
Where to get the source?
Hi Peter. This looks very promising for a SWL (and for other man with hf receivers). Question again: where can we get the code? Are you willing to share it? Is it GPL'ed open source?
73 de Marco
73 de Marco