G2 audio architecture

G2 operating system and special app's (e.g. p2app) discussion only--post Thetis and piHPSDR questions in their own sub-forums
ct1iqi
Posts: 45
Joined: Thu Jul 06, 2023 4:01 pm

G2 audio architecture

Postby ct1iqi » Tue Sep 12, 2023 7:56 am

for historical reasons the audio codec on the Saturn board is interfaced to the FPGA and is not 'seen' by the Linux OS running on the CM4.
Can this be changed by a change to the FPGA programming?
Could a switch be introduced in the FPGA that, in the case of using p2app and an external sdr application, keeps things as they are now, and in the case of using the embedded pihpsdr makes the audio codec show up as a peripheral to CM4's Linux OS. The embedded app connects to the FPGA using DMA over the PCIe bus. Could the codec, optionally, also be connected to that PCI bus? I'd like to stream rx/tx audio from the embedded OS via ethernet, and add record and play-back audio functionality to pihpsdr. Just having the audio codec available from Linux would open up many possibilities.
User avatar
w-u-2-o
Posts: 5922
Joined: Fri Mar 10, 2017 1:47 pm

Re: G2 audio architecture

Postby w-u-2-o » Tue Sep 12, 2023 1:26 pm

The CODEC implementation is essentially a custom sound card dedicated to openHPSDR client software (PowerSDR, Thetis, piHPSDR, linHPSDR).

While it might be technically possible to change the FPGA firmware to create the appearance of a standard PCIE sound interface supported by the Raspian OS, that is a ton of work. And, given much easier options available, it's not likely that anyone would ever attempt to accomplish this.

If you want a sound interface on the Linux side, simply buy a compatible USB sound interface and plug it in.
ct1iqi
Posts: 45
Joined: Thu Jul 06, 2023 4:01 pm

Re: G2 audio architecture

Postby ct1iqi » Wed Sep 13, 2023 8:45 am

tnx. In my case need to access the rx and tx audio and send that as a stream over the internet.
Thought of a work around that may help others:
Pulseaudio, part of the Rpi OS, has the option of defining virtual audio sinks. From embedded pihpsdr that sink can be chosen as local audio. Pulseaudio automatically for every sink also creates a sink.monitor that can be used as source for another application, in my case ffmpeg that creates the stream I need. Noticed that choosing, in the RX menu, local audio and the virtual pulseaudio sink, does not stop the G2 headphone output.

Return to “G2 Operating System & Applications”