public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] alsa: Fix bug#13087 remove services entry
@ 2023-05-08 17:07 Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 2/4] alsa: Add in a backup include file for alsa specifying the asound.state file Adolf Belka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adolf Belka @ 2023-05-08 17:07 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

- alsa has an initscript but it is not starting and stopping a traditional daemon service.
   The initscript loads some alsa modules and then restores the asound.state file
- This patch updates the PAK_VER number and removes the services entry and explicitly
   adds alsa in for the initscript installation.
- Additionally this patch also adds the installation of a backup include file for alsa
   which savces the soundcards status file asound.state

Fixes: Bug#13087
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 lfs/alsa | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lfs/alsa b/lfs/alsa
index 2d89af880..db7afe4b1 100644
--- a/lfs/alsa
+++ b/lfs/alsa
@@ -37,11 +37,11 @@ DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 PROG       = alsa
-PAK_VER    = 15
+PAK_VER    = 16
 
 DEPS       =
 
-SERVICES   = alsa
+SERVICES   =
 
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
@@ -104,6 +104,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	cd $(DIR_APP)/alsa-firmware-$(FVER) && make $(MAKETUNING) $(EXTRA_MAKE)
 	cd $(DIR_APP)/alsa-firmware-$(FVER) && make install
 	# install initscript
-	$(call INSTALL_INITSCRIPTS,$(SERVICES))
+	$(call INSTALL_INITSCRIPTS,alsa)
+	# install backup include file
+	install -v -m 644 ${DIR_SRC}/config/backup/includes/alsa \
+			/var/ipfire/backup/addons/includes/alsa
 	@rm -rf $(DIR_SRC)/alsa*
 	@$(POSTBUILD)
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 2/4] alsa: Add in a backup include file for alsa specifying the asound.state file
  2023-05-08 17:07 [PATCH v2 1/4] alsa: Fix bug#13087 remove services entry Adolf Belka
@ 2023-05-08 17:07 ` Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 3/4] alsa: Fixes Bug#13087 - module removal & path correction for " Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 4/4] alsa: Uncomment the conf file names in the rootfile Adolf Belka
  2 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2023-05-08 17:07 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

- This will backup the sound card status with the asound.state file when the addon is
   uninstalled so that if it is re-installed in the future the status can be rerstored.

Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 config/backup/includes/alsa | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 config/backup/includes/alsa

diff --git a/config/backup/includes/alsa b/config/backup/includes/alsa
new file mode 100644
index 000000000..93db0bd79
--- /dev/null
+++ b/config/backup/includes/alsa
@@ -0,0 +1 @@
+/var/lib/alsa/asound.state
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 3/4] alsa: Fixes Bug#13087 - module removal & path correction for asound.state file
  2023-05-08 17:07 [PATCH v2 1/4] alsa: Fix bug#13087 remove services entry Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 2/4] alsa: Add in a backup include file for alsa specifying the asound.state file Adolf Belka
@ 2023-05-08 17:07 ` Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 4/4] alsa: Uncomment the conf file names in the rootfile Adolf Belka
  2 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2023-05-08 17:07 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 2455 bytes --]

- start_service added to install.sh and stop_service to uninstall.sh
   This ensures that the modules are loaded after install
- The /etc/asound.state file was touched by the install.sh cript but the alsactl store and
   restore commands have default location of /var/lib/alsa/ so the touch command created
   an asound.state file that was then not used subsequently. It also meant that the first
   start of alsa would fail as it would try and restore from /var/lib/alsa/asound.state
   but the file did not exist.
- This patch corrects the path for the touch command for asound.state
- The install.sh script also checks if /etc/asound.state, that was never used, exists and
   if it does removes it.
- Uninstalling alsa left the sound modules installed until a reboot was carried out.
   Uninstallation should unload the alsa kernel modules.
   This patch adds the modprobe -r commands to the uninstall.sh file to unload all the snd
   modules when alsa is uninstalled.
- make_backup and restore_backup commands added to ther install.sh and uninstall.sh scripts

Fixes: Bug#13087
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 src/paks/alsa/install.sh   | 8 +++++++-
 src/paks/alsa/uninstall.sh | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/paks/alsa/install.sh b/src/paks/alsa/install.sh
