spkr-beep / beep

beep is a command line tool for linux that beeps the PC speaker
https://github.com/spkr-beep/beep
GNU General Public License v2.0
68 stars 11 forks source link

Check SND_TONE support and fall back to SND_BELL? #12

Open ndim opened 4 years ago

ndim commented 4 years ago

This appears interesting for the evdev driver: https://github.com/johnath/beep/pull/17

ndim commented 4 years ago

More on Bastian Krause's pull request about falling back to SND_BELL

The current beep evdev driver in beep-driver-evdev.c opens the well known device /dev/input/by-path/platform-pcspkr-event-spkr by default which is implemented by the pcspkr.ko kernel driver.

Do platforms with gpio-beeper have a similarly well-known device file? If so, the question is whether to have a different driver inside beep for that well-known device, or use the same driver and have it probe a list of device files, and then deciding whether to expect SND_TONE or falling back to SND_BELL.

Also, on non-PC embedded systems (which might be slower than a PC) the sloooooooooooooooooowness of the evdev driver API elaborated on in https://github.com/spkr-beep/beep/issues/6 might be an interesting consideration.

ndim commented 4 years ago

According to https://github.com/johnath/beep/pull/17#issuecomment-596506154: /dev/input/by-path/platform-gpio-beeper-event