From patchwork Mon Mar 26 05:11:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Marinushkin X-Patchwork-Id: 10307119 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 39B0760353 for ; Mon, 26 Mar 2018 05:12:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04B0A28B29 for ; Mon, 26 Mar 2018 05:12:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02D4728A1D; Mon, 26 Mar 2018 05:12:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2A7D29502 for ; Mon, 26 Mar 2018 05:11:28 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 77F3F266E4B; Mon, 26 Mar 2018 07:11:26 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D8296266F69; Mon, 26 Mar 2018 07:11:22 +0200 (CEST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by alsa0.perex.cz (Postfix) with ESMTP id 801B5266A73 for ; Mon, 26 Mar 2018 07:11:20 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id i75so12830185wmf.0 for ; Sun, 25 Mar 2018 22:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=At/hSgvPeXxbSpaxZGX3yImxhk+TC9CdF+wF7h/zX/k=; b=F4cOg7cqTJbj0rUpuQ3Ycqi9YsUJ+TA6BlkSqwQpr8U+/hsP46eZek87/P1m38rBS1 u6/tpdgGdJRin9K05a7ZMszAff9nHtPzofnQSV51Jg9GciKCl4rigyXCwEgpp3/YrO9O NmqCkntXgWjAPHWNBeR5tPwHm6d9BjPBOz2lG2ZLy1oD3XxVCH93YJe/71rLC0zXAWVR FweQnCLfOXuBcepIFZA5PJARVXVH2tSJGAmQeLRcRm9a4PrtzUyiLEHWaQAESCCSJtGt CDSkHQGhGYvQKlN445ylx/qkw86n4Cbr2bMvPag1AUsYi6P3s44FtWPMYGaCwYx6IDrb dU6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=At/hSgvPeXxbSpaxZGX3yImxhk+TC9CdF+wF7h/zX/k=; b=I2zpCFqmbW+rzPbYbkH5mlFz1dtVN1YLGPGaJVqJnTilBm6V8I72Ucm3zP28+Rn83t rjJzWmgnO+Buv70W8Zzs4HsYVqHO4pjG/ypAvGn6b4Ry+Wh84EqMch07c1ZJPBpets1x lxLmO5DOh8dcw9PhW2dMEL2OZmOZu1cVa/dEXa6+PqX3Xn0fzY4fwkJwmDQzhocg8XWC kIEKqu27VaNnLZdaCiKjIkN4w8//7GQcL2NB6SFLlrkYMCsjEveeE+QJ8z1dvFLFXEzo qQrlfDesZiq8HALHiiB2QTWjUee6aVQ9lWjZG+WDYZ6QoGz1V1198F6/5f7uE0xypzcG E0EQ== X-Gm-Message-State: AElRT7F2NzNsqg68F3Q9OtAEMKnxmKvzlV4QYGm8OkY6Xvj8ecVgVvIC XAFIXiTU3B2WNJIS1m8VcRA= X-Google-Smtp-Source: AG47ELuw18lO0IGELbFFzgYFKdmNC51j2mTYT9MvVaYhKiGbxttOWUkSYj7I34wDTZYTV07gVNh/vw== X-Received: by 10.80.130.67 with SMTP id 61mr34945209edf.184.1522041079843; Sun, 25 Mar 2018 22:11:19 -0700 (PDT) Received: from gentoo0.localdomain (x4dba8740.dyn.telefonica.de. [77.186.135.64]) by smtp.gmail.com with ESMTPSA id x44sm9671333ede.80.2018.03.25.22.11.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Mar 2018 22:11:18 -0700 (PDT) From: Kirill Marinushkin To: Jaroslav Kysela , Takashi Iwai Date: Mon, 26 Mar 2018 07:11:44 +0200 Message-Id: <20180326051144.16672-1-k.marinushkin@gmail.com> X-Mailer: git-send-email 2.13.6 Cc: alsa-devel@alsa-project.org, Kirill Marinushkin Subject: [alsa-devel] [RFC, alsa-utils] RFC: alsamixer: Improve description of playback switches X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Jaroslav Kysela Cc: Takashi Iwai 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 */