//
// The HL2 makes no use of audio samples, but instead
// uses them to write to extended addrs which we do not
- // want to do un-intentionally, therefore send zeros
- // We could also stop this data stream during TX
- // completely
+ // want to do un-intentionally, therefore send zeros.
+ // Note special variants of the HL2 *do* have an audio codec!
//
- if (device == DEVICE_HERMES_LITE2) {
+ if (device == DEVICE_HERMES_LITE2 && !hl2_audio_codec) {
TXRINGBUF[txring_inptr++]=0;
TXRINGBUF[txring_inptr++]=0;
TXRINGBUF[txring_inptr++]=0;
if(active_receiver->dither) {
output_buffer[C3]|=LT2208_DITHER_ON;
}
+ //
+ // Some HL2 firmware variants (ab-) uses this bit for indicating an audio codec is present
+ // We also accept explicit use of the "dither" box
+ //
+ if(device == DEVICE_HERMES_LITE2 && hl2_audio_codec) {
+ output_buffer[C3]|=LT2208_DITHER_ON;
+ }
if (filter_board == CHARLY25 && active_receiver->preamp) {
output_buffer[C3]|=LT2208_GAIN_ON;
}
optimize_for_touchscreen=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
}
+static void hl2audio_cb(GtkWidget *widget, gpointer data) {
+ hl2_audio_codec=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+}
+
static void split_cb(GtkWidget *widget, gpointer data) {
int new=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
if (new != split) g_idle_add(ext_split_toggle, NULL);
gtk_grid_attach(GTK_GRID(grid),mute_rx_b,col,row,1,1);
g_signal_connect(mute_rx_b,"toggled",G_CALLBACK(mute_rx_cb),NULL);
- col++;
+ row++;
+ col=0;
+ GtkWidget *touchscreen_b=gtk_check_button_new_with_label("TouchScreen");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (touchscreen_b), optimize_for_touchscreen);
+ gtk_grid_attach(GTK_GRID(grid),touchscreen_b,col,row,1,1);
+ g_signal_connect(touchscreen_b,"toggled",G_CALLBACK(touchscreen_cb),NULL);
+
+ col++;
GtkWidget *PA_enable_b=gtk_check_button_new_with_label("PA enable");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (PA_enable_b), pa_enabled);
gtk_grid_attach(GTK_GRID(grid),PA_enable_b,col,row,1,1);
g_signal_connect(PA_enable_b,"toggled",G_CALLBACK(PA_enable_cb),NULL);
- col++;
- GtkWidget *iqswap_b=gtk_check_button_new_with_label("Swap IQ");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (iqswap_b), iqswap);
- gtk_grid_attach(GTK_GRID(grid),iqswap_b,col,row,1,1);
- g_signal_connect(iqswap_b,"toggled",G_CALLBACK(iqswap_cb),NULL);
+ if (protocol == ORIGINAL_PROTOCOL && device==DEVICE_HERMES_LITE2) {
+ col++;
+ GtkWidget *hl2audio_b=gtk_check_button_new_with_label("HL2 audio codec");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hl2audio_b), hl2_audio_codec);
+ gtk_grid_attach(GTK_GRID(grid),hl2audio_b,col,row,1,1);
+ g_signal_connect(hl2audio_b,"toggled",G_CALLBACK(hl2audio_cb),NULL);
+ }
+
+#ifdef SOAPYSDR
+ if (protocol == SOAPYSDR_PROTOCOL) {
+ col++;
+ GtkWidget *iqswap_b=gtk_check_button_new_with_label("Swap IQ");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (iqswap_b), iqswap);
+ gtk_grid_attach(GTK_GRID(grid),iqswap_b,col,row,1,1);
+ g_signal_connect(iqswap_b,"toggled",G_CALLBACK(iqswap_cb),NULL);
+ }
+#endif
row++;
col=0;
g_signal_connect(rx_gain_calibration_b,"value_changed",G_CALLBACK(rx_gain_calibration_value_changed_cb),NULL);
}
- col++;
- GtkWidget *touchscreen_b=gtk_check_button_new_with_label("TouchScreen");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (touchscreen_b), optimize_for_touchscreen);
- gtk_grid_attach(GTK_GRID(grid),touchscreen_b,col,row,1,1);
- g_signal_connect(touchscreen_b,"toggled",G_CALLBACK(touchscreen_cb),NULL);
-
row++;
if(row>temp_row) temp_row=row;