Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 259861

Summary: media-sound/alsa-utils: the script /etc/init.d/alsasound doesn't work properly
Product: Gentoo Linux Reporter: Fabio Cavallo <fhorse>
Component: Current packagesAssignee: Gentoo ALSA team <alsa-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: agent_jdh, dv, mschiff
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: alsasound.initd-r3.diff
alsasound.initd-r3.diff

Description Fabio Cavallo 2009-02-21 23:07:37 UTC
When the script try to load the modules for oss emulation, snd-seq and snd-ioctl32, don't recognize the right names of modules. This is the output :

alsasound       |* Loading ALSA modules...
alsasound       |*   Loading: snd-card-0...                        [ ok ]
alsasound       |*   Loading: snd-card-0...                        [ ok ]
alsasound       |*   Loading: kernelsnd-mixer-oss...
alsasound       |FATAL: Module kernelsnd_mixer_oss not found.      [ !! ]
alsasound       |*   Loading: kernelsnd-pcm-oss...
alsasound       |FATAL: Module kernelsnd_pcm_oss not found.        [ !! ]
alsasound       |*   Loading: kernelsnd-seq-oss...
alsasound       |FATAL: Module kernelsnd_seq_oss not found.        [ !! ]
alsasound       |*   Loading: kernelsnd-seq...
alsasound       |FATAL: Module kernelsnd_seq not found.            [ ok ]
alsasound       |* Restoring Mixer Levels...                       [ ok ]

I correct this chenged the sed commands from:
DRIVERS="${DRIVERS} $(modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p')"
to
DRIVERS="${DRIVERS} $(modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p')"

same for snd-seq and snd-ioctl32 and now works well for me :)

Reproducible: Always

Steps to Reproduce:
1./etc/initd.d/alsasound start
2.
3.
Comment 1 Rafał Mużyło 2009-02-22 03:43:31 UTC
Supposed to be fixed in r1.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-01 17:30:46 UTC
Reopening as this bug still isn't fixed in media-sound/alsasound-1.0.20-r2 

The offending part in the alsasound init script is this line:

  modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p'

which results in the following output on all of my machines:

barcelona:~ # modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p'
kernelsnd-mixer-oss
kernelsnd-pcm-oss
kernelsnd-seq-oss
barcelona:~ #

I fixed it this way:

barcelona:~ # modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p'
snd-mixer-oss
snd-pcm-oss
snd-seq-oss
barcelona:~ #


I'll attach a patch whith the fix I used in the alsasound init script.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-01 17:32:51 UTC
Created attachment 199827 [details, diff]
alsasound.initd-r3.diff

Maybe using something like

  modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\([[:alnum:]_-]\+\).ko:\1:p'

might even be better but I leave this to our alsa experts.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-01 17:53:43 UTC
(In reply to comment #2)
> Reopening as this bug still isn't fixed in media-sound/alsasound-1.0.20-r2 

oops, this should be media-sound/alsa-utils-1.0.20-r2 of course...
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-01 20:13:34 UTC
Created attachment 199843 [details, diff]
alsasound.initd-r3.diff

My previous patch only fixed one out of three lines where a change is necessary. This patch fixes all three lines.
This patch also uses the [:alnum:] regexp rather than the .* wildcard.
Comment 6 Jonathan Heaney 2009-08-02 00:23:19 UTC
Lars, that updated alsasound patch of your works here - alsa-utils got re-emerged due to dropping midi USE flag and this problem arose.  Was about to open a new ug then saw this.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-02 11:09:36 UTC
*** Bug 280021 has been marked as a duplicate of this bug. ***
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2009-08-02 11:27:10 UTC
+*alsa-utils-1.0.20-r3 (02 Aug 2009)
+
+  02 Aug 2009; Samuli Suominen <ssuominen@gentoo.org>
+  +alsa-utils-1.0.20-r3.ebuild, +files/alsasound.initd-r4:
+  Fix init script wrt #259861, thanks to Lars Wendler for patch.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2009-08-04 14:58:00 UTC
*** Bug 280323 has been marked as a duplicate of this bug. ***