[PATCH alsa-lib 2/5] mixer: simple - Move handling of 3D Control - Depth controls to the exceptions list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the custom handling of 3D Control - Depth control-names, replacing
this with adding the 3 full names which are used for such controls to the
exceptions list:

"3D Control - Depth"
"3D Control Sigmatel - Depth"
"3D Control Sigmatel - Rear Depth"

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 src/mixer/simple_none.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c
index 30d5aa8b..b29554cb 100644
--- a/src/mixer/simple_none.c
+++ b/src/mixer/simple_none.c
@@ -922,6 +922,10 @@ static const struct excep {
 	/* Avoid these Capture Volume/Switch controls getting seen as GLOBAL VOL/SW */
 	{"Capture Volume", 7, CTL_CAPTURE_VOLUME},
 	{"Capture Switch", 7, CTL_CAPTURE_SWITCH},
+	/* Playback Volume/Switch controls without a " Playback ..." suffix */
+	{"3D Control - Depth", 18, CTL_PLAYBACK_VOLUME},
+	{"3D Control Sigmatel - Depth", 27, CTL_PLAYBACK_VOLUME},
+	{"3D Control Sigmatel - Rear Depth", 32, CTL_PLAYBACK_VOLUME},
 	{NULL,}
 };
 #endif
@@ -953,13 +957,6 @@ static int base_len(const char *name, selem_ctl_type_t *type)
 		}
 	}
 
-	if (strstr(name, "3D Control")) {
-		if (strstr(name, "Depth")) {
-			*type = CTL_PLAYBACK_VOLUME;
-			return strlen(name);
-		}
-	}
-
 	*type = CTL_SINGLE;
 	return strlen(name);
 }
-- 
2.31.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux