Re: [Alsa-devel] [patch] Envy24control access to 6Fire controls

2003-10-30 Thread Steffen Sauder
Hi Daniel,

This patch against the stable version of envy24control gives access to most of the Terratec DMX 6Fire mixer controls.  It also changes the lables on the inputs in the monitor mixer to be more useful.  It should have no effect on your envy24control if you are using a card other than the 6Fire.

Works fine for me, nice to finally have the input switches available in 
envy24control. Though envy24control really is flexible, I always wished 
to have an less complex mixer for the DMX6Fire, but never took the time 
to write one or patch e24c for that purpuse. So if you ever get in that 
mood again, it would be nice if you could also change the other labels 
in the patchbay/router tab and the analog volume tab. (ADC0-In CD L , 
ADC1-In CD R, ..., IGPA 0 - Gain CD-L, IPGA 1 - Gain CD-R ...).

And I really wish I had a mixer that would handle the stereo channels as 
what they are. Its annoying to have 6 sliders for adjusting the volume 
of your line-in, for example, but since you're no programmer, you 
probably won't fix that :)

Note that I'm not a programmer, so there might be huge errors in this...

Haven't really looked at the code, but it seems to work flawlessly.

gruß,
Steffen


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] [patch] Envy24control access to 6Fire controls

2003-10-29 Thread Daniel Ankers
Hi,
This patch against the stable version of envy24control gives access to most of the 
Terratec DMX 6Fire mixer controls.  It also changes the lables on the inputs in the 
monitor mixer to be more useful.  It should have no effect on your envy24control if 
you are using a card other than the 6Fire.

Note that I'm not a programmer, so there might be huge errors in this...
Dan

diff -ubr alsa-tools-0.9.8/envy24control/envy24control.c 
alsa-tools-0.9.8-6fire/envy24control/envy24control.c
--- alsa-tools-0.9.8/envy24control/envy24control.c  2003-10-10 08:47:38.0 
+0100
+++ alsa-tools-0.9.8-6fire/envy24control/envy24control.c2003-10-29 
22:57:30.0 +
@@ -94,6 +94,20 @@
 GtkWidget *hw_spdif_input_coaxial_radio;
 GtkWidget *hw_spdif_input_optical_radio;
 
+GtkWidget *input_interface_internal;
+GtkWidget *input_interface_front_input;
+GtkWidget *input_interface_rear_input;
+GtkWidget *input_interface_wavetable;
+
+GtkWidget *hw_breakbox_led_on_radio;
+GtkWidget *hw_breakbox_led_off_radio;
+
+GtkWidget *hw_phono_input_on_radio;
+GtkWidget *hw_phono_input_off_radio;
+
+GtkWidget *hw_spdif_switch_on_radio;
+GtkWidget *hw_spdif_switch_off_radio;
+
 GtkObject *av_dac_volume_adj[10];
 GtkObject *av_adc_volume_adj[10];
 GtkObject *av_ipga_volume_adj[10];
@@ -119,6 +133,18 @@
 
if (stream = 10) {
sprintf(str, PCM Out %i, stream);
+   } else if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)  (stream == 
11)) {
+   sprintf(str, CD In L);
+   } else if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)  (stream == 
12)) {
+   sprintf(str, CD In R);
+   } else if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)  (stream == 
13)) {
+   sprintf(str, Line In L);
+   } else if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)  (stream == 
14)) {
+   sprintf(str, Line In R);
+   } else if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)  (stream == 
15)) {
+   sprintf(str, Phono/Mic In L);
+   } else if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)  (stream == 
16)) {
+   sprintf(str, Phono/Mic In R);
} else if (stream = 18) {
sprintf(str, H/W In %i, stream - 10);
} else if (stream == 19) {
@@ -1092,7 +1118,7 @@
GSList *group = NULL;
int hide = 1;
 
-   if(card_eeprom.subvendor == ICE1712_SUBDEVICE_DELTADIO2496)
+   if((card_eeprom.subvendor == ICE1712_SUBDEVICE_DELTADIO2496) || 
(card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE))
hide = 0;
 
frame = gtk_frame_new(S/PDIF Input);
@@ -1127,11 +1153,202 @@
gtk_widget_hide_all(frame);
 }
 
+static void create_spdif_on_off(GtkWidget *box)
+{
+GtkWidget *frame;
+GtkWidget *vbox;
+GtkWidget *radiobutton;
+GSList *group = NULL;
+int hide = 1;
+
+if( card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)
+hide = 0;
+
+frame = gtk_frame_new(S/PDIF On/Off);
+gtk_widget_show(frame);
+gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0);
+gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
+
+vbox = gtk_vbox_new(FALSE, 0);
+gtk_widget_show(vbox);
+gtk_container_add(GTK_CONTAINER(frame), vbox);
+gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
+
+radiobutton = gtk_radio_button_new_with_label(group, On);
+hw_spdif_switch_on_radio = radiobutton;
+group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton));
+gtk_widget_show(radiobutton);
+gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0);
+gtk_signal_connect(GTK_OBJECT(radiobutton), toggled,
+  (GtkSignalFunc)spdif_on_off_toggled,
+  (gpointer)On);
+
+radiobutton = gtk_radio_button_new_with_label(group, Off);
+hw_spdif_switch_off_radio = radiobutton;
+group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton));
+gtk_widget_show(radiobutton);
+gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0);
+gtk_signal_connect(GTK_OBJECT(radiobutton), toggled,
+  (GtkSignalFunc)spdif_on_off_toggled,
+  (gpointer)Off);
+
+if(hide)
+gtk_widget_hide_all(frame);
+}
+
+static void create_breakbox_led(GtkWidget *box)
+{
+GtkWidget *frame;
+GtkWidget *vbox;
+GtkWidget *radiobutton;
+GSList *group = NULL;
+int hide = 1;
+
+if( card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE)
+hide = 0;
+
+frame = gtk_frame_new(Breakbox LED On/Off);
+gtk_widget_show(frame);
+gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0);
+gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
+
+vbox = gtk_vbox_new(FALSE,