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

Release ALSA Playback Device When TV is Off #41

Merged
merged 7 commits into from
Oct 24, 2022

Conversation

hftsai256
Copy link
Contributor

@hftsai256 hftsai256 commented Jan 3, 2022

Re-wrote with event-loop structure utilizing Python's native asyncio interface. The logic is relying on the SPDIF lock register on ADAU145x.

On some devices (e.g. VIZIO m602i-b3), it may switch SPDIF signal back on for about a minute after it is turned off, and therefore acquires the device once again even it is not in use. However by sending USR1 signal to the process can temporary pause the loop for 15 seconds so other process can occupy the playback device.

I'm preparing another PR for alsaloop, which is not yet matured but shares a similar state machine as this one. We may have further discussion about if an abstraction layer in audiocontroller module can help/promote code reuse.

BTW do we need MPRIS/DBus connections on this script as well?

hifiberrydsp/genclocks.py Outdated Show resolved Hide resolved
hifiberrydsp/genclocks.py Outdated Show resolved Hide resolved
@hifiberry
Copy link
Owner

Thanks for this. While in general all player (including Roon) will start the pause-all script, I'll still merge this.

@hifiberry hifiberry merged commit 09ab4ad into hifiberry:master Oct 24, 2022
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.

None yet

2 participants