Audio subsystem

For proper operation of SDR radios, based on the sound card, it is crucial to properly set up audio subsystem. First connect your SDR radio with a sound card:
Pay attention to the Stereo! label: in SDR terminology signals named I/Q are associated with the Left/Right audio channel on your sound card.
Warning: Some laptops do not have Stereo Line-in input, and can not be used for the SDR!
Picture shows minimal configuration to work with the SDR radio with CW modulation type and consists of a PC with only one sound card with stereo Line-input and Line-output. For basic tests with SDR radio this configuration is sufficient but integrated sound card is not for any serious work. It is better to use high quality 24 bit audio card with ASIO or WASAPI drivers.
After radio is connected to a PC must be set GSDR audio subsystem using the Setup-> Audio:
It starts from selecting the right audio card choice. If you do not have card from supported list, select the Unsupported Card (“supported cards” just means that certain parameters are set automatically, which is good for beginners but you can limit you later in the parameter fine tuning). Configuration starts with choice of audio Driver. Depending on the operating system and software installed on system, there are several possibilities:
If you select the ASIO audio drivers then the Input and Output fields are filled automatically (with audio card utility program set input/output ports). For MME,WDS or WASAPI we must manually set Input and Output ports. Audio Input is port from which GSDR expected data (usually Line-in) and the Audio Output port is port whereGSDR send demodulatedAF signal at the reception time or modulated I/Q signal during transmit (usually Speaker-out). For SSB,AM,DIGI modulation types mixer device choice is very important. Audio subsystem could be very different on different Windows OS. Mixer devices is available only on Windows2000/XP, Windows Vista and Windows7 have no mixer device (signal sources are treated as an end points).
If the card has an audio mixer device then fields Receive andTransmit are filled automatically. During receive GSDR reads data from Line-in, during transmit from Microphone. Genesis G59 MK2, MK3 and G11 have optionto work SSB with only one audio card without mixer device. To usethis option check “Line/Mic input shared”.
All we need is to connect Microphone to G59 (G11) Mic_input. When  receiving/transmitting radio does not switch audio sources but uses relay to switch radio I/Q output with microphone. Additionally is available AF microphone amplifier (optional). This feature requires G59 PIC firmware 1.0.8 or later (G11 has this option from the start). If your audio card does not have MixerDevice you need additionalaudio card. It is necessary to use VAC (Virtual Audio Cable –option GSDR built). Check option:
It is necessary to complete the audio settings by selecting Buffer Size and Sample Rate. Sample rate value depends on the possibilities of the audio card and its driver.
In the example above(Creative E-MU 1212) means that the sampling of the input signal is occurred 96000 times per second, each time we get 24 bits. In other words if we increase Sample Rate we also increase amount of data processed by the central CPU. CPU load is higher but also is higher frequency spectrum viewed on the screen. Buffer size by default is 2048. If we reduce buffer size we can reduce audio latency but if PC is not fast enough (or drivers are inadequate) received audio could result with “cracks”.
For audio cards with multiple inputs/outputs its possible to choose which pair is used for receiving/transmitting. Vista/Windows 7 additionally allows to select Exculsive access. This option means that, if enabled in the Windows, only GSDR can access input/output audio sources(end points). To take maximum advantage of WASAPI audio drivers GSDR start separate callbacks functions for audio input and output which result
very low latency of 3ms.
Warning: exclusive access do not work with ASIO audio drivers!
Example how to connect Delta 44 in 4 channel mode:
(1/2 portson receiveas I/Q input, microphone connected to input3, 1/2 outputs areI/Q modulated output and 3/4 outputs as a CW monitor during transmit). If your screen signals are reversed (USB sounds like LSB) use RX swap I/Q. Option TX swap I/Q swaps left/right output signals (use it when your RF signal is at “wrong frequency”).
Why is this important? When connecting the Genesis radio devices with audio inputs/outputs and making the necessary cabling it is difficult to always have
Why is this important? When connecting the Genesis radio devices with audio inputs/outputs and making the necessary cabling it is difficult to always have the correctlly connected Left/Right channels on both sides (especially if you use different SDR programs).
Some audio cards required correction between Left/Right A/D branch.If we do not correct this delay result is poor image rejection unwanted signals (almost like Mono audio input).
(usually Audigy cards requires I/Q correction).
Latency time must be set manually:
Recommendation: MME – 50ms, ASIO 5-10ms, forWASAPIaudio driver type 0 and let the driver calculate minimum possible value. Later you can read in the section Tests actual value. Note: incorrectly set value for Latency resulting in intermittent sound (crunches) and it can also be seen on Panadapter screen: signals with jagged edges, jumping up-down.
For correctly calculated RF output power it is necessary to set Audio Output Voltage:
In Windows 2000/Windows XP and audio card with Mixer device by pressing the Test button GSDR sets to maximumvalue of Line-out (Wave output in Windows Mixer). For precise measurement we need True RMS meter (sinusoidal audio signal is generated)and to enter measured value in the Audio Output Voltage box. If you do not have this audio card, or you do not have a quality equipment,experiment: lower value means that GSDR output voltage is increased to obtain the desired RF power output and vice versa. Note: some audiocards have their own utilities software that changes the input/output gain and is necessary first to use these programs to set the desired signal level.
(example for E-MU 1212 utility program)
VAC
GSDR provides two ways for VAC using. First is a classic as is used in all versions of PowerSDR:
In this case it is usedRealtek HD audio codec (integrated on a motherboard  GA-MA770 DS3). Microphone input is port from which GSDR will read data during transmit period. Only with two audio cards can be usedVOX function (or a card with 4 inputs such as the Delta 44 and similar). To operate with SSB ordigital modesit is necessary to correctly setthe VAC (virtual audio cable – external software, do not mixed with GSDR VAC). Parameters of VAC audio card are the same as for the primary with one big difference: performance are not important as the performance of the primary sound card because virtual audio card is not connected to the SDR radio(any integrated onboard will do).Simplest is to choose MME audio driver with 50ms latency, BufferSize 2048 and SampleRate set to be identical with the primary to avoid resampling
(conversion 48000-96000 or similar further increase CPU load). Select Input source signal forthe microphone (or optional VirtualAudioCable software for digital modulation types) and the speaker output for demodulated audio signal (or VirtualAudioCable for digital modes).
Additional options:
- VAC monitor option allows us to listen CW monitor;
- Excl. Access to the audio sources (like for main audio card, ie. allows access only to GSDR);
- Large buffer RB is required only if you have any problems with the ring-buffer performance (hiccups in the audio signal).
Warning: in external programs revert Input/Output:
In this example it is well known JT65HF program connected to GSDR via Virtual Audio  Cable software (external program must be configured separately):
Another way to use VAC is byusing special callback input/output functions that require a very fast computer:
In this example, the first we confirm “Excl. Acess” and then set 4 channel mode: the main I/Q audio card is a Creative E-MU 1212 in 2 channel mode, a Realtek HD audio is in charge of the mic and RX_out(speaker).Achieved latency is very lowbut with higher CPU load.
There is a special kind of software which can exchange data with other programs in a very simple way using Loop DLL interface (written by HB9TLK):
It is necessary to enter path to the file loop.dll which can used to exchange audio data between GSDR programs and external programs with loop.dll support (only one instance of loop.dll is allowed in search $PATH). Successfully tested with WinPSK MultiPSK and programs. As an input/output use loop.dll option from the drop down menu. Note: due to the way how Windows searches for loop.dll you need to change the local $PATH variable (in first line add location for WinPSKse223 or MultiPSK program).
      Goran Radivojevic YT7PWR
            14.06.2012