Dne 08. 04. 21 v 13:05 Takashi Iwai napsal(a):
On Thu, 08 Apr 2021 12:38:19 +0200, Takashi Sakamoto wrote:
It should be done to emit snd_ctl_event when changing card parameters. Silent change is the worst since many userspace applications can refer to them in advance.
Agreed. The changes of those names during operation is fairly intrusive, and can bring many side-effects.
The event may be nice, indeed. The locking is also not so safe. But it should be implemented separately.
Any reason that mixername and co have to be changeable inevitably? If that's about UCM profile and its selection of the hardware configuration, can it be another additional information instead of overwriting the existing strings set by the driver?
Thanks for the discussion. I expected it. The ASoC drivers set all those parameters in an inconsistent way (nobody verifies that) and I just propose to fix things at boot in the user space. The goal is not to allow the random user changes, but to modify this settings via udev in a persistent way. Also, another firmware can really make the card different from the user space view.
Yes, it's for UCM, but even if we don't consider this purpose, the kernel API should return some reasonable information rather than very generic (or empty) strings which are used in the native ALSA utilities for example. So, I think that we should allow to "fix" this info also from the user space rather than to extend the existing API.
Jaroslav