diff mbox

[RFC,alsa-utils] RFC: alsamixer: Improve description of playback switches

Message ID 58f2b5d7-35ce-7233-2dbf-d4e1f0b1f617@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kirill Marinushkin March 26, 2018, 6:32 p.m. UTC
On 03/26/18 09:38, Takashi Iwai wrote:
> On Mon, 26 Mar 2018 07:11:44 +0200,
> Kirill Marinushkin wrote:
>> 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
> I don't think it's better solution, sorry.  The current symbol isn't
> the best of the best, I admit.  But yy/nn isn't better from the
> visibility POV, and what's worse is the sudden change of user
> experience on such a long-living application.  Also, you can't expect
> every user understanding English.

You are right. Change of symbols will complicate the experience. I agree that we better keep the current ones.

>
> If the problem is about the mismatch of mute/non-mute symbol against
> the switch state, we may blacklist / whitelist the element names.
> At easiest, we can keep using mute symbol for "xxx Playback Switch".
> This is very likely a mute control.  The rest is neutral, so something
> more generic symbol can be used for on/off instead of 'M'.

I faced 2 problems:

* the clock source validity was displayed as [O]. I thought it is a zero, which is the opposite from the real state
* I couldn't find how to turn the processing feature on. The help doesn't say anything about it

I agree that we better keep the symbol unchanged. But in the help we need to clarify the use-case.
Below is an alternative way to make it clear. What do you think about this?


> thanks,
>
> Takashi

Comments

Andrew Chant March 26, 2018, 8:41 p.m. UTC | #1
On Mon, Mar 26, 2018 at 11:32 AM, Kirill Marinushkin
<k.marinushkin@gmail.com> wrote:
> I faced 2 problems:
>
> * the clock source validity was displayed as [O]. I thought it is a zero, which is the opposite from the real state
> * I couldn't find how to turn the processing feature on. The help doesn't say anything about it

A recent patch of mine changed clock source validity from a mixer to a
global control, so it should no longer show up in alsamixer.
Kirill Marinushkin March 26, 2018, 9:13 p.m. UTC | #2
On 03/26/18 22:41, Andrew Chant wrote:
> On Mon, Mar 26, 2018 at 11:32 AM, Kirill Marinushkin
> <k.marinushkin@gmail.com> wrote:
>> I faced 2 problems:
>>
>> * the clock source validity was displayed as [O]. I thought it is a zero, which is the opposite from the real state
>> * I couldn't find how to turn the processing feature on. The help doesn't say anything about it
> A recent patch of mine changed clock source validity from a mixer to a
> global control, so it should no longer show up in alsamixer.

Hello Andrew,

Nice! One of the problems is solved. However, the second problem is still actual.
As you had a recent experience with alsamixer, what is your opinion?

Best Regards,
Kirill
Takashi Sakamoto March 26, 2018, 9:44 p.m. UTC | #3
Hi,

On Mar 27 2018 06:13, Kirill Marinushkin wrote:
> On 03/26/18 22:41, Andrew Chant wrote:
>> On Mon, Mar 26, 2018 at 11:32 AM, Kirill Marinushkin
>> <k.marinushkin@gmail.com> wrote:
>>> I faced 2 problems:
>>>
>>> * the clock source validity was displayed as [O]. I thought it is a zero, which is the opposite from the real state
>>> * I couldn't find how to turn the processing feature on. The help doesn't say anything about it
>> A recent patch of mine changed clock source validity from a mixer to a
>> global control, so it should no longer show up in alsamixer.
> 
> Hello Andrew,
> 
> Nice! One of the problems is solved. However, the second problem is still actual.
> As you had a recent experience with alsamixer, what is your opinion?

I think Kirill mentions a patch to change the type of 'iface' for such 
control elements to 'SNDRV_CTL_ELEM_IFACE_CARD' or 
'SNDRV_CTL_ELEM_IFACE_PCM', but I cannot find such patches in Iwai-san's 
tree[1]. I guess they're not merged yet.

In my humble opinion, if so, Kirill's patch is not better in a view of 
compatibility, because such smixer controls suddenly disappear via 
alsa-lib's mixer APIs when the patched kernel is released. In a point of 
backward compatibility, this kind of change should be avoided, as 
possible (of cource, depending on the cases).


