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

Sync config on initialization; adding tests #69

Merged

Conversation

nwang92
Copy link
Contributor

@nwang92 nwang92 commented Apr 26, 2022

I think the problem with the hifiberry volumes on startup is mostly due to how go struct comparisons are performed. When an analog bridge is registered, it saves with PlaybackVolume: 0, CaptureVolume: 0. When jacktrip-agent starts, it initializes an empty currentDeviceConfig AgentConfig with PlaybackVolume: 0, CaptureVolume: 0.

This causes the config.ALSAConfig != lastDeviceConfig.ALSAConfig comparison to be false and never update volumes. I'm adding a first-config-check to force initialization here.

@nwang92 nwang92 merged commit 86c030e into feature/autoconnector-integration Apr 26, 2022
@nwang92 nwang92 deleted the feature/sync-config-on-init branch April 26, 2022 19:40
mikedickey added a commit that referenced this pull request May 5, 2022
* Added initial version of analog bridge mixer

* Adding autoconnector to support patching of hubserver<->zita

* Removing all jack client interaction from deviceMixer

* Fixing bugs around crossed-wires

* Cleaning up deviceMixer

* Support for dummy jack device

* Add handling for dummy/non-alsa device

* Channel detection working

* Added multi channel connect

* Update feature/autoconnector-integration (#60)

* Switching build to produce arm binaries (#55)

* Adding support for experimental queue size settings (#54)

* Don't reset device if only Broadcast state changes on server (#56)

* Adding expiresAt in heartbeat so server is aware of expiration time (#59)

Co-authored-by: mikedickey <mike@mikedickey.com>

* Bugfix/handling zita port race conditions (#62)

* Enable zita <-> Jamulus port connections

* Make device mixer a separate goroutine; added error handling around race conditions

* Addressing PR review comments

* Bugfixes around server settings changes

* Fixing analog bridge sound device name setting

* Adding unit tests, moving code around

* Wiring up logic around EnableUSB flag

* Adding Fender Micro test case (capture device only)

* Find best channel number based on sample rate; more tests and code cl… (#65)

* Find best channel number based on sample rate; more tests and code cleanup

* Rename zita service name template

* Support buffer size/period in zita

* Change capture/playback volume to iterate through cards and detect co… (#66)

* Change capture/playback volume to iterate through cards and detect controls

* Use best-approximate sample rate for zita; update ALSA settings on device detection

* Enabling default sample rate/channel for built-in sound; support for multi-digit card numbers (#67)

* Reverting checks for b1/Headphones from built-in (#68)

* Sync config on initialization; adding tests (#69)

* Make first config sync apply to only analog bridge

* Feature/monitor and mute controls (#71)

* Adding new ALSA fields (#70)

* Adding finer support for monitor volume and mute toggles

* Adding monitor and mute controls

* Set volumes to zero percent when muted (#72)

* Set volumes to zero percent when muted

* Only set "Analogue Playback Volume" once for hifiberry cards

* Adding signal handler + context cancellation to subroutines; restore state on disconnect or enableUSB switch for analog bridge

* Fixing lint/fmt warnings

Co-authored-by: mikedickey <mike@mikedickey.com>

Co-authored-by: nwang92 <nwang92@gmail.com>
Co-authored-by: Nelson Wang <nwang92@users.noreply.github.com>
Co-authored-by: mikedickey <mike@mikedickey.com>
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

1 participant