init procedure is executed during a store and restore process when the final snd_ctl_elem is not readable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



alsa-project/alsa-utils issue #122 was edited from yixingwang0517:

When i execute the following commands sequencitally,

    alsactl store -f 1.txt
    alsactl restore -f 1.txt

my playing volume was initialized.

After a debugging process, I found the problem:

During the "store" process, a control element is saved to the configuration file only when this element is readable.While during the "restore" process, after all the control element from the configuration file is processed, an "additional control element check" which causes a "init procedure" if the result is true is processed.

![image](https://user-images.githubusercontent.com/19835921/144555692-6b3cee21-73fc-4ade-a1f4-cc8f99679a9d.png)


Thus, if total control element count is 5 with the 5th element is not readable, then there will be only 4 control element stored in the configuration file, ranges from "control.1" to "control.4".   Then the "additional control checking" process produces "true" and the variable "err" is evaluated as "-EAGAIN".

Issue URL     : https://github.com/alsa-project/alsa-utils/issues/122
Repository URL: https://github.com/alsa-project/alsa-utils



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux