sprintf() is a bit dangerous unless you explicitly know your type size
and want to keep it in sync always. Its safer to just use snprintf() and
ensure your string doesn't overflow and is NULL terminated.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>