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

易先生 yixingwang0517 at 163.com
Thu Dec 2 10:15:09 CET 2021


hi, team


When i execute the following commands sequencitally,

alsa store -f 1.txt

alsa 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.





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".







-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 39771 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20211202/12b29703/attachment-0001.png>


More information about the Alsa-devel mailing list