How to add ALSA to Puppy 1.0.4 HD install

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#61 Post by jcoder24 »

Anonymous wrote: downloaded said files and got error message installing it said "either files are corrupted or did not go into own folders as is normal
Try downloading the files again. If they fail send me a pm and I can email them to you.

richiew wrote:when I rebooted it no longer works.
....
The error says that there is no space left.
How are you running puppy HD, CD with pup001 or Multisession?

If you are running a HD install, then the files should exist and would only be overwritten not requiring additional space.

If its a CD or Multisession puppy then the files would be going into your ramdisk. Since it worked the first time from CD then the only thing I can think of is that maybe something is causing the ramdisk to be used up more than the first time you tried. Are you running a 'pristine' puppy or a remastered one? What other packages have you installed? How big is the ramdisk and how much space is left?

If you are running from CD try a new pupxxx file or a fresh multisession CD and let us know what happens.

~~~~~~

I tested alsa today with puppy 1.0.7 multisession CD. Rebooted and alsa worked without any tinkering. Can someone try it again with a fresh multisession cd and post their results?

Flash
Are you talking about the multisession or the HD puppy? If multisession then (based on my results) it isn't necessary. For HD install the rc.loadalsa should look like this after the edits:

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 

	if [ -f /etc/alsa.conf ]
	then
		#---- 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
Last edited by jcoder24 on Sun 22 Jan 2006, 02:17, edited 1 time in total.

User avatar
bombayrockers
Posts: 427
Joined: Sat 24 Sep 2005, 16:47
Location: Mumbai, India
Contact:

#62 Post by bombayrockers »

This is long post. Can you tell me how to install alsa and configure it in brief ?

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

#63 Post by jcoder24 »

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?"
If you're running a HD install see above.

User avatar
bombayrockers
Posts: 427
Joined: Sat 24 Sep 2005, 16:47
Location: Mumbai, India
Contact:

#64 Post by bombayrockers »

OK I did that. I am not on HD install, and these are the troubles I am having. Immediately after install sound is working. I have also selected yes when asked to modify /etc/modules.conf. But after reboot there is no sound. Some messages show at bootup ie copying modules ... then some error messages but they are too fast for me to read, and I am not able to find them anywhere in /tmp/xrerrs.txt of /var/log/messages or /var/log/Xorg.log. After X has started I have to run alsacfg after every boot to have sound.

jcoder24-guest

#65 Post by jcoder24-guest »

next time you reboot run /etc/rc.d/rc.loadalsa and report what happens.

jc

User avatar
bombayrockers
Posts: 427
Joined: Sat 24 Sep 2005, 16:47
Location: Mumbai, India
Contact:

#66 Post by bombayrockers »

Code: Select all

# /etc/rc.d/rc.loadalsa 
Searching for OSS drivers....
Found OSS driver i810audio
Usage:
rmmod [-aehrsvV] module ...

  -a, --all     Remove all unused modules
  -e, --persist Save persistent data, do not unload module
  -r, --stacks  Remove stacks, starting at the named module
  -s, --syslog  Use syslog for error messages
  -h, --help    Print this message
  -v, --verbose Be verbose
  -V, --version Print the release version number
Loading alsa....
Starting sound driver: snd-intel8x0 Note: /etc/modules.conf is more recent than /lib/modules/2.4.29/modules.dep
/lib/modules/2.4.29/sound/pci/snd-intel8x0.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.29/sound/pci/snd-intel8x0.o: insmod /lib/modules/2.4.29/sound/pci/snd-intel8x0.o failed
/lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o: insmod /lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o failed
/lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o: insmod snd-intel8x0 failed
done
ERROR: Could not load ALSA drivers
# 
however when i run alsacfg the my card is detected and the module gets loaded.

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

#67 Post by richiew »

Sorry, I shoudl have included that details before.

WIth regard to my installation I am tempted to say 'none of the above'. I used the WinXP installer (although I have Win2000) since I was having trouble getting the PCMCIA CDROM to work. I think this makes it a HD install but with the charateristics of a CD.

Anyway. The questions you were asking about Ramdisks seemed to be getting to the heart of the issue so I decided to look at the output from df (see below). I wonder whether this issue is linked to anothe one that I posted elsewhere regarding the /lib/modules/ directory 'disappearing'. The first output of df is whne the machine has booted. This remains the case until the aforementioned directory disappears, the the result changes to the second use of df.

I have installed OpenOffice (/usr_more.cfs) and also Pearl (in order to get Wireless netowrking running).

Something odd is happening somwehere, but I do not know what.

Thanks for taking the time to reply.
Attachments
df.jpg
(40.26 KiB) Downloaded 2233 times

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

#68 Post by jcoder24 »

bombayrockers
I've figured out the problem. The oss modules are not being removed for your sound card which I think is the same as Flash's. Apparently I forgot to update rc.loadalsa when I made the last change to alsacfg. ** Edit ** I've updated alsacfg.pup with the changes highlighted in red below, once they test ok for HD install and the i810 card (ie Flash's & bombayrockers' card) I'll repackage the full package with the updates and other changes below.

Changes for new packages are:
1. Fix oss module(s) detection and removal in rc.loadalsa. (tested with live CD & pup001 with emu10k1 driver)
2. Add checks for HD install to allow for faster booting. (needs testing)

3. Add oss compatibility modules.
4. Gzip all modules to save space (currently modules take up ~5 - 7 MBs).


richiew
I'll have to spend a bit more time investigating your problem. Maybe someone that has used perl and the openoffice usr_more file can help shed some light. Meanwhile, providing a link to the other post you mention may help as well.

jc
Attachments
alsacfg-1.0.10-0124.pup
Additional fixes and speed improvements for HD installation
(5.99 KiB) Downloaded 606 times
Last edited by jcoder24 on Wed 25 Jan 2006, 01:07, edited 2 times in total.

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

#69 Post by richiew »

jcoder 24

Thanks for your time.

Here is the link:

http://www.murga.org/~puppy/viewtopic.php?p=33921#33921

(Looking back, my typing is really really bad!)

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

#70 Post by jcoder24 »

Updated alsacfg.pup see above

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

#71 Post by Flash »

Thanks jcoder. I still have to run alsacfg when I start (1.0.7, live CD, pup001 file on hd) but that didn't work before, so you're on the right track. :)

Skype works, after running alsacfg. (Must install this dotpup along with the download from Skype.)

jc-guest

#72 Post by jc-guest »

Flash:

Try running /etc/rc.d/rc.loadalsa instead of alsacfg on start up and post your results.

jc

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

#73 Post by Flash »

# /etc/rc.d/rc.loadalsa
Searching for OSS drivers....
Found OSS driver i810audio
Usage:
rmmod [-aehrsvV] module ...

-a, --all Remove all unused modules
-e, --persist Save persistent data, do not unload module
-r, --stacks Remove stacks, starting at the named module
-s, --syslog Use syslog for error messages
-h, --help Print this message
-v, --verbose Be verbose
-V, --version Print the release version number
Loading alsa....
Starting sound driver: snd-intel8x0 Note: /etc/modules.conf is more recent than /lib/modules/2.4.29/modules.dep
/lib/modules/2.4.29/sound/pci/snd-intel8x0.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including inva lid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
/lib/modules/2.4.29/sound/pci/snd-intel8x0.o: insmod /lib/modules/2.4.29/sound/p ci/snd-intel8x0.o failed
/lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including inva lid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
/lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o: insmod /lib/modules/ 2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o failed
/lib/modules/2.4.29/2.4.29/kernel/sound/pci/snd-intel8x0.o: insmod snd-intel8x0 failed
done
ERROR: Could not load ALSA drivers
After all that, the Snack Tone Generator works, but at the low level indicating to me that OSS is what's making the noise; its default level is much louder when alsa is working.

There's something else. When alsacfg reports the soundcards it finds, there are two instances of them. Might that cause confusion?
Attachments
alsacfg_snd_cards.jpg
(40.01 KiB) Downloaded 2161 times

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

#74 Post by jcoder24 »

The cards showing up twice doesn't prevent alsaconf or alsa for working. Each entry is a duplicate of the other and it doesn't make a difference which one you select. It usu. happens if you run alsaconf or alsacfg more than once. I was planning to 'hack' alsaconf some more to correct this once all of the persistence issues were resolved.

The problem looks to be the same oss not being 'uninstalled' issue. The thing is that the same script (/usr/local/bin/rmoss) is being called in both rc.loadalsa and alsacfg to uninstall oss so I can't figure out why it's wouldn't work.

Run these test and let me know what happens.
1. Verify that /etc/rc.d/rc.loadalsa contains a line that says /usr/local/bin/rmoss.

Code: Select all

grep rmoss /etc/rc.d/rc.loadalsa


2 If not, reinstall alsacfg.pup and verify the line exists now. Once it does, run /etc/rc.d/rc.loadalsa. If that works reboot and see what happens.

3 If it does contain the line then run /usr/local/bin/rmoss. If rmoss gives the same errors as you posted above replace the code in rmoss with the one below, rerun rmoss and post your results.

Code: Select all

#---- remove oss modules

echo "Searching for OSS drivers...."
OSS_MOD=`lsmod | grep soundcore | sed 's/.* / /' | sed 's/[^a-z\-\_A-Z0-9]//g'`

if [ "$OSS_MOD" = "sound" ]; then
	OSS_MOD=`lsmod | grep sound | grep -v core |  sed 's/\(.*\[\)\(.*\)\(\]\)/\2/' | sed 's/[\ ]/\ -e /g'`
fi

if [ ! -z "$OSS_MOD" -a "$OSS_MOD" != "snd" ] 
then
	echo "Removing OSS drivers..."
	echo `lsmod | grep -e $OSS_MOD | grep -v core | gawk '{ print $1 }'`

	for mod in `lsmod | grep -e $OSS_MOD | grep -v core | gawk '{ print $1 }'`
	do
		echo $mod
		rmmod $mod
	done
	sleep 2
else
	echo "No loaded OSS modules found!!!"
	sleep 5
fi
If I can't get the oss modules removal working for all soundcards then I would have to look into preventing oss from starting. However, Barry has started working on ALSA for Puppy2 so depending on how soon a 'stable alpha' is released my efforts may no longer be need.

jc

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#75 Post by BarryK »

jc,
when the next pre-alpha of puppy2 comes out, there are bound to still be issues with getting it working properly, where your experience and help will be invaluable.

By the way, I've just edited the Developer News page, as it was yourself that proposed the modification to the path of modinfo, not Tempestuous.

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

#76 Post by jcoder24 »

Actually, Tempestuous originally suggested/implemented the change see http://www.murga.org/~puppy/viewtopic.php?p=8552#8552.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#77 Post by tempestuous »

Barry and jcoder24,
My own implementation of ALSA was somewhat crude, and once it worked on my particular hardware I didn

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#78 Post by BarryK »

tempestuous wrote: But none of us has worked out the problem of stopping OSS!
Well, I've done it in puppy2 rather crudely, just left out the OSS modules. "scanmodules --load" is still there, so it will attempt to load an OSS module then fail.
...actually, I haven't tested that yet.

I could remove all the entries from /lib/libhardware/soundcard.db also, as that's where scanmodules gets its info.
...yeah, seems like a good idea, will do that.

Nightflier

Almost there

#79 Post by Nightflier »

First of all: I am really impressed with Puppy's size and speed. My compliments to the developers.

I have a hard drive install of 1.0.7., "alsacore-1.0.10-0124a.pup" installed without problems and works with the CS-4236 sound. After reboot it did not work. I looked in rc.local and got the impression the "if" statement caused rc.loadalsa not to run, so I commented out everything except "/etc/rc.d/rc.loadalsa". That made the script run, but then, my PS/2 mouse stopped working.

Running /etc/rc.d/rc.loadalsa manually after xwin is up works. I removed rc.loadalsa from rc.local. Then I made a symlink to rc.loadalsa in home folder. One click and sound works. Is there a way to automatically do this, after xwin (or mouse driver) loads?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#80 Post by MU »

you can edit /root/.xinitrc
Add your command there before "exec $CURRENTWM".

use a syntax like this:
sleep 3 && /etc/rc.d/rc.loadalsa &

This will run it 3 seconds after your desktop starts. The "&" runs it in background, so that it does not stop the Desktop from loading.

Mark

Post Reply