Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 01 Sep 2014, 08:15
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to add ALSA to Puppy 1.0.4 HD install
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 7 [91 Posts]   Goto page: 1, 2, 3, 4, 5, 6, 7 Next
Author Message
tempestuous

Joined: 10 Jun 2005
Posts: 5245
Location: Australia

PostPosted: Wed 03 Aug 2005, 05:17    Post subject:  How to add ALSA to Puppy 1.0.4 HD install  

I know there’s talk of ALSA in future Puppy versions, so I thought I would share my ALSA success to help others treading this path.

In VectorLinux compile the following packages from www.alsa-project.org
alsa-driver-1.0.9b
alsa-lib-1.0.9
alsa-utils-1.0.9a

alsa-tools has specific utilities for particular sound cards which I did not install.
alsa-oss is only needed for OSS compatibility. I use xhippo as a front-end for mpg321, and I use MPlayer. Both of these are ALSA compatible, so I didn’t bother with the OSS stuff.

By default, the alsa-driver package will install all sound card drivers it supports, but it can be configured to install only specific drivers. So I just installed the driver for my ESS es1879 card.
At the end of the driver compilation, there is a “snddevices” script which must be run to create device files. It will list these files in the xterminal.

Now we just copy across all the files that have just been created in Vector to Puppy. We might as well start with the device files. Then -

/etc/rc.d/rc.alsa
/etc/asound.state
/etc/alsa.d/
/usr/bin/aconnect
/usr/bin/alsamixer
/usr/bin/amixer
(/usr/bin/aserver) not important
(/usr/bin/alsalisp) not important
/usr/bin/aplay
/usr/bin/aplaymidi
/usr/sbin/alsactl
/usr/sbin/alsaconf
/usr/lib/libasound.. one of these files is a ridiculous 3.6MB! More later.
/usr/lib/ao/
/usr/lib/libao …
(/usr/lib/libalsatoss …) not important
(/usr/lib/libaoss …) not important
/usr/share/alsa/
/usr/include/alsa/
/lib/modules/2.4.29/kernel/sound/… (the drivers themselves)

Now run “update-modules” or “depmod”.

I consider the 3.6MB libasound file too large for Puppy, so I just replaced it with an earlier version which is a more modest 718KB (version 1.0.8, from Debian), and it works fine.

/etc/rc.d/rc.alsa should be run at bootup. Vector calls it from /etc/rc.d/rc.M.
I run it near the end of /root/.etc/rc.d/rc.local0 by adding this -
/root/.etc/rc.d/rc.alsa start > /dev/null 2>&1

Now all that remains is for each installation to have a suitable module loaded, by adding this text to /root/.etc/modules.conf0 -
alias snd-card-0 snd-xxx
alias sound-slot-0 snd-xxx
options snd-xxx dma1=? dma2=? irq=?
(alias char-major-116 snd is already there)

These hardware settings might be known already from specifications, or the “alsaconf” utility can be used to find them.

Eventually I will put these ALSA files into a version of Puppy-Unleashed, so I will have a CD to boot from.
But I wonder since all other drivers in /lib/modules are compressed, whether I should compress the ALSA modules?

Craig S
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 03 Aug 2005, 07:39    Post subject:  

Craig,
That's fantastic!
We have been very interested in getting ALSA working, and some people did have a bit of a look, but you have taken it the whole way and got it working.

I guess the next step will be an Unleashed package -- if you need any help with that, let me know. Basically, you just put all the files together into a .tar.gz tarball.

Do you know what libasound does? ...I don't suppose we can avoid using it, by disabling support for it when configuring prior to compiling? ...there are some other apps that need libasound... trying to remember, Gaim I think, but I managed to work around using it.

It will be interesting to see the total size of an Unleashed package.

I wonder if it could replace OSS? The big distros that I've looked at have kept both.
Back to top
View user's profile Send private message Visit poster's website 
tempestuous

Joined: 10 Jun 2005
Posts: 5245
Location: Australia

PostPosted: Wed 03 Aug 2005, 23:20    Post subject:  

Barry,
OK, I’ve just made a tarball. To whom or where should I send it?
It’s 1.9MB, and is 5.5MB when uncompressed. This is the size penalty you pay for the large number of different device drivers involved. In my Puppy HD install, the total size is much smaller, about 2.2MB, because I only compiled the driver I needed.

