They are equivalent, but __func__ is in C99. __FUNCTION__ exists only
for backwards compatibility with old gcc versions.
Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It can not be generally assumed that the directories in which asound.state
resides are writable. Use /var/lock and allow users to alter this path.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
For the plug-and-play hardware, like USB devices, it may be helpful
to manage the sound state periodically, before the devices are removed.
This change implements new commands 'daemon' and 'rdaemon' to save
the sound state in defined intervals when the sound controls are changed.
The udev rules can notify the daemon using the 'kill' or 'nrestore'
commands to rescan available cards in the system.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
To save a call to snd_config_set_xxx, replace the calls to
snd_config_make_xxx with snd_config_imake_xxx.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Also, make the initialization & restore logic for one card similar to
multiple card initialization & restore.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The initialization procedure consist from default initialization and
state restoration. When restore fails for a reason or the config file
contains inaccurate information, then init is called.
Also, if something fails (init or restore), a file specified using -r
option can be created with description what failed. It can be useful
when user space decides to notify user to set the sound driver properly.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>