~mil/sxmo-tickets#357: 
Persist audio settings across reboots

I noticed that at least the volume setting is not persistent across reboots. Did not check for other settings. I guess it would make sense to have a generic mechanism to persist and restore such settings.

Status
REPORTED
Submitter
~murks
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
No labels applied.

~stacyharper 3 years ago

A move to pipewire would also solve this issue

~proycon 3 years ago

On 21-09-01 12:45, ~murks wrote:

I noticed that at least the volume setting is not persistent across reboots. Did not check for other settings. I guess it would make sense to have a generic mechanism to persist and restore such settings.

I'm lately having a possibly related issue where my output keeps reverting to headphones instead of speaker on boot and after a call. Not sure yet if it's an sxmo issue or something in my own scripts...

--

Maarten van Gompel (proycon) https://proycon.anaproy.nl

~noneofyourbusiness 3 years ago

Assuming this is with sway:

I don't think this ever was a feature. We have

amixer sset 'Line Out Source' 'Mono Differential','Mono Differential' amixer set "Line Out" 50%

(yes it still works with the typo)

in the xinit, which, along with a couple envvars, are absent from the default sway config

~saba 3 years ago

in both sxmo_xinit.sh and sxmo_winit.sh there is the line:

alsactl --file /usr/share/sxmo/alsa/default_alsa_sound.conf restore

which restores the settings from that file(pinephone specific settings) and we also have, if you're using it, the default xinit_template which has the lines that noneofyourbusiness mentioned but also should have sxmo_audioout.sh Speaker

I think the biggest part of this issue is that we are restoring from some predefined default every time we start sway or dwm, but we are never saving our settings (alsactl --file /path/to/file store). So, the result is that you get the same thing every boot instead of where you were before you rebooted. We need some automated way of saving the settings to a file. I use, for example, ~/.config/sxmo/asound.state but I haven't set anything up yet to automatically update that when I reboot.

~baroque0 3 years ago

One setting that is never restored and that -in my humble opinion- should be is the earpiece volume:

  • each time a call rings or is placed, earpiece volume is set at 100.
  • volume 100 for the earpiece make it very loud, almost painful to hear, and is so loud that everybody around can hear what comes out of it. (* ...plus it's not very convenient to click bemenu repeatedly to change the value fast during the call... may take 10+ seconds to reach 60.. and is also a bit sluggish...) => it's probably a matter of taste, but each could have their own preference remembered there? i tried to look through the scripts to find how/when this is set, but couldnt easily find out :/

anyone knows where/how to set this?

~noneofyourbusiness 3 years ago*

Looks like sxmo_modemcall.sh does alsa stuff here:

19: alsactl --file "$ALSASTATEFILE" restore

21: alsactl --file /usr/share/sxmo/alsa/default_alsa_sound.conf restore

123: alsactl --file "$ALSASTATEFILE" store

and ALSASTATEFILE has a hardcoded name...

2:ALSASTATEFILE="$XDG_CACHE_HOME"/precall.alsa.state

Looks like sxmo_*init.sh both need another addition, with modemcall having a small change

Register here or Log in to comment, or comment via email.