Skip to contentSkip to conversation

mixer: fix cache coherency issue in multi-application scenario

DISCUSSION GitHub pull_request - opened 1 participant 2 messages Dec 16, 2025 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-lib pull request #490 was opened from DevreeseJorik:

Remove conditional hardware writes in set_volume_ops and set_switch_ops to ensure hardware state is always updated. This fixes an issue where setting controls to the same value repeatedly does nothing, even if the hardware state has changed due to actions from other applications.

Request URL : https://github.com/alsa-project/alsa-lib/pull/490
Patch URL : https://github.com/alsa-project/alsa-lib/pull/490.patch
Repository URL: https://github.com/alsa-project/alsa-lib

#2 lore raw
In reply to a message not in the archive

alsa-project/alsa-lib pull request #490 was edited from DevreeseJorik:

Remove conditional hardware writes in set_volume_ops and set_switch_ops to ensure hardware state is always updated. This fixes an issue where setting controls to the same value repeatedly does nothing, even if the hardware state has changed due to actions from other applications.

---

Given this code has been in alsa-lib for 20 years, I assume there is a good reason for it, or perhaps a workaround exists that I could not find.

The issue we faced is that after an initial write, if the same value is written again, but in the meantime a different application altered the hardware state, the new change will not occur, yet no error code is provided. Also, reading the current state returns the current application's state, rather than the actual hardware state. Is alsa-lib not designed with multi-application uses in mind?

Request URL : https://github.com/alsa-project/alsa-lib/pull/490
Patch URL : https://github.com/alsa-project/alsa-lib/pull/490.patch
Repository URL: https://github.com/alsa-project/alsa-lib