alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [RFC, alsa-utils] RFC: alsamixer: Improve description of playback switches
@ 2018-03-26  5:11 Kirill Marinushkin
  2018-03-26  7:38 ` Takashi Iwai
  2018-03-26  8:19 ` Takashi Sakamoto
  0 siblings, 2 replies; 13+ messages in thread
From: Kirill Marinushkin @ 2018-03-26  5:11 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, Kirill Marinushkin

Currently, all playback switches are described as mute. It is shown as:

[OO] == sound is on (left and right channels)
[MM] == sound is muted (left and right channels)

But cards can have different kinds of switch controls, not only mute. At
least usb-audio provides boolean controls as playback switches for:

* clock source validity (read only switch)
* processing features on/off (rw switch)
* potentially other similar use-cases

It becames confusing, because it is shown as:

[OO] == clock source is valid
[MM] == clock source is invalid

[OO] == processing feature is on
[MM] == processing feature is off

And from the help, it is not clear how to toggle such switches.

In this RFC, I suggest to show switches more generic:

[yy] == sound on    / clock source is valid   / processing feature is on
[nn] == sound muted / clock source is invalid / processing feature is off

And give a more generic description in the help.

Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
---
 alsamixer/mixer_display.c | 8 ++++----
 alsamixer/mixer_widget.c  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/alsamixer/mixer_display.c b/alsamixer/mixer_display.c
index b1f79d0..f73b11a 100644
--- a/alsamixer/mixer_display.c
+++ b/alsamixer/mixer_display.c
@@ -513,13 +513,13 @@ static void display_control(unsigned int control_index)
 		mvwaddch(mixer_widget.window, base_y + 1, frame_left + 1,
 			 switches[0]
 			 /* TRANSLATORS: playback on; one character */
-			 ? _("O")[0] | (control->flags & IS_ACTIVE ? attr_ctl_nomute : 0)
+			 ? _("y")[0] | (control->flags & IS_ACTIVE ? attr_ctl_nomute : 0)
 			 /* TRANSLATORS: playback muted; one character */
-			 : _("M")[0] | (control->flags & IS_ACTIVE ? attr_ctl_mute : 0));
+			 : _("n")[0] | (control->flags & IS_ACTIVE ? attr_ctl_mute : 0));
 		waddch(mixer_widget.window,
 		       switches[1]
-		       ? _("O")[0] | (control->flags & IS_ACTIVE ? attr_ctl_nomute : 0)
-		       : _("M")[0] | (control->flags & IS_ACTIVE ? attr_ctl_mute : 0));
+		       ? _("y")[0] | (control->flags & IS_ACTIVE ? attr_ctl_nomute : 0)
+		       : _("n")[0] | (control->flags & IS_ACTIVE ? attr_ctl_mute : 0));
 	}
 
 	if (control->flags & TYPE_CSWITCH) {
diff --git a/alsamixer/mixer_widget.c b/alsamixer/mixer_widget.c
index 0c2b9e0..93d1923 100644
--- a/alsamixer/mixer_widget.c
+++ b/alsamixer/mixer_widget.c
@@ -210,9 +210,9 @@ static void show_help(void)
 		_("Z X C      Decrease left/both/right volumes"),
 		_("B          Balance left and right volumes"),
 		"",
-		_("M          Toggle mute"),
+		_("M          Toggle mute / playback switch"),
 		/* TRANSLATORS: or , . */
-		_("< >        Toggle left/right mute"),
+		_("< >        Toggle left/right mute / playback switch"),
 		"",
 		_("Space      Toggle capture"),
 		/* TRANSLATORS: or Insert Delete */
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-03-27 19:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26  5:11 [RFC, alsa-utils] RFC: alsamixer: Improve description of playback switches Kirill Marinushkin
2018-03-26  7:38 ` Takashi Iwai
2018-03-26 18:32   ` Kirill Marinushkin
2018-03-26 20:41     ` Andrew Chant
2018-03-26 21:13       ` Kirill Marinushkin
2018-03-26 21:44         ` Takashi Sakamoto
2018-03-26 21:53           ` Kirill Marinushkin
2018-03-27 19:12             ` Kirill Marinushkin
2018-03-26  8:19 ` Takashi Sakamoto
2018-03-26 18:37   ` Kirill Marinushkin
2018-03-26 18:42   ` Kirill Marinushkin
2018-03-26 22:03     ` Takashi Sakamoto
2018-03-26 22:22       ` Kirill Marinushkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).