alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Kirill Marinushkin <k.marinushkin@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
	Kirill Marinushkin <k.marinushkin@gmail.com>
Subject: [RFC, alsa-utils] RFC: alsamixer: Improve description of playback switches
Date: Mon, 26 Mar 2018 07:11:44 +0200	[thread overview]
Message-ID: <20180326051144.16672-1-k.marinushkin@gmail.com> (raw)

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

             reply	other threads:[~2018-03-26  5:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26  5:11 Kirill Marinushkin [this message]
2018-03-26  7:38 ` [RFC, alsa-utils] RFC: alsamixer: Improve description of playback switches 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180326051144.16672-1-k.marinushkin@gmail.com \
    --to=k.marinushkin@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).