Update of /cvsroot/alsa/alsa-tools/envy24control
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25854
Modified Files:
envy24control.1 envy24control.c envy24control.h mixer.c
patchbay.c
Log Message:
<[EMAIL PROTECTED]>
I have attached patch for envy24control because after update from James
Tappin i have had problems with the mixer and patchbay.
SPDIF inputs and outputs was duplicated.
Index: envy24control.1
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/envy24control/envy24control.1,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- envy24control.1 4 Jun 2003 13:46:49 -0000 1.3
+++ envy24control.1 24 Feb 2004 19:05:44 -0000 1.4
@@ -32,13 +32,13 @@
card in your ALSA driver setup.
.TP
\fI-o\fP outputs
-Limit number of outputs to display. Default is 8.
+Limit number of analog line outputs to display. Default is 8.
.TP
\fI-i\fP inputs
-Limit number of inputs to display. Default is 10.
+Limit number of analog line inputs to display. Default is 8.
.TP
\fI-s\fP outputs
-Limit number of SPDIF outputs to display. Default is 2.
+Limit number of SPDIF inputs/outputs to display. Default is 2.
.SH SEE ALSO
\fB
Index: envy24control.c
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/envy24control/envy24control.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- envy24control.c 23 Feb 2004 12:51:02 -0000 1.21
+++ envy24control.c 24 Feb 2004 19:05:44 -0000 1.22
@@ -1680,14 +1680,14 @@
gtk_init(&argc, &argv);
name = "hw:0";
- input_channels = 8;
- output_channels = 10;
- spdif_channels = 2;
+ input_channels = MAX_INPUT_CHANNELS;
+ output_channels = MAX_OUTPUT_CHANNELS;
+ spdif_channels = MAX_SPDIF_CHANNELS;
while ((c = getopt_long(argc, argv, "D:c:i:o:s:", long_options, NULL)) != -1) {
switch (c) {
case 'c':
i = atoi(optarg);
- if (i < 0 || i >= 8) {
+ if (i < 0 || i >= MAX_CARD_NUMBERS) {
fprintf(stderr, "envy24control: invalid card number
%d\n", i);
exit(1);
}
@@ -1699,24 +1699,24 @@
break;
case 'i':
input_channels = atoi(optarg);
- if (input_channels < 0 || input_channels > 8) {
- fprintf(stderr, "envy24control: must have 0-8
inputs\n");
+ if (input_channels < 0 || input_channels > MAX_INPUT_CHANNELS)
{
+ fprintf(stderr, "envy24control: must have 0-%i
inputs\n", MAX_INPUT_CHANNELS);
exit(1);
}
input_channels_set = 1;
break;
case 'o':
output_channels = atoi(optarg);
- if (output_channels < 0 || output_channels > 10) {
- fprintf(stderr, "envy24control: must have 0-10
outputs\n");
+ if (output_channels < 0 || output_channels >
MAX_OUTPUT_CHANNELS) {
+ fprintf(stderr, "envy24control: must have 0-%i
outputs\n", MAX_OUTPUT_CHANNELS);
exit(1);
output_channels_set = 1;
}
break;
case 's':
spdif_channels = atoi(optarg);
- if (spdif_channels < 0 || spdif_channels > 2) {
- fprintf(stderr, "envy24control: must have 0-2
spdifs\n");
+ if (spdif_channels < 0 || spdif_channels > MAX_SPDIF_CHANNELS)
{
+ fprintf(stderr, "envy24control: must have 0-%i
spdifs\n", MAX_SPDIF_CHANNELS);
exit(1);
}
break;
Index: envy24control.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/envy24control/envy24control.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- envy24control.h 30 Oct 2003 15:09:04 -0000 1.11
+++ envy24control.h 24 Feb 2004 19:05:44 -0000 1.12
@@ -25,6 +25,11 @@
/* Hoontech */
#define ICE1712_SUBDEVICE_STDSP24 0x12141217 /* Hoontech SoundTrack Audio
DSP 24 */
+#define MAX_CARD_NUMBERS 8
+#define MAX_INPUT_CHANNELS 8
+#define MAX_OUTPUT_CHANNELS 8
+#define MAX_SPDIF_CHANNELS 2
+
typedef struct {
unsigned int subvendor; /* PCI[2c-2f] */
unsigned char size; /* size of EEPROM image in bytes */
Index: mixer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/envy24control/mixer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mixer.c 4 Jun 2003 13:46:49 -0000 1.7
+++ mixer.c 24 Feb 2004 19:05:44 -0000 1.8
@@ -157,7 +157,7 @@
for (stream = 1; stream <= output_channels; stream++)
mixer_update_stream(stream, 1, 1);
- for (stream = 11; stream <= input_channels + 8; stream++)
+ for (stream = 11; stream <= input_channels + 10; stream++)
mixer_update_stream(stream, 1, 1);
for (stream = 19; stream <= spdif_channels + 18; stream++)
mixer_update_stream(stream, 1, 1);
Index: patchbay.c
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/envy24control/patchbay.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- patchbay.c 4 Jun 2003 13:46:49 -0000 1.7
+++ patchbay.c 24 Feb 2004 19:05:44 -0000 1.8
@@ -25,7 +25,7 @@
#define toggle_set(widget, state) \
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), state);
-static int stream_active[10];
+static int stream_active[MAX_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS];
extern int output_channels, input_channels, spdif_channels;
static int is_active(GtkWidget *widget)
@@ -136,7 +136,7 @@
snd_ctl_elem_value_alloca(&val);
snd_ctl_elem_value_set_interface(val, SND_CTL_ELEM_IFACE_MIXER);
snd_ctl_elem_value_set_name(val, ANALOG_PLAYBACK_ROUTE_NAME);
- memset (stream_active, 0, 10 * sizeof(int));
+ memset (stream_active, 0, (MAX_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS) *
sizeof(int));
for (i = 0; i < output_channels; i++) {
snd_ctl_elem_value_set_numid(val, 0);
snd_ctl_elem_value_set_index(val, i);
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog