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

Use new-style s6-rc to initialize ALSA to avoid race conditions #156

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

agners
Copy link
Member

@agners agners commented Dec 11, 2023

It seems that particularly on ODROID-N2 the startup of Pulseaudio and the initial ALSA initialization races: Pulseaudio is not aware of the analog audio outputs, hence breaking Audio support on the 3.5mm Jack.

According to s6-overlay documentation, /etc/cont-init.d should get initialized before the s6-rc services. However, this seems not to be the cases. Probably because the "base" dependency was missing.

In any case, just modernize the initialization by using the new-style s6-rc oneshot type for the initial ALSA initialization. Also make sure to start the udev listener before initial ALSA initialization to avoid any possible race condition.

Fixes: #157

It seems that particularly on ODROID-N2 the startup of Pulseaudio and
the initial ALSA initialization races: Pulseaudio is not aware of the
analog audio outputs, hence breaking Audio support on the 3.5mm Jack.

According to s6-overlay documentation, /etc/cont-init.d should get
initialized before the s6-rc services. However, this seems not to be the
cases. Probably because the "base" dependency was missing.

In any case, just modernize the initialization by using the new-style
s6-rc oneshot type for the initial ALSA initialization. Also make sure
to start the udev listener before initial ALSA initialization to avoid
any possible race condition.
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @agners 👍

../Frenck

@frenck frenck merged commit c4593ea into master Dec 12, 2023
11 checks passed
@frenck frenck deleted the avoid-alsa-initialization-race branch December 12, 2023 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No more sound output on Odroid N2+ after updating to Supervisor 2023.11.0
2 participants