WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Retaining alsamixer settings between boots  (Read 7855 times)

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 460
Re: Retaining alsamixer settings between boots
« Reply #30 on: February 04, 2025, 12:32:11 AM »
If I create optional extension alsamixer-set.tcz with

asound.state
and "xterm alsamixer" in menu list. Would you put it into repo?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11828
Re: Retaining alsamixer settings between boots
« Reply #31 on: February 04, 2025, 02:02:03 AM »
Hi neonix
I think asound.state might include hardware specific
information. If that is the case, then I would say no.

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 460
Re: Retaining alsamixer settings between boots
« Reply #32 on: February 05, 2025, 04:29:42 AM »
And if alsa-set.tcz or alsamixer-set.tcz will contains this?

Code: [Select]
pause 5
amixer set Master unmute
amixer set PCM unmute
amixer set Headphone unmute

amixer set Master 75%
amixer set PCM 75%
amixer set Headphone 75%

Code: [Select]
[Desktop Entry]
Name=alsamixer
Exec=aterm -e alsamixer
Icon=
Terminal=false
X-FullPathIcon=
Type=Application
;OnlyShowIn=Old;
Categories=Utility;

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11828
Re: Retaining alsamixer settings between boots
« Reply #33 on: February 05, 2025, 12:08:19 PM »
Hi neonix
And if alsa-set.tcz or alsamixer-set.tcz will contains this?

Code: [Select]
pause 5
amixer set Master unmute
amixer set PCM unmute
amixer set Headphone unmute

amixer set Master 75%
amixer set PCM 75%
amixer set Headphone 75%
...
I'm guessing you meant  sleep 5  for the first line.
If that is supposed to be a startup script that goes in
/usr/local/tce.installed , then no.

When Tinycore boots, it first loads all of the extensions
in onboot.lst. it then runs all of the startup scripts for
those extensions. Any extensions that were loaded after
yours, would now have their startup scripts blocked from
running while yours sits there and sleeps.


Quote
...
Code: [Select]
[Desktop Entry]
Name=alsamixer
Exec=aterm -e alsamixer
Icon=
Terminal=false
X-FullPathIcon=
Type=Application
;OnlyShowIn=Old;
Categories=Utility;
That one is fine. As shown, it will only provide an entry
for the desktop menu, but no icon for the wbar.
If you want an icon, you need to provide one and add
something like this:
Code: [Select]
Icon=alsamixer
X-FullPathIcon=/usr/local/share/pixmaps/alsamixer.png

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 460
Re: Retaining alsamixer settings between boots
« Reply #34 on: February 07, 2025, 05:29:35 AM »
SliTaz 2.0 has something like this.


Code: [Select]
#!/bin/sh
# Set and store default mixer volumes for SliTaz. Used at boot time
# if a sound card has been detected automatically and can be used
# directly.
#

echo "Setting default mixer volumes..."
amixer -s -q <<EOF
set Master 75% unmute
set Master -12dB
set 'Master Mono' 75% unmute
set 'Master Mono' -12dB
set Front 75% unmute
set Front -12dB
set PCM 90% unmute
set PCM 0dB
mixer Synth 90% unmute
mixer Synth 0dB
mixer CD 90% unmute
mixer CD 0dB
# mute mic
set Mic 0% mute
# ESS 1969 chipset has 2 PCM channels
set PCM,1 90% unmute
set PCM,1 0dB
# Trident/YMFPCI/emu10k1
set Wave 100% unmute
set Music 100% unmute
set AC97 100% unmute
# CS4237B chipset:
set 'Master Digital' 75% unmute
# Envy24 chips with analog outs
set DAC 90% unmute
set DAC -12dB
set DAC,0 90% unmute
set DAC,0 -12dB
set DAC,1 90% unmute
set DAC,1 -12dB
# some notebooks use headphone instead of master
set Headphone 75% unmute
set Headphone -12dB
set Playback 100% unmute
# turn off digital switches
set "SB Live Analog/Digital Output Jack" off
set "Audigy Analog/Digital Output Jack" off
EOF

# Store config
alsactl store

If alsa.tcz is executed/mounted before alsa-set.tcz then this script will works theoretically (in TCL)?
Other solution is to execute this script from (jwm) menulist manually.

The question is, can I put this solution in to the repo?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11828
Re: Retaining alsamixer settings between boots
« Reply #35 on: February 07, 2025, 01:22:55 PM »
Hi neonix
... Other solution is to execute this script from (jwm) menulist manually. ...
That makes a lot more sense than having something like
this try to run automatically.

Quote
... The question is, can I put this solution in to the repo?
Have you tested it? Does it work?

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 460
Re: Retaining alsamixer settings between boots
« Reply #36 on: February 09, 2025, 03:57:33 AM »
Yes, it works.

Now I have alsamixer wbar icon, menulist for mixer set, and menulist entry for alsamixer. If I send it be email, would you put it in alsa.tcz or alsamixer-set.tcz?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11828
Re: Retaining alsamixer settings between boots
« Reply #37 on: February 09, 2025, 12:17:04 PM »
Hi neonix
menulist for mixer set, ...
Change  mixer set  to  mixer reset  to make it a bit more
obvious it's going to reset to some default values, and
not offer the user to select some settings.

Quote
... If I send it be email, would you put it in alsa.tcz or alsamixer-set.tcz?
Create the following:
alsamixer-set.tcz
alsamixer-set.tcz.dep
alsamixer-set.tcz.list
alsamixer-set.tcz.info
alsamixer-set.tcz.md5.txt

Then tar them up:
Code: [Select]
tar -cf alsamixer-set.tar *.tcz*
gzip -9 alsamixer-set.tar

Run bcrypt:
Code: [Select]
bcrypt alsamixer-set.tar.gz
Encryption key: tinycore

And send it to tcesubmit @ gmail … com

More info on extension creation here:
https://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#creating_a_tcz