bug: Headset jack state not reported after Linux boot: flipper-one-input does not read the MCU's state at probe
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c, linux
- Domain
- embedded-iot
Research direction
Find the flipper-one-input driver and its probe function, then read how it handles MCU interrupts and reports SW_HEADPHONE_INSERT and SW_MICROPHONE_INSERT. Read register 0x0208 at probe and report the initial switch states before enabling the interrupt. Done when a jack already present at boot is reported correctly without requiring a plug change.
Written by the indexing model from the issue text.
Description
With a plug in the 3.5 mm jack, SW_HEADPHONE_INSERT of the "Flipper One Headset" input device reads 0 after Linux boots, until the plug is pulled and inserted again.
The MCU tracks the jack correctly: it keeps the state in its I2C intercom register 0x0208 (bit 0 headphones, bit 1 microphone) and raises an interrupt only on a change. The MCU is not reset when Linux reboots, so after boot no change happens and no interrupt comes. The flipper-one-input driver does not read 0x0208 at probe, so the switch stays at its default 0.
Steps to reproduce (image 1312, kernel 7.4.0-rc1):
Insert a plug into the jack and boot Linux (or reboot it; the MCU keeps running).
evtest --query /dev/input/eventN EV_SW SW_HEADPHONE_INSERT returns 0, i.e. not inserted. The MCU log shows [HeadphonesSrv] Headphones status changed: 00000001.
Pull the plug and insert it again: the event SW_HEADPHONE_INSERT 1 arrives and the query returns 10, i.e. inserted.
Expected: after probe, the input device reports the current jack state.
Fix: in flipper-one-input, read register 0x0208 at probe and report the initial SW_HEADPHONE_INSERT and SW_MICROPHONE_INSERT before enabling the interrupt.
- Dominant language
- Shell
- Stars
- 84
- Forks
- 38
- Avg merge
- 1d 15m
- Merged PRs (30d)
- 7
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flipperdevices/flipperone-linux-build-scripts
-
Parallel kernel builds corrupt each other's outputPossibly taken @stuartmhannon claimed this 128 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
flipperdevices/flipperone-linux-build-scripts#79 ·
Maintainers usually reply within 1 day
-
Shell-form ENTRYPOINT is a footgunPossibly taken @nitroxit claimed this 137 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
flipperdevices/flipperone-linux-build-scripts#78 ·
Maintainers usually reply within 1 day
-
DP Alt Mode: no picture in Desktop profile after USB-C replug while the DP output stays enabledPossibly taken @Yury-MonZon claimed this 3 days ago. Openbug
flipperdevices/flipperone-linux-build-scripts#206 · 5 comments · 2 assignees ·
Maintainers usually reply within 1 day
-
Onboarding toolOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
flipperdevices/flipperone-linux-build-scripts#205 ·
Maintainers usually reply within 1 day
-
Display loses input after a runtime mode change into a negative sync polarity modePossibly taken @alchark claimed this 14 days ago. Openbug
flipperdevices/flipperone-linux-build-scripts#198 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in flipperdevices/flipperone-linux-build-scripts
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
area:linux source:reader type:content-error
Difficulty 1/5 Under an hour Newbie friendliness 72/100
stephrobert/blog-roadmap#185 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
fzn0x/watchtower#11 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
docker-library/postgres#1427 ·