johnath / beep

beep is a command line tool for linux that beeps the PC speaker
http://www.johnath.com/beep/
GNU General Public License v2.0
186 stars 49 forks source link

Check for supported events first, send SND_BELL as fallback #17

Open Bastian-Krause opened 4 years ago

Bastian-Krause commented 4 years ago

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.

ndim commented 4 years ago

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.

ndim commented 4 years ago

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.

Bastian-Krause commented 4 years ago

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.

Yep, it's /dev/input/by-path/platform-gpio-beeper-event.