zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Audio Levels on Snapshots has no effect - levels set to 100% on load #1224

Open flashburninspace opened 4 days ago

flashburninspace commented 4 days ago

Describe the issue

No matter whether the checkbox "Audio Levels on Snapshots" in the Admin menu is ticked or not, sound card audio levels are set to 100% when loading a snapshot. Sound input and output fully functional.

To Reproduce

Steps to reproduce the behavior:

  1. Uncheck "Audio Levels in Snapshots" in Admin menu
  2. Go to Mixer/Levels, set output of sound card to anything but 100%, set input gain to something between 0dB and maximum (40dB in this case), set input mode to something else than default mode.
  3. Load a snapshot
  4. Go to Mixer/Levels and see the output and input levels of sound card are set to 100% (input gain to 40dB in this case), input mode is reset/changed.
  5. Check "Audio Levels in Snapshots" in Admin menu
  6. Go to Mixer/Levels, set output of sound card to anything but 100%, set input gain to something between 0dB and maximum (40dB in this case), set input mode to something else than default mode.
  7. Load a snapshot
  8. Go to Mixer/Levels and see the output and input levels of sound card are set to 100% (input gain to 40dB in this case), input mode is reset/changed.
  9. repeat with other snapshot until convinced

    Expected behaviour

    Admin->"Audio Levels on Snapshots" checked: sound card audio levels are set to values defined in loaded snapshot unchecked: sound card audio levels stay same as before loading snapshot

    Actual behaviour

    Loading a snapshot seta all audio levels to 100% and destroys input settings

    Screenshots

    Not available

    Additional context

    Tried reinstalling ALSA: sound still functional, but issue not solved.

Configuration

Hardware

Raspberry Pi 5 Model B Rev 1.0
Audio: HifiBerry DAC+ ADC PRO
Display: Custom Device
Wiring: V5
I2C: MCP23017@0x20, MCP23017@0x21
Profile: v5

System

Debian GNU/Linux 12 (bookworm)
Build Date: 2024-10-02
Memory: 6% (524M/8048M)
SD Card: 50% (14G/29G)
Temperature: 25.7ºC
Overclock: None

MIDI & UI

Tuning: 440 Hz
Master Channel: Off
Preload Presets: On
ZS3 (SubSnapShots): On
Power Save: 10 minutes
Audio Levels on Snapshots: Off

Software

zyncoder: vangelis (1dd6f7a) 
zynthian-ui: vangelis (039ed26)
zynthian-sys: vangelis (f842566)
zynthian-data: vangelis (ddfa009)
zynthian-webconf: vangelis (bd99d05)
riban-bw commented 2 days ago

Admin menu option "Audio Levels on Snapshot" operates during save, not load. If audio levels are saved in a snapshot then they are recalled during snapshot loading, otherwise, audio levels remain unchanged.

@jofemodo I think we could change this behaviour so that audio levels are not restored on snapshot load if this setting is not asserted. We could then, always save audio levels so that the real state is saved in the snapshot but user can decide whether to recall all settings. This would be a reversal of current behaviour so maybe deferred to a later major release but should be simple to do. I prefer this modified behaviour as it aligns with other model state paradigms, i.e. the full state is saved and the required bits are loaded.

@flashburninspace please note that the system is currently working by design.

I won't close this issue until @jofemodo has considered the option to change behaviour.

flashburninspace commented 2 days ago

At least, even if levels are not saved, they are now wrongly reset to 100% on load, which is quite disturbing, anyway. At least it should be 'Levels are not changed by loading a snapshot that does not contain levels'.

riban-bw commented 2 days ago

Current behaviour is to restore the level stored in the snapshot. Your snapshots must contain 100% for each parameter. You can change load the snapshot, change the levels and save the snapshot to correct this. As described above, we may change this behaviour in the future.