Prior to making the tarball I went back and compiled all the ALSA drivers, and since I had already chosen to discard the 1.0.9 libasound file in preference for the smaller 1.0.8 Debian version, I decided that it would be best to compile the 1.0.8 drivers + library, for compatibility’s sake.

I’m fairly certain libasound, or libasound2 as it’s now called, cannot be avoided. It’s the core ALSA library. I just tried removing this file (libasound.so.2.0.0) and sure enough, sound won’t work.

I take the view that if you’re going to use the new ALSA audio driver regime, there’s no point looking backwards, you should aim to use only ALSA-compatible applications. So while the drivers themselves do retain OSS emulation capability, I have not included the ALSA-OSS library.

This raises the issue of what to do about the existing OSS drivers in Puppy. I don’t know what the situation is regarding the possible autodetection and loading of an OSS module, which may conflict with an ALSA module. In my own case, this is not a problem since my ISA sound card is not autodetected.
ALSA has co-existed with OSS for a few years now, so it may be that the ALSA bootup script deals with this potential problem, I just don’t know.

The other option would be to delete the OSS drivers when the ALSA package is installed.
I understand that ALSA can and does completely replace OSS. I don’t think there’s a single audio device that OSS supports that is not supported by ALSA. OSS is still with us for legacy applications and user preference.

Regarding sound configuration in /etc/modules.conf, this is probably not practical in a liveCD situation, so it would be best for users to set up their sound configuration from the commandline, or via some form of automated interface.
To set up my own sound card from the commandline, for example, I would do this –
modprobe snd-es18xx dma1=1 dma2=0 irq=5 fm_port=0x388 isapnp=no

The mixer utility is alsamixer. Its settings are saved/restored with alsactl, and the configuration file is /etc/asound.state. By default the master output is muted.

Craig
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 04 Aug 2005, 10:42    Post subject:  

Yeah, I'll have to test it a lot, on different systems, plus many apps in Puppy are compiled or configured for oss only.
You could email it to me ...send to bkauler@goosee.com

Thanks for your work on this!
Back to top
View user's profile Send private message Visit poster's website 
Guest
Guest


PostPosted: Thu 04 Aug 2005, 19:17    Post subject:  

does alsaconf actually detect any sound devices....

I compiled it from sources a while ago (the whole alsa package) and aslaconf would not detect any sound devices under puppy where as on the same machine it would under slackware.
Back to top
tempestuous

Joined: 10 Jun 2005
Posts: 5245
Location: Australia

PostPosted: Fri 05 Aug 2005, 01:57    Post subject:  

Thanks bladehunter, things like this need checking.
I did run alsaconf in Vector Linux, and it found and configured my ISA sound card. And now I realise that alsaconf creates the ALSA boot scripts, too.

So just now I tried alsaconf in Puppy, and it found nothing … but wait, I can fix that.
There’s another file needed - /var/tmp/alsaconf.cards (and maybe /usr/share/sounds/alsa/test.wav ??)
Also, in Puppy there’s a problem with /sbin/modinfo, so I opened alsaconf in a text editor and changed all instances of /sbin/modinfo to /usr/sbin/modinfo.

Now alsaconf works in Puppy.
Back to top
View user's profile Send private message 
Guest
Guest


PostPosted: Fri 05 Aug 2005, 02:45    Post subject:  

I tip my hat to you.....I tried everything...actually modinfo didn't occur to me
Back to top
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 30 Nov 2005, 09:35    Post subject:  

What's the latest with this project?
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5245
Location: Australia

PostPosted: Thu 01 Dec 2005, 04:49    Post subject:  

jcoder24 has prompted me to revisit ALSA.
The gzipped tarball I made back in June may be corrupt, since I carelessly mixed different library/module versions.
So I have compiled the latest version - 1.0.10 and sent it to jcoder24.

And I have investigated the issue of stopping OSS modules from loading. In Vector Linux, the hotplug boot script prevents any modules listed in /etc/hotplug/blacklist from loading. The ALSA installation puts all OSS modules into this list.
I'm not sure how this process should be adapted for Puppy, since there is no hotplug system in Puppy.

ALSA has been working great for me with Puppy for several months now.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Sat 03 Dec 2005, 15:32    Post subject:  

I had to make a few more changes to alsaconf but I've managed to get tempestuous' package to work. So far the only issue i'm seeing is that xtmixer no longer loads. once i've resolve this and done somemore testing i'll try to create a dotpup for additional testing.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Sat 03 Dec 2005, 18:10    Post subject:  

Do you think it will work "out of the box" with i810 chipset (on-board audio)?
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5245
Location: Australia

PostPosted: Sat 03 Dec 2005, 21:49    Post subject:  

jcoder,
Some mixers are simply incompatible with ALSA, and xtmixer is quite old.
There is a list of Linux audio mixers here which you might check out - www.linuxlinks.com/Software/Multimedia/Mixers/index.shtml

I remember trying several mixers and being frustrated to find that certain channels or options could not be displayed, etc. So now I just use alsamixer. It looks clunky, but it works.

Flash, your i810 chip will work fine with ALSA. If, by “out of the box”, you mean automatic detection at boot, probably no.

Here is how I think (?) you would use ALSA, after it is added to the base Puppy system. jcoder24 will probably confirm all of this.
Preliminary step: boot your PC with “nosound” boot option, this will stop OSS modules from loading. Otherwise, unload any OSS modules after bootup. Then …

Approach A.
1. Run the ALSA boot script –
/root/.etc/rc.d/rc.alsa start
I think this loads the base ALSA modules.
2. Run the ALSA configuration utility alsaconf. This should detect your card, and load the correct module with module options.

Approach B (do everything manually)
modprobe soundcore (this is basic kernel sound support)
modprobe snd (this is the core ALSA module)
modprobe snd-intel8x0
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Sun 04 Dec 2005, 15:41    Post subject:  

Instructions
1. Download & Install alsacore-1.0.10-0124a.pup
2. Open console and run alsacfg
3. Follow onscreen instructions.
4. Answer Yes to "Do you want to modify /etc/modules.conf?" if you want alsa to load on boot.

Misc. Download
alsa-oss.pup. Try this in addition to the alsacore package if sound doesn't work with all of your applications.

Alternative Download
alsacfg-1.0.10-0124.pup ONLY for those who downloaded the pre Jan 2006 alsa-1.0.10.xxx package.

Older Downloads
alsa-1.0.10-1211a.pup
alsacfg-1.0.10-1226.pup

~~~~~~~

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
/usr/local/bin/rmoss - to 'unload' oss modules
/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.

**EDIT** 2006/01/31 20:00 GMT-4
1. Created new script 'rmoss' to remove oss modules. This should hopefully fix problems with rc.loadalsa not removind oss modules for some cards.
2. Add checks for HD install to allow for faster booting. (needs testing)
3. Gzipped all modules to save space (currently modules take up ~5 - 7 MBs).


~~~~~~~

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
alsa-oss.pup
Description  Oss related files
pup

 Download 
Filename  alsa-oss.pup 
Filesize  44.93 KB 
Downloaded  929 Time(s) 
alsacfg-1.0.10-1226.pup
Description  Older updates download, use only if you have problems with the newer version.
pup

 Download 
Filename  alsacfg-1.0.10-1226.pup 
Filesize  5.81 KB 
Downloaded  975 Time(s) 
libasound-1.0.10.pup
Description  Recommended download for those who downloaded the pre Dec 11 version of the alsa package.
pup

 Download 
Filename  libasound-1.0.10.pup 
Filesize  267.95 KB 
Downloaded  680 Time(s) 

Last edited by jcoder24 on Wed 15 Feb 2006, 21:58; edited 27 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Sun 04 Dec 2005, 18:57    Post subject:  

tempestuous,

Thanks for your help. I'm confused how to boot Puppy CD with 'nosound' option? I thought I remembered a thread describing how to enter boot options for Puppy CD but I can't find it.

If it's not possible to enter the 'nosound' option at boot, could you elaborate how to unload any OSS modules after bootup?

jcoder,

I downloaded your dotput but haven't tried installing it because I suppose it will conflict with Puppy's default sound software.
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5245
Location: Australia

PostPosted: Sun 04 Dec 2005, 19:52    Post subject:  

Boot options are easy for me, since I'm booting from hard drive with LILO, but it sounds like jcoder24 has dealt with the problem -
jcoder24 wrote:
/etc/rc.d/rc.loadalsa - removes oss modules and loads alsa on startup using stored config.

Just install the dotpup, reboot, and see what happens.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 7 [91 Posts]   Goto page: 1, 2, 3, 4, 5, 6, 7 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1055s ][ Queries: 12 (0.0160s) ][ GZIP on ]