[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=for-next


Regards

Takashi Sakamoto
Kirill Marinushkin March 26, 2018, 9:53 p.m. UTC | #4
On 03/26/18 23:44, Takashi Sakamoto wrote:
> Hi,
>
> On Mar 27 2018 06:13, Kirill Marinushkin wrote:
>> On 03/26/18 22:41, Andrew Chant wrote:
>>> On Mon, Mar 26, 2018 at 11:32 AM, Kirill Marinushkin
>>> <k.marinushkin@gmail.com> wrote:
>>>> I faced 2 problems:
>>>>
>>>> * the clock source validity was displayed as [O]. I thought it is a zero, which is the opposite from the real state
>>>> * I couldn't find how to turn the processing feature on. The help doesn't say anything about it
>>> A recent patch of mine changed clock source validity from a mixer to a
>>> global control, so it should no longer show up in alsamixer.
>>
>> Hello Andrew,
>>
>> Nice! One of the problems is solved. However, the second problem is still actual.
>> As you had a recent experience with alsamixer, what is your opinion?
>
> I think Kirill mentions a patch to change the type of 'iface' for such control elements to 'SNDRV_CTL_ELEM_IFACE_CARD' or 'SNDRV_CTL_ELEM_IFACE_PCM', but I cannot find such patches in Iwai-san's tree[1]. I guess they're not merged yet.

Andrew mentioned the patch [2]

>
> In my humble opinion, if so, Kirill's patch is not better in a view of compatibility, because such smixer controls suddenly disappear via alsa-lib's mixer APIs when the patched kernel is released. In a point of backward compatibility, this kind of change should be avoided, as possible (of cource, depending on the cases).

The patch of Andrew and my RFC serve different purposes. They do not replace each other.
Patch of Andrew made the "clock valid" global.
My RFC is to add the string in the help, to clarify how to toggle the switches in alsamixer.

>
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=for-next
>

[2] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=for-next&id=568fa7e087ef98bc85b5aa31ea7c9252c1305c1f

>
> Regards
>
> Takashi Sakamoto
Kirill Marinushkin March 27, 2018, 7:12 p.m. UTC | #5
Hello Takashi Sakamoto, Takashi Iwai, Andrew Chant,

Thank you for the discussion. I saw the drawbacks of my proposal, and it was nice to clarify them with you.

Also, during our discussion I found, that the "description of playback switches" has a different solution.
I will check my new idea. If it will work good enough, I will send a patch later.

From my perspective, we can consider this RFC to be closed.

Thanks for your attention.

Best Regards,
Kirill

On 03/26/18 23:53, Kirill Marinushkin wrote:
> On 03/26/18 23:44, Takashi Sakamoto wrote:
>> Hi,
>>
>> On Mar 27 2018 06:13, Kirill Marinushkin wrote:
>>> On 03/26/18 22:41, Andrew Chant wrote:
>>>> On Mon, Mar 26, 2018 at 11:32 AM, Kirill Marinushkin
>>>> <k.marinushkin@gmail.com> wrote:
>>>>> I faced 2 problems:
>>>>>
>>>>> * the clock source validity was displayed as [O]. I thought it is a zero, which is the opposite from the real state
>>>>> * I couldn't find how to turn the processing feature on. The help doesn't say anything about it
>>>> A recent patch of mine changed clock source validity from a mixer to a
>>>> global control, so it should no longer show up in alsamixer.
>>> Hello Andrew,
>>>
>>> Nice! One of the problems is solved. However, the second problem is still actual.
>>> As you had a recent experience with alsamixer, what is your opinion?
>> I think Kirill mentions a patch to change the type of 'iface' for such control elements to 'SNDRV_CTL_ELEM_IFACE_CARD' or 'SNDRV_CTL_ELEM_IFACE_PCM', but I cannot find such patches in Iwai-san's tree[1]. I guess they're not merged yet.
> Andrew mentioned the patch [2]
>
>> In my humble opinion, if so, Kirill's patch is not better in a view of compatibility, because such smixer controls suddenly disappear via alsa-lib's mixer APIs when the patched kernel is released. In a point of backward compatibility, this kind of change should be avoided, as possible (of cource, depending on the cases).
> The patch of Andrew and my RFC serve different purposes. They do not replace each other.
> Patch of Andrew made the "clock valid" global.
> My RFC is to add the string in the help, to clarify how to toggle the switches in alsamixer.
>
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=for-next
>>
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=for-next&id=568fa7e087ef98bc85b5aa31ea7c9252c1305c1f
>
>> Regards
>>
>> Takashi Sakamoto
diff mbox

Patch

--- a/alsamixer/mixer_widget.c
+++ b/alsamixer/mixer_widget.c
@@ -210,9 +210,11 @@  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/switch"),
                /* TRANSLATORS: or , . */
-               _("< >        Toggle left/right mute"),
+               _("< >        Toggle left/right mute/switch"),
+               _("           [O] == playback on / switch on"),
+               _("           [M] == playback muted / switch off"),
                "",
                _("Space      Toggle capture"),
                /* TRANSLATORS: or Insert Delete */