How to add ALSA to Puppy 1.0.4 HD install

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#41 Post by Flash »

OK, I did everything exactly as described in my previous post above, but this time I thought to use ctrl-s to stop the next-to-last alsacfg dialog window and take a screenshot of it (see below), but ctrl-s wouldn't stop the very last window, which of course blinks off too quickly for me to read all of it. Oddly, even though the next-to-last window seems to say alsa wasn't installed, what I can read of the last window seems to say alsa was installed ok.

I also ran lsmod before:
# lsmod
Module Size Used by Not tainted
keybdev 1860 0 (unused)
mousedev 4020 1
hid 20804 0 (unused)
usbmouse 1880 0 (unused)
input 3360 0 [keybdev mousedev hid usbmouse]
parport_pc 15108 0
parport 23880 0 [parport_pc]
sr_mod 14488 0 (unused)
ide-cd 29504 0
cdrom 27744 0 [sr_mod ide-cd]
unionfs 157488 1
nls_iso8859-1 2812 0 (autoclean)
sd_mod 11404 0 (unused)
ds 6580 1
usb-uhci 21936 0 (autoclean) (unused)
usbcore 59596 1 (autoclean) [hid usbmouse usb-uhci]
i810_audio 23292 0 (autoclean) (unused)
ac97_codec 12020 0 (autoclean) [i810_audio]
soundcore 3588 2 (autoclean) [i810_audio]
yenta_socket 10436 1 (autoclean)
pcmcia_core 40228 0 (autoclean) [ds yenta_socket]
tulip 39200 1 (autoclean)
crc32 2896 0 (autoclean) [tulip]
e100 47604 0 (autoclean) (unused)
scsi_mod 93972 2 [sr_mod sd_mod]
# lsmod
and after alsa was installed:
# lsmod
Module Size Used by Not tainted
snd 33732 0 (autoclean)
snd-page-alloc 5268 0 (autoclean) [snd]
keybdev 1860 0 (unused)
mousedev 4020 1
hid 20804 0 (unused)
usbmouse 1880 0 (unused)
input 3360 0 [keybdev mousedev hid usbmouse]
parport_pc 15108 0
parport 23880 0 [parport_pc]
sr_mod 14488 0 (unused)
ide-cd 29504 0
cdrom 27744 0 [sr_mod ide-cd]
unionfs 157488 1
nls_iso8859-1 2812 0 (autoclean)
sd_mod 11404 0 (unused)
ds 6580 1
usb-uhci 21936 0 (autoclean) (unused)
usbcore 59596 1 (autoclean) [hid usbmouse usb-uhci]
i810_audio 23292 0 (autoclean) (unused)
ac97_codec 12020 0 (autoclean) [i810_audio]
soundcore 3588 2 (autoclean) [snd i810_audio]
yenta_socket 10436 1 (autoclean)
pcmcia_core 40228 0 (autoclean) [ds yenta_socket]
tulip 39200 1 (autoclean)
crc32 2896 0 (autoclean) [tulip]
e100 47604 0 (autoclean) (unused)
scsi_mod 93972 2 [sr_mod sd_mod]
#
(Sorry the column format was not retained when I copied from Beaver and pasted into the forum.)

Finally, I ran /etc/rc.d/rc.alsa status, which returned:
ALSA sound driver loaded
Attachments
alsacfg_error.png
(7.1 KiB) Downloaded 2024 times

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#42 Post by jcoder24 »

flash

That usu happens when the oss modules are not removed before loading the alsa modules.

To manually uninstall your oss modules run the following.

Code: Select all

rmmod i810_audio ac97_codec 
Rerunning alsacfg should then complete successfully.

I've submitted a post in the Users ( For the regulars ) section requesting lsmod samples so I can modify the alsacfg to better determine and uninstall the oss modules.

jc

menno
Posts: 80
Joined: Thu 03 Nov 2005, 23:21
Location: Bedum (Nederland)
Contact:

remove

#43 Post by menno »

I use

Code: Select all

modprobe -r i810_audio
. This remove also the assosiated modules . I cann't find what the difference is in rmmode and modprobe -r .

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#44 Post by Flash »

jcoder, menno, I tried 'em both and both gave the same result: "device or resource busy." :( I'm not using the sound for anything so what's going on? Neither Top View nor KP Manage Running Processes list anything that looks like a sound driver.

ARAN
Posts: 113
Joined: Fri 21 Oct 2005, 12:47

#45 Post by ARAN »

hello !

can somebody tell me which sound card should i configure in alsacfg.

i have the choice between 4 auto detected sound cards.
i am not really sure if there are really good auto detected becouse the hardware probe say i have a "Via Technologies - AC97 Compatible Controller"
and the alsa conf script say i have a via modem as a sound card.


Thats here is what the hardware probe say.
===== parse_pci_devices =====
No info found about the device 17fe.2220 (ETHERNET)!
Please send a snapshot of this window to ##########
Also read Modules HOWTO.
1106:3108 (3,0) 0 [ (null) - (null) ] DISPLAY (null)
1022:1103 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1022:1102 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1022:1101 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1022:1100 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1106:3065 (2,0) 11 [ Via - VT6102 Rhine II ] ETHERNET via-rhine
1106:3068 (7,128) 0 [ (null) - (null) ] COMM PORT (null)

1106:3059 (4,1) 11 [ Via Technologies - AC97 Compatible Controller ] AUDIO viaudiocombo

1106: 571 (1,1) 0 [ (null) - (null) ] EIDE (null)
1106:3177 (6,1) 0 [ (null) - (null) ] BRIDGE (null)
1106:3104 (12,3) 11 [ VIA Technologies - ] USB ehci-hcd
1106:3038 (12,3) 11 [ VIA Technologies - VT 82C586B Apollo ] USB usb-uhci
1106:3038 (12,3) 11 [ VIA Technologies - VT 82C586B Apollo ] USB usb-uhci
1106:3038 (12,3) 11 [ VIA Technologies - VT 82C586B Apollo ] USB usb-uhci
104c:802e (12,0) 0 [ (null) - (null) ] SERIAL (null)
104c:ac8e (6,7) 11 [ Texas Instruments - PCI7420 CardBus Controller ] CARDBUS yenta_socket
104c:ac8e (6,7) 11 [ Texas Instruments - PCI7420 CardBus Controller ] CARDBUS yenta_socket
17fe:2220 (2,0) 1 [ (null) - (null) ] ETHERNET (null)
1106:b188 (6,4) 0 [ (null) - (null) ] BRIDGE (null)
1106:7204 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1106:4204 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1106:3204 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1106:2204 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1106:1204 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
1106: 204 (6,0) 0 [ (null) - (null) ] BRIDGE (null)
ad that here is what alsaconf say.
Attachments
SoundCards.png
(8.73 KiB) Downloaded 2104 times

ARAN
Posts: 113
Joined: Fri 21 Oct 2005, 12:47

#46 Post by ARAN »

I have now tryed the second selection of the auto detection which have the same number 1106:3059 as the audio module showed in the hardware probe

1106:3059 (4,1) 11 [ Via Technologies - AC97 Compatible Controller ] AUDIO viaudiocombo

If i play now a mp3 File i here allways only the first two seconds of the sound and that in a endless loop.

does anybody know what i have to do ?
Thanks in advance.

P.S. thats here what lsmod show
# lsmod | grep sound
soundcore 3588 4 (autoclean) [snd]

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#47 Post by jcoder24 »

Flash wrote:jcoder, menno, I tried 'em both and both gave the same result: "device or resource busy." :( I'm not using the sound for anything so what's going on? Neither Top View nor KP Manage Running Processes list anything that looks like a sound driver.
try removing them one at a time

Code: Select all

rmmod i810_audio 
rmmod ac97_codec
if you get the same busy message, reverse the order

Code: Select all

rmmod ac97_codec
rmmod i810_audio 
When you issue lsmod after the alsa modules have been loaded you will see about six or so modules prefixed by "snd_". If not, then alsa hasn't been loaded. Also the following code would also confirm if alsa has been loaded successfully.

Code: Select all

/etc/rc.d/rc.alsa status

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#48 Post by jcoder24 »

ARAN wrote:If i play now a mp3 File i here allways only the first two seconds of the sound and that in a endless loop.

does anybody know what i have to do ?
Thanks in advance.
This one is rather strange, but here are a few questions to see if we can determine a cause:

What pupgets/dotpups do you have installed in puppy?

Which program(s) are you using to play the mp3?

Does all of your mp3s play the same way?

What does lsmod look like with alsa installed?

If you try a new pupxxx file do you get the same problem?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#49 Post by Flash »

jcoder24 wrote:... try removing them one at a time

Code: Select all

rmmod i810_audio 
rmmod ac97_codec
Got no error when I ran those, one at a time in that order, in rxvt. Tried XS tone generator; not a peep. Downloaded your alsa dotpup and installed it. All sound working perfectly now!
When you issue lsmod after the alsa modules have been loaded you will see about six or so modules prefixed by "snd_". If not, then alsa hasn't been loaded.
Here's the result of lsmod:

Code: Select all

# lsmod
Module                  Size  Used by    Not tainted
snd-pcm-oss            36832   0  (autoclean)
snd-mixer-oss          12344   0  (autoclean) [snd-pcm-oss]
snd-intel8x0           18660   0 
snd-ac97-codec         67424   0  [snd-intel8x0]
snd-pcm                55560   0  [snd-pcm-oss snd-intel8x0 snd-ac97-codec]
snd-timer              13860   0  [snd-pcm]
snd                    33732   0  [snd-pcm-oss snd-mixer-oss snd-intel8x0 snd-ac                             97-codec snd-pcm snd-timer]
snd-page-alloc          5268   0  [snd-mixer-oss snd-intel8x0 snd-pcm snd-timer                              snd]
keybdev                 1860   0  (unused)
mousedev                4020   1 
hid                    20804   0  (unused)
usbmouse                1880   0  (unused)
input                   3360   0  [keybdev mousedev hid usbmouse]
parport_pc             15108   0 
parport                23880   0  [parport_pc]
sr_mod                 14488   0  (unused)
ide-cd                 29504   0 
cdrom                  27744   0  [sr_mod ide-cd]
unionfs               157488   1 
nls_iso8859-1           2812   0  (autoclean)
sd_mod                 11404   0  (unused)
ds                      6580   1 
usb-uhci               21936   0  (autoclean) (unused)
usbcore                59596   1  (autoclean) [hid usbmouse usb-uhci]
soundcore               3588   4  (autoclean) [snd]
yenta_socket           10436   1  (autoclean)
pcmcia_core            40228   0  (autoclean) [ds yenta_socket]
tulip                  39200   1  (autoclean)
crc32                   2896   0  (autoclean) [tulip]
e100                   47604   0  (autoclean) (unused)
scsi_mod               93972   2  [sr_mod sd_mod]
# 
Also the following code would also confirm if alsa has been loaded successfully:

Code: Select all

/etc/rc.d/rc.alsa status
Returns:

Code: Select all

ALSA sound driver loaded
Now, on to try Skype and Gizmo.

Thanks, jcoder :D

(Edit: Skype works fine.)

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#50 Post by jcoder24 »

Updated the alsacfg package to detect and remove (hopefully) all oss modules in the correct order. Once testing is completed I'll merge the changes with the main alsa package and upload it.

I would like people who had problems with alsacfg removing the oss modules to try this update and post their results.

I've tested the changes with my soundcard and all of the lsmod samples provided here and elsewhere.

If you already have alsa running or don't want to mess with your current setup, test with a new pupxxx file.

Thanks to all those who submitted samples.

Guest

#51 Post by Guest »

Hi, I try to install alsa using the instruction and it works fine. Bu the problem is when I reboot, my alsa is not being loaded anymore. I have to remove the sound module and do the alsacfg again to get the alsa module loaded. Am I missing something? Is there any other files that I have to change?

Thanks

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#52 Post by Flash »

Guest wrote:Hi, I try to install alsa using the instruction and it works fine. Bu the problem is when I reboot, my alsa is not being loaded anymore. I have to remove the sound module and do the alsacfg again to get the alsa module loaded. Am I missing something? Is there any other files that I have to change?

Thanks
How are you using Puppy, from live CD, the HD or USB flash memory, or what?

gamepup
Posts: 2
Joined: Tue 27 Dec 2005, 13:31

#53 Post by gamepup »

Puppy 1.0.7b HD Install 2.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#54 Post by Flash »

I finally found the time to make a 107 multisession DVD-RW and try alsa in it. The same thing happens to me: alsa installs ok and most of the settings are saved when I reboot but alsa is not.

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#55 Post by jcoder24 »

For alsa to load on boot you must answer Yes to "Do you want to modify /etc/modules.conf?"

Once you have done that, confirm that the following two files exists and contains content as indicated.

/etc/alsa.conf - Stores the alsa config to be used on boot

This is my alsa.conf, yours should look similar.

Code: Select all

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.10 ---
alias snd-card-0 snd-emu10k1
alias sound-slot-0 snd-emu10k1
# --- END: Generated by ALSACONF, do not edit. ---

/etc/rc.d/rc.local - Loads alsa on boot
Somewhere in your rc.local file you should see the exact text below

Code: Select all

# --- BEGIN: Generated by ALSACFG
if [ -d /usr/lib/modules/2.4.29/kernel/sound/acore ]
then
        echo Copying alsa modules into place....

        cp -r /usr/lib/modules/2.4.29/kernel/sound/* /lib/modules/2.4.29/sound > /dev/null
        depmod

        #load alsa
        /etc/rc.d/rc.loadalsa
fi
# --- END: Generated by ALSACFG
You could also check that the drivers are actually installed:

Code: Select all

find /usr/lib/modules/2.4.29/kernel/sound
You should see a number of lines scroll up the screen.



Unless multisession puppy handles /etc and/or /usr differently than pupxxx file, I can't think of another reason. The hard drive installation AFAIK should work the same as using a pupxxx file.

I haven't been able to boot multisession from ext. usb writer so I'll try to test when I get access to int. writer.

tony
Posts: 334
Joined: Sat 14 Jan 2006, 10:52
Location: Montreal.ca

Alsa Install Not Permanent

#56 Post by tony »

Hi,
I use Pup 1.07 in hard disk booting with GRUB. ALSA installs and runs OK but needs re- installing after each boot.

It all seems OK,but I do get four lines in dmesg saying codec 0 is not valid.

Regards Tony

jcoder24-guest

#57 Post by jcoder24-guest »

I finally got a chance to test alsa with a HD install. The problem is that when alsa starts up it creates /var/lock/subsys/alsasound. This file isn't removed on shutdown so it thinks alsa is already running and don't start it.

To fix this you can edit /etc/rc.d/rc.loadalsa and add the following code immediately below the line that reads #----- if alsa is configured

Code: Select all

if [ -f /var/lock/subsys/alsasound ] 
then
        rm /var/lock/subsys/alsasound
fi
For anyone with a HD install you can speed up your boot by editing your /etc/rc.d/rc.local and commenting out the following three lines

Code: Select all

echo Copying alsa modules into place....

cp -r /usr/lib/modules/2.4.29/kernel/sound/* /lib/modules/2.4.29/sound > /dev/null
depmod
To comment out a line you place a '#' without the quotes at the start of the line.

Some or all of the above may be true for multisession CD/DVD as well but I'm yet to test that.
After testing multisession, I'll update the alsacfg package with the above changes.

jc

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#58 Post by Flash »

jcoder24-guest wrote:I finally got a chance to test alsa with a HD install. The problem is that when alsa starts up it creates /var/lock/subsys/alsasound. This file isn't removed on shutdown so it thinks alsa is already running and don't start it.

To fix this you can edit /etc/rc.d/rc.loadalsa and add the following code immediately below the line that reads #----- if alsa is configured

Code: Select all

if [ -f /var/lock/subsys/alsasound ] 
then
        rm /var/lock/subsys/alsasound
fi
Well, I'm running Puppy from the live CD with pup001 file. As you might have guessed I don't know what I'm doing - but I edited the file anyway. :) After installing ALSA I tried copying your text and pasting it below the line you indicated in /etc/rc.d/rc.loadalsa, but when I rebooted ALSA wasn't there.

I navigated in ROX to /etc/rc.d/rc.loadalsa, right clicked on the file and chose "open as text." It opened in Beaver. I pasted the text I copied from your post then chose File -> Save. When I go back and look at it, it doesn't match yours exactly and I don't know what spacing, indentation and so forth are important. When I open the file in Beaver it says "/root/.etc/rc.d/rc.loadalsa - Beaver 0.2.7." Here's what's in the window:

Code: Select all

#----- if alsa is installed
if [ -f /usr/sbin/alsaconf ]
then
	#----- if alsa is configured
        if [ -f /var/lock/subsys/alsasound ]
        then
            rm /var/lock/subsys/alsasound
        fi
		#---- try to remove oss modules

		echo "Searching for OSS drivers...."
		OSS_MOD=`lsmod | grep soundcore | gawk '{ print $5 }' | sed 's/[^a-zA-Z0-9]//g'`

		if [ ! -z "$OSS_MOD" -a "$OSS_MOD" != "snd" ]
		then
			echo "Found OSS driver $OSS_MOD"
			rmmod `lsmod | grep $OSS_MOD | grep -v core | gawk '{ print $1 }'`
			sleep 2
		else
			echo "No OSS drivers located."
			sleep 5
		fi

		#---- backup modules.conf in case we want to reconfigure alsa

		if [ ! -f /etc/modules.bak ]
		then
			cp /etc/modules.conf /etc/modules.bak
		fi
		echo "Loading alsa...."

                #------ start alsa

		cat /etc/alsa.conf >> /etc/modules.conf
                /etc/rc.d/rc.alsa start

        else
                echo "PLEASE run alsaconf from a console to configure alsa."
                echo "pausing for 10 secs...."
                sleep 10
        fi
fi

Guest

#59 Post by Guest »

jcoder24 wrote:Instructions

1. Download & install alsa-1.0.10-1211a.pup
2. Download & install alsacfg-1.0.10-1226.pup
3. open console and run alsacfg
4. Follow onscreen instructions.

NB. If you want alsa to load on boot you must answer Yes to "Do you want to modify /etc/modules.conf?"

~~~~~~~

I had to make the following changes to alsaconf to get it to detect and configure my card.

changed all occurrences of darkred to green

/sbin/modinfo
/usr/sbin/modinfo as you suggested previously

x = sprintf ("'$lspci' -n 2>/dev/null| grep '"' 040.: '"' | grep %s", $2);
x = sprintf ("'$lspci' -n 2>/dev/null| grep %s", $2);

rcalsasound=rcalsasound
rcalsasound=/etc/rc.d/rc.alsa

Created the following files:
/usr/local/bin/alsacfg - for initial alsa configuration (saved to /etc/alsa.conf) and to add entries to /etc/rc.d/rc.local
/usr/local/bin/rmalsa - to uninstall alsa
/etc/rc.d/rc.loadalsa - removes oss modules and loads alsa on startup using stored config.

Xtmix seems to be loading and working ok now (prob had a corrupt pupxxx file). For my card (Creative SoundBlaster Live) Xtmix now show controls for Bass and Treble although they seem not to work and there is an additional 'wave' device. The dotpup can be found at the link below for testing.

**EDIT** 2005/12/11 12:24 GMT-4
Updated and uploaded new package (Download Link 2.3M/7.2M Download/Install). If you have downloaded the previous package, download the attached alsacfg-1.0.10-xxxx.pup and the libasound-1.0.10 files instead.


**EDIT - 2005/12/04**
To run the inital alsa config use the menu start -> dotpups -> run-alsacfg or run alsacfg from a console


~~~~~~~

Misc notes

**EDIT - 2005/12/05 **
This package doesn't include alsa-oss libraries. They are in the dotpup package attached below. Note I haven't tried testing the alsa-oss.


I tried having alsaconf append the alsa config to /etc/modules.conf0 but when i tried to load the modules they couldn't be found hence the reason I'm storing the config to /etc/alsa.conf.

Also since /lib/modules... isn't persistent across boots I've installed all modules to /usr/lib/modules/2.4.29/kernel/sound/ and copy them across to /lib/modules/2.4.29/sound on each boot.

Feedback welcome as always.
jc

Got alsa to work in dsl thought I would try puppy again but no joy...downloaded said files and got error message installing it said "either files are corrupted or did not go into own folders as is normal so manually tried creating said folders and moving files to them and running alsaconfig and it was still a no go.

How long before alsa is part of puppy?

richiew
Posts: 13
Joined: Tue 16 Aug 2005, 21:57
Location: Lincs. Uk

#60 Post by richiew »

Following the sintructions on this page I managed to install and get alsa working.

However, when I rebooted it no longer works.

This seems to be because some of the files are not being copied across from /usr/lib/... to /lib/...

The error says that there is no space left.

I don't really understand why that can be. Please help.

Thank you.

Post Reply