<Dirk.Kalis@t-online.de>

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.
This commit is contained in:
Jaroslav Kysela 2004-02-24 19:05:44 +00:00
parent 902bb89cbd
commit 766a16ca2e
5 changed files with 21 additions and 16 deletions

View file

@ -32,13 +32,13 @@ Envy24-based card or if your Envy24 card is not configured as the first
card in your ALSA driver setup. card in your ALSA driver setup.
.TP .TP
\fI-o\fP outputs \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 .TP
\fI-i\fP inputs \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 .TP
\fI-s\fP outputs \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 .SH SEE ALSO
\fB \fB

View file

@ -1680,14 +1680,14 @@ int main(int argc, char **argv)
gtk_init(&argc, &argv); gtk_init(&argc, &argv);
name = "hw:0"; name = "hw:0";
input_channels = 8; input_channels = MAX_INPUT_CHANNELS;
output_channels = 10; output_channels = MAX_OUTPUT_CHANNELS;
spdif_channels = 2; spdif_channels = MAX_SPDIF_CHANNELS;
while ((c = getopt_long(argc, argv, "D:c:i:o:s:", long_options, NULL)) != -1) { while ((c = getopt_long(argc, argv, "D:c:i:o:s:", long_options, NULL)) != -1) {
switch (c) { switch (c) {
case 'c': case 'c':
i = atoi(optarg); i = atoi(optarg);
if (i < 0 || i >= 8) { if (i < 0 || i >= MAX_CARD_NUMBERS) {
fprintf(stderr, "envy24control: invalid card number %d\n", i); fprintf(stderr, "envy24control: invalid card number %d\n", i);
exit(1); exit(1);
} }
@ -1699,24 +1699,24 @@ int main(int argc, char **argv)
break; break;
case 'i': case 'i':
input_channels = atoi(optarg); input_channels = atoi(optarg);
if (input_channels < 0 || input_channels > 8) { if (input_channels < 0 || input_channels > MAX_INPUT_CHANNELS) {
fprintf(stderr, "envy24control: must have 0-8 inputs\n"); fprintf(stderr, "envy24control: must have 0-%i inputs\n", MAX_INPUT_CHANNELS);
exit(1); exit(1);
} }
input_channels_set = 1; input_channels_set = 1;
break; break;
case 'o': case 'o':
output_channels = atoi(optarg); output_channels = atoi(optarg);
if (output_channels < 0 || output_channels > 10) { if (output_channels < 0 || output_channels > MAX_OUTPUT_CHANNELS) {
fprintf(stderr, "envy24control: must have 0-10 outputs\n"); fprintf(stderr, "envy24control: must have 0-%i outputs\n", MAX_OUTPUT_CHANNELS);
exit(1); exit(1);
output_channels_set = 1; output_channels_set = 1;
} }
break; break;
case 's': case 's':
spdif_channels = atoi(optarg); spdif_channels = atoi(optarg);
if (spdif_channels < 0 || spdif_channels > 2) { if (spdif_channels < 0 || spdif_channels > MAX_SPDIF_CHANNELS) {
fprintf(stderr, "envy24control: must have 0-2 spdifs\n"); fprintf(stderr, "envy24control: must have 0-%i spdifs\n", MAX_SPDIF_CHANNELS);
exit(1); exit(1);
} }
break; break;

View file

@ -25,6 +25,11 @@
/* Hoontech */ /* Hoontech */
#define ICE1712_SUBDEVICE_STDSP24 0x12141217 /* Hoontech SoundTrack Audio DSP 24 */ #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 { typedef struct {
unsigned int subvendor; /* PCI[2c-2f] */ unsigned int subvendor; /* PCI[2c-2f] */
unsigned char size; /* size of EEPROM image in bytes */ unsigned char size; /* size of EEPROM image in bytes */

View file

@ -157,7 +157,7 @@ void mixer_postinit(void)
for (stream = 1; stream <= output_channels; stream++) for (stream = 1; stream <= output_channels; stream++)
mixer_update_stream(stream, 1, 1); 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); mixer_update_stream(stream, 1, 1);
for (stream = 19; stream <= spdif_channels + 18; stream++) for (stream = 19; stream <= spdif_channels + 18; stream++)
mixer_update_stream(stream, 1, 1); mixer_update_stream(stream, 1, 1);

View file

@ -25,7 +25,7 @@
#define toggle_set(widget, state) \ #define toggle_set(widget, state) \
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(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; extern int output_channels, input_channels, spdif_channels;
static int is_active(GtkWidget *widget) static int is_active(GtkWidget *widget)
@ -136,7 +136,7 @@ void patchbay_init(void)
snd_ctl_elem_value_alloca(&val); snd_ctl_elem_value_alloca(&val);
snd_ctl_elem_value_set_interface(val, SND_CTL_ELEM_IFACE_MIXER); snd_ctl_elem_value_set_interface(val, SND_CTL_ELEM_IFACE_MIXER);
snd_ctl_elem_value_set_name(val, ANALOG_PLAYBACK_ROUTE_NAME); 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++) { for (i = 0; i < output_channels; i++) {
snd_ctl_elem_value_set_numid(val, 0); snd_ctl_elem_value_set_numid(val, 0);
snd_ctl_elem_value_set_index(val, i); snd_ctl_elem_value_set_index(val, i);