Check for supported events first, send SND_BELL as fallback
The device might not support SND_TONE events, so check it and print an error if this event type is not supported.
The gpio-beeper driver does not support SND_TONE, but SND_BELL. So send that instead if SND_TONE is not supported.
Due to https://github.com/johnath/beep/issues/11#issuecomment-454056858, I will evaluate this and pick it up over at https://github.com/spkr-beep/beep.
Are there well known device names for the gpio-beeper on platforms supporting gpio-beeper? On PCs, /dev/input/by-path/platform-pcspkr-event-spkr is the well-known device name which you can just use and expect to be present.
Are there well known device names for the
gpio-beeperon platforms supportinggpio-beeper? On PCs,/dev/input/by-path/platform-pcspkr-event-spkris the well-known device name which you can just use and expect to be present.
Yep, it's /dev/input/by-path/platform-gpio-beeper-event.