Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bastian-Krause
Copy link

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.

The device might not support SND_TONE events, so check it and print an
error if this event type is not supported.

Signed-off-by: Bastian Krause <[email protected]>
The gpio-beeper driver does not support SND_TONE, but SND_BELL. So send
that instead if SND_TONE is not supported.

Signed-off-by: Bastian Krause <[email protected]>
@ndim
Copy link

ndim commented Mar 7, 2020

Due to #11 (comment), I will evaluate this and pick it up over at https://github.com/spkr-beep/beep.

@ndim
Copy link

ndim commented Mar 7, 2020

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.

ndim added a commit to spkr-beep/beep that referenced this pull request Mar 8, 2020
The gpio-beeper driver does not support SND_TONE, but SND_BELL.
So we send SND_BELL instead when SND_TONE is not supported.

Adapted the pull request from Bastian Krause <[email protected]>
from johnath#17 for spkr-beep.

No well-known devices names for those devices are known, so we
cannot try them by default.
@Bastian-Krause
Copy link
Author

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.

ndim added a commit to spkr-beep/beep that referenced this pull request Mar 10, 2020
The gpio-beeper driver does not support SND_TONE, but SND_BELL.
So we send SND_BELL instead when SND_TONE is not supported.

Adapted the pull request from Bastian Krause <[email protected]>
from johnath#17 for spkr-beep.

No well-known devices names for those devices are known, so we
cannot try them by default.
ndim added a commit to spkr-beep/beep that referenced this pull request Mar 10, 2020
The gpio-beeper driver does not support SND_TONE, but SND_BELL.
So we send SND_BELL instead when SND_TONE is not supported.

Adapted the pull request from Bastian Krause <[email protected]>
from johnath#17 for spkr-beep.

No well-known devices names for those devices are known, so we
cannot try them by default.

Closes: #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants