diff --git a/src/window-mixer.c b/src/window-mixer.c index d5bf597..2fc78c4 100644 --- a/src/window-mixer.c +++ b/src/window-mixer.c @@ -69,14 +69,20 @@ GtkWidget *create_mixer_controls(struct alsa_card *card) { if (!elem->card) continue; - // looking for "Mix X Input Y Playback Volume" elements - if (strncmp(elem->name, "Mix ", 4) != 0) - continue; + // looking for "Mix X Input Y Playback Volume" + // or "Matrix Y Mix X Playback Volume" elements (Gen 1) if (!strstr(elem->name, "Playback Volume")) continue; + if (strncmp(elem->name, "Mix ", 4) && + strncmp(elem->name, "Matrix ", 7)) + continue; + + char *mix_str = strstr(elem->name, "Mix "); + if (!mix_str) + continue; // extract the mix number and input number from the element name - int mix_num = elem->name[4] - 'A'; + int mix_num = mix_str[4] - 'A'; int input_num = get_num_from_string(elem->name) - 1; if (mix_num >= MAX_MIX_OUT) {