index 7b6b3dc80..ee0092195 100644
--- a/src/paks/alsa/install.sh
+++ b/src/paks/alsa/install.sh
@@ -24,7 +24,13 @@
 . /opt/pakfire/lib/functions.sh
 extract_files
 groupadd audio 2>/dev/null
-touch /etc/asound.state
+touch /var/lib/alsa/asound.state
+if [ -f /etc/asound.state ]; then
+	rm /etc/asound.state
+fi
+restore_backup ${NAME}
 ln -svf  ../init.d/alsa /etc/rc.d/rc3.d/S65alsa
 ln -svf  ../init.d/alsa /etc/rc.d/rc0.d/K35alsa
 ln -svf  ../init.d/alsa /etc/rc.d/rc6.d/K35alsa
+start_service ${NAME}
+exit 0
diff --git a/src/paks/alsa/uninstall.sh b/src/paks/alsa/uninstall.sh
index 62e27008d..ce88c294b 100644
--- a/src/paks/alsa/uninstall.sh
+++ b/src/paks/alsa/uninstall.sh
@@ -22,5 +22,11 @@
 ############################################################################
 #
 . /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+make_backup ${NAME}
+# unload alsa related modules
+modprobe -r snd_pcm_oss >/dev/null 2>&1 || failed=1
+modprobe -r snd_timer >/dev/null 2>&1 || failed=1
 remove_files
 rm -rf /etc/rc.d/rc*.d/*alsa
+exit 0
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 4/4] alsa: Uncomment the conf file names in the rootfile
  2023-05-08 17:07 [PATCH v2 1/4] alsa: Fix bug#13087 remove services entry Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 2/4] alsa: Add in a backup include file for alsa specifying the asound.state file Adolf Belka
  2023-05-08 17:07 ` [PATCH v2 3/4] alsa: Fixes Bug#13087 - module removal & path correction for " Adolf Belka
@ 2023-05-08 17:07 ` Adolf Belka
  2 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2023-05-08 17:07 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 10720 bytes --]

- Based on input from Arne Fitzenreiter there are conf files that alsa complains about if
   they are not present. This patch uncomments all the default conf files
- The backup include file is also added to the rootfile.

Suggested-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 config/rootfiles/packages/alsa | 187 +++++++++++++++++----------------
 1 file changed, 94 insertions(+), 93 deletions(-)

diff --git a/config/rootfiles/packages/alsa b/config/rootfiles/packages/alsa
index 987e7f372..bce2ff5cc 100644
--- a/config/rootfiles/packages/alsa
+++ b/config/rootfiles/packages/alsa
@@ -197,7 +197,7 @@ usr/local/share/alsa
 #usr/local/share/alsa/firmware/hdsploader/multiface_firmware_rev11.bin
 usr/local/share/alsa/firmware/hdsploader/rpm_firmware.bin
 #usr/local/share/alsa/firmware/mixartloader
-#usr/local/share/alsa/firmware/mixartloader/miXart.conf
+usr/local/share/alsa/firmware/mixartloader/miXart.conf
 #usr/local/share/alsa/firmware/mixartloader/miXart8.elf
 #usr/local/share/alsa/firmware/mixartloader/miXart8.xlx
 #usr/local/share/alsa/firmware/mixartloader/miXart8AES.xlx
@@ -215,13 +215,13 @@ usr/local/share/alsa/firmware/hdsploader/rpm_firmware.bin
 #usr/local/share/alsa/firmware/pcxhrloader/dspe882.e56
 #usr/local/share/alsa/firmware/pcxhrloader/dspe924.e56
 #usr/local/share/alsa/firmware/pcxhrloader/e321_512.e56
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr.conf
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr0.conf
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr1.conf
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr2.conf
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr3.conf
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr4.conf
-#usr/local/share/alsa/firmware/pcxhrloader/pcxhr5.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr0.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr1.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr2.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr3.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr4.conf
+usr/local/share/alsa/firmware/pcxhrloader/pcxhr5.conf
 #usr/local/share/alsa/firmware/pcxhrloader/xc_1_882.dat
 #usr/local/share/alsa/firmware/pcxhrloader/xi_1_882.dat
 #usr/local/share/alsa/firmware/pcxhrloader/xlxc1222e.dat
@@ -233,15 +233,15 @@ usr/local/share/alsa/firmware/hdsploader/rpm_firmware.bin
 #usr/local/share/alsa/firmware/pcxhrloader/xlxint.dat
 #usr/local/share/alsa/firmware/usx2yloader
 #usr/local/share/alsa/firmware/usx2yloader/tascam_loader.ihx
-#usr/local/share/alsa/firmware/usx2yloader/us122.conf
+usr/local/share/alsa/firmware/usx2yloader/us122.conf
 #usr/local/share/alsa/firmware/usx2yloader/us122.prepad
 #usr/local/share/alsa/firmware/usx2yloader/us122.rbt
 #usr/local/share/alsa/firmware/usx2yloader/us122fw.ihx
-#usr/local/share/alsa/firmware/usx2yloader/us224.conf
+usr/local/share/alsa/firmware/usx2yloader/us224.conf
 #usr/local/share/alsa/firmware/usx2yloader/us224.prepad
 #usr/local/share/alsa/firmware/usx2yloader/us224.rbt
 #usr/local/share/alsa/firmware/usx2yloader/us224fw.ihx
-#usr/local/share/alsa/firmware/usx2yloader/us428.conf
+usr/local/share/alsa/firmware/usx2yloader/us428.conf
 #usr/local/share/alsa/firmware/usx2yloader/us428.prepad
 #usr/local/share/alsa/firmware/usx2yloader/us428.rbt
 #usr/local/share/alsa/firmware/usx2yloader/us428fw.ihx
@@ -255,10 +255,10 @@ usr/local/share/alsa/firmware/hdsploader/rpm_firmware.bin
 #usr/local/share/alsa/firmware/vxloader/l_1_vp4.d56
 #usr/local/share/alsa/firmware/vxloader/l_1_vx2.d56
 #usr/local/share/alsa/firmware/vxloader/l_1_vxp.d56
-#usr/local/share/alsa/firmware/vxloader/vx222.conf
-#usr/local/share/alsa/firmware/vxloader/vxboard.conf
-#usr/local/share/alsa/firmware/vxloader/vxp440.conf
-#usr/local/share/alsa/firmware/vxloader/vxpocket.conf
+usr/local/share/alsa/firmware/vxloader/vx222.conf
+usr/local/share/alsa/firmware/vxloader/vxboard.conf
+usr/local/share/alsa/firmware/vxloader/vxp440.conf
+usr/local/share/alsa/firmware/vxloader/vxpocket.conf
 #usr/local/share/alsa/firmware/vxloader/x1_1_vp4.rbt
 #usr/local/share/alsa/firmware/vxloader/x1_1_vx2.rbt
 #usr/local/share/alsa/firmware/vxloader/x1_1_vxp.rbt
@@ -269,69 +269,69 @@ usr/sbin/alsaconf
 usr/sbin/alsactl
 #usr/share/aclocal/alsa.m4
 usr/share/alsa
-#usr/share/alsa/alsa.conf
+usr/share/alsa/alsa.conf
 #usr/share/alsa/cards
-#usr/share/alsa/cards/AACI.conf
-#usr/share/alsa/cards/ATIIXP-MODEM.conf
-#usr/share/alsa/cards/ATIIXP-SPDMA.conf
-#usr/share/alsa/cards/ATIIXP.conf
-#usr/share/alsa/cards/AU8810.conf
-#usr/share/alsa/cards/AU8820.conf
-#usr/share/alsa/cards/AU8830.conf
-#usr/share/alsa/cards/Audigy.conf
-#usr/share/alsa/cards/Audigy2.conf
-#usr/share/alsa/cards/Aureon51.conf
-#usr/share/alsa/cards/Aureon71.conf
-#usr/share/alsa/cards/CA0106.conf
-#usr/share/alsa/cards/CMI8338-SWIEC.conf
-#usr/share/alsa/cards/CMI8338.conf
-#usr/share/alsa/cards/CMI8738-MC6.conf
-#usr/share/alsa/cards/CMI8738-MC8.conf
-#usr/share/alsa/cards/CMI8788.conf
-#usr/share/alsa/cards/CS46xx.conf
-#usr/share/alsa/cards/EMU10K1.conf
-#usr/share/alsa/cards/EMU10K1X.conf
-#usr/share/alsa/cards/ENS1370.conf
-#usr/share/alsa/cards/ENS1371.conf
-#usr/share/alsa/cards/ES1968.conf
-#usr/share/alsa/cards/Echo_Echo3G.conf
-#usr/share/alsa/cards/FM801.conf
-#usr/share/alsa/cards/FWSpeakers.conf
-#usr/share/alsa/cards/FireWave.conf
-#usr/share/alsa/cards/GUS.conf
-#usr/share/alsa/cards/HDA-Intel.conf
-#usr/share/alsa/cards/HdmiLpeAudio.conf
-#usr/share/alsa/cards/ICE1712.conf
-#usr/share/alsa/cards/ICE1724.conf
-#usr/share/alsa/cards/ICH-MODEM.conf
-#usr/share/alsa/cards/ICH.conf
-#usr/share/alsa/cards/ICH4.conf
-#usr/share/alsa/cards/Loopback.conf
-#usr/share/alsa/cards/Maestro3.conf
-#usr/share/alsa/cards/NFORCE.conf
-#usr/share/alsa/cards/PC-Speaker.conf
-#usr/share/alsa/cards/PMac.conf
-#usr/share/alsa/cards/PMacToonie.conf
-#usr/share/alsa/cards/PS3.conf
-#usr/share/alsa/cards/RME9636.conf
-#usr/share/alsa/cards/RME9652.conf
-#usr/share/alsa/cards/SB-XFi.conf
-#usr/share/alsa/cards/SI7018.conf
-#usr/share/alsa/cards/TRID4DWAVENX.conf
-#usr/share/alsa/cards/USB-Audio.conf
-#usr/share/alsa/cards/VIA686A.conf
-#usr/share/alsa/cards/VIA8233.conf
-#usr/share/alsa/cards/VIA8233A.conf
-#usr/share/alsa/cards/VIA8237.conf
-#usr/share/alsa/cards/VX222.conf
-#usr/share/alsa/cards/VXPocket.conf
-#usr/share/alsa/cards/VXPocket440.conf
-#usr/share/alsa/cards/YMF744.conf
-#usr/share/alsa/cards/aliases.conf
-#usr/share/alsa/cards/pistachio-card.conf
-#usr/share/alsa/cards/vc4-hdmi.conf
+usr/share/alsa/cards/AACI.conf
+usr/share/alsa/cards/ATIIXP-MODEM.conf
+usr/share/alsa/cards/ATIIXP-SPDMA.conf
+usr/share/alsa/cards/ATIIXP.conf
+usr/share/alsa/cards/AU8810.conf
+usr/share/alsa/cards/AU8820.conf
+usr/share/alsa/cards/AU8830.conf
+usr/share/alsa/cards/Audigy.conf
+usr/share/alsa/cards/Audigy2.conf
+usr/share/alsa/cards/Aureon51.conf
+usr/share/alsa/cards/Aureon71.conf
+usr/share/alsa/cards/CA0106.conf
+usr/share/alsa/cards/CMI8338-SWIEC.conf
+usr/share/alsa/cards/CMI8338.conf
+usr/share/alsa/cards/CMI8738-MC6.conf
+usr/share/alsa/cards/CMI8738-MC8.conf
+usr/share/alsa/cards/CMI8788.conf
+usr/share/alsa/cards/CS46xx.conf
+usr/share/alsa/cards/EMU10K1.conf
+usr/share/alsa/cards/EMU10K1X.conf
+usr/share/alsa/cards/ENS1370.conf
+usr/share/alsa/cards/ENS1371.conf
+usr/share/alsa/cards/ES1968.conf
+usr/share/alsa/cards/Echo_Echo3G.conf
+usr/share/alsa/cards/FM801.conf
+usr/share/alsa/cards/FWSpeakers.conf
+usr/share/alsa/cards/FireWave.conf
+usr/share/alsa/cards/GUS.conf
+usr/share/alsa/cards/HDA-Intel.conf
+usr/share/alsa/cards/HdmiLpeAudio.conf
+usr/share/alsa/cards/ICE1712.conf
+usr/share/alsa/cards/ICE1724.conf
+usr/share/alsa/cards/ICH-MODEM.conf
+usr/share/alsa/cards/ICH.conf
+usr/share/alsa/cards/ICH4.conf
+usr/share/alsa/cards/Loopback.conf
+usr/share/alsa/cards/Maestro3.conf
+usr/share/alsa/cards/NFORCE.conf
+usr/share/alsa/cards/PC-Speaker.conf
+usr/share/alsa/cards/PMac.conf
+usr/share/alsa/cards/PMacToonie.conf
+usr/share/alsa/cards/PS3.conf
+usr/share/alsa/cards/RME9636.conf
+usr/share/alsa/cards/RME9652.conf
+usr/share/alsa/cards/SB-XFi.conf
+usr/share/alsa/cards/SI7018.conf
+usr/share/alsa/cards/TRID4DWAVENX.conf
+usr/share/alsa/cards/USB-Audio.conf
+usr/share/alsa/cards/VIA686A.conf
+usr/share/alsa/cards/VIA8233.conf
+usr/share/alsa/cards/VIA8233A.conf
+usr/share/alsa/cards/VIA8237.conf
+usr/share/alsa/cards/VX222.conf
+usr/share/alsa/cards/VXPocket.conf
+usr/share/alsa/cards/VXPocket440.conf
+usr/share/alsa/cards/YMF744.conf
+usr/share/alsa/cards/aliases.conf
+usr/share/alsa/cards/pistachio-card.conf
+usr/share/alsa/cards/vc4-hdmi.conf
 #usr/share/alsa/ctl
-#usr/share/alsa/ctl/default.conf
+usr/share/alsa/ctl/default.conf
 #usr/share/alsa/init
 #usr/share/alsa/init/00main
 #usr/share/alsa/init/ca0106
@@ -341,23 +341,23 @@ usr/share/alsa
 #usr/share/alsa/init/info
 #usr/share/alsa/init/test
 #usr/share/alsa/pcm
-#usr/share/alsa/pcm/center_lfe.conf
-#usr/share/alsa/pcm/default.conf
-#usr/share/alsa/pcm/dmix.conf
-#usr/share/alsa/pcm/dpl.conf
-#usr/share/alsa/pcm/dsnoop.conf
-#usr/share/alsa/pcm/front.conf
-#usr/share/alsa/pcm/hdmi.conf
-#usr/share/alsa/pcm/iec958.conf
-#usr/share/alsa/pcm/modem.conf
-#usr/share/alsa/pcm/rear.conf
-#usr/share/alsa/pcm/side.conf
-#usr/share/alsa/pcm/surround21.conf
-#usr/share/alsa/pcm/surround40.conf
-#usr/share/alsa/pcm/surround41.conf
-#usr/share/alsa/pcm/surround50.conf
-#usr/share/alsa/pcm/surround51.conf
-#usr/share/alsa/pcm/surround71.conf
+usr/share/alsa/pcm/center_lfe.conf
+usr/share/alsa/pcm/default.conf
+usr/share/alsa/pcm/dmix.conf
+usr/share/alsa/pcm/dpl.conf
+usr/share/alsa/pcm/dsnoop.conf
+usr/share/alsa/pcm/front.conf
+usr/share/alsa/pcm/hdmi.conf
+usr/share/alsa/pcm/iec958.conf
+usr/share/alsa/pcm/modem.conf
+usr/share/alsa/pcm/rear.conf
+usr/share/alsa/pcm/side.conf
+usr/share/alsa/pcm/surround21.conf
+usr/share/alsa/pcm/surround40.conf
+usr/share/alsa/pcm/surround41.conf
+usr/share/alsa/pcm/surround50.conf
+usr/share/alsa/pcm/surround51.conf
+usr/share/alsa/pcm/surround71.conf
 #usr/share/locale/de/LC_MESSAGES/alsa-utils.mo
 #usr/share/locale/eu/LC_MESSAGES/alsa-utils.mo
 #usr/share/locale/fr/LC_MESSAGES/alsa-utils.mo
@@ -397,4 +397,5 @@ usr/share/sounds/alsa
 #usr/share/sounds/alsa/Rear_Right.wav
 #usr/share/sounds/alsa/Side_Left.wav
 #usr/share/sounds/alsa/Side_Right.wav
+var/ipfire/backup/addons/includes/alsa
 var/lib/alsa
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-08 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 17:07 [PATCH v2 1/4] alsa: Fix bug#13087 remove services entry Adolf Belka
2023-05-08 17:07 ` [PATCH v2 2/4] alsa: Add in a backup include file for alsa specifying the asound.state file Adolf Belka
2023-05-08 17:07 ` [PATCH v2 3/4] alsa: Fixes Bug#13087 - module removal & path correction for " Adolf Belka
2023-05-08 17:07 ` [PATCH v2 4/4] alsa: Uncomment the conf file names in the rootfile Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox