Skip to contentSkip to conversation

envy24control midi bugfix

PATCH Applied Dirk Jagdmann 2 participants 2 messages Jul 26, 2005 – Jul 27, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 envy24control midi bugfix

Hello developers,

this patch is a bugfix for the midi patch I posted yesterday. This patch fixes the "mute" button when driven via midi and the "LR Gang" button is set.

Signature · 3 lines
---> doj / cubic
----> http://cubic.org/~doj
-----> http://llg.cubic.org

Index: mixer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/envy24control/mixer.c,v retrieving revision 1.11

mixer.c +7 -2
diff -u -r1.11 mixer.c
@@ -133,10 +133,15 @@
 
 void mixer_set_mute(int stream, int left, int right)
 {
-	if (left >= 0)
+	int stereo = is_active(mixer_stereo_toggle[stream-1]) ? 1 : 0;
+	if (left >= 0 || stereo) {
 		toggle_set(mixer_mute_toggle[stream-1][0], left ? TRUE : FALSE);
-	if (right >= 0)
+		if(stereo && left<0) left=right;
+	}
+	if (right >= 0 || stereo) {
 		toggle_set(mixer_mute_toggle[stream-1][1], right ? TRUE : FALSE);
+		if(stereo && right<0) right=left;
+	}
 	set_switch1(stream, left, right);
 }
 
#1 lore raw
Quoted 5 lines · Dirk Jagdmann

Hello developers,

this patch is a bugfix for the midi patch I posted yesterday. This patch fixes the "mute" button when driven via midi and the "LR Gang" button is set.

Applied to CVS. Thanks.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click