OSDN Git Service

alsactl: handle detection of new sound card
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 14 Oct 2018 14:36:33 +0000 (23:36 +0900)
committerJaroslav Kysela <perex@perex.cz>
Sun, 14 Oct 2018 14:57:15 +0000 (16:57 +0200)
commite57a0a0809fb0fd6e15e2efa107d92d85a0031c3
treee977dfe2cb3450e1653462c9c0159c7b7e4bfe79
parent440ea7d38df6a8b86a5819a42c473c57826f79e4
alsactl: handle detection of new sound card

At present, plug-and-play is not supported in a mode of 'monitor',
thus new sound card is not handled during runtime. This is not happy.

This commit uses Linux-specific inotify(7) to monitor '/dev/snd'
directory. When some files are newly added to the directory,
event dispatcher is suspended. Event sources are scanned again and the
dispatcher continue to run.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/monitor.c