Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: IanG on March 27, 2009, 11:00:39 AM

Title: Help with alsa sound persistence
Post by: IanG on March 27, 2009, 11:00:39 AM
Greetings all,

I've just started playing with TC after using DSL for a number of years. So far, so good.

I am having trouble getting sound to work on every boot. I'm using alsa which works fine if I run alsaconf from a terminal window after every boot, but the settings &/or configuration is not being saved on shutdown.

Other settings & extensions saving without problem.

Do I need to add something in the bootlocal.sh file or similar &, if so, what?

Using TC in the PPR/TCE mode, booting from CD, tce directory on a USB flash disc. PC is VIA EPIA 5000 with 700M+ memory. My final intention is to remaster everything on to a bootable CD so the kids can have an unbreakable(!) PC for web / flash / games, but it needs to boot & work without keyboard intervention as my youngest is only 3.

Many thanks in advance.
Title: Re: Help with alsa sound persistence
Post by: Juanito on March 27, 2009, 01:24:06 PM
If your sound card works with the oss extension, it would probably be easier than using alsa - I believe you could have the extension load at boot then just add "soundon" to bootlocal.
Title: Re: Help with alsa sound persistence
Post by: IanG on March 27, 2009, 01:34:41 PM
I did try OSS sound first, but the quality was terrible (very distorted) and it didn't work at all with a couple of applications (running under wine).

Alsa works fine and sounds like it should, the only niggle being that I need to run alsaconf on every boot.

Just wondered if anyone else had the same issue & perhaps had a possible solution.

Many thanks.
Title: Re: Help with alsa sound persistence
Post by: ^thehatsrule^ on March 27, 2009, 03:22:42 PM
Alsa works fine and sounds like it should, the only niggle being that I need to run alsaconf on every boot.

Just wondered if anyone else had the same issue & perhaps had a possible solution.
[...]I believe you could have the extension load at boot then just add "soundon" to bootlocal.
... or did you mean something else?
Title: Re: Help with alsa sound persistence
Post by: Jason W on March 27, 2009, 03:29:54 PM
Some live distros set up alsa automatically without calling upon alsaconf; SLAX, Knoppix are two examples.  Since I help maintain the alsa extension I will see if I can work up a script that can be either run on the command line or added to /opt/bootlocal.sh that would configure alsa automatically on boot.   
Title: Re: Help with alsa sound persistence
Post by: Jason W on March 28, 2009, 12:50:45 AM
I took the liberty of putting together a script that will setup alsa on the command line.  It is in the alsa_modules extension named /etc/init.d/alsastart. Put "/etc/init.d/alsastart start" in /opt/bootlocal and it should set up alsa upon boot.  If you want to save the settings, run the command "alsactl store" and then back up your /etc/asound.state file and the combination of these two should preserve alsa settings across reboots.  I have tested this on three machines and it works well so far. 
Title: Re: Help with alsa sound persistence
Post by: IanG on March 28, 2009, 05:36:50 AM
Many thanks for the quick response.

I'm having trouble finding your script - I assumed I should reinstall the alsa_modules.tcem from the appbrowser, but when I did so, I couldn't find alsastart in /etc/init.d/. It looks as if the module has not been updated in the appbrowser.

Not surprisingly, nothing happened when I added /etc/init.d/alsastart start to /opt/bootlocal.sh !

Am I doing something stupid?
Title: Re: Help with alsa sound persistence
Post by: curaga on March 28, 2009, 06:17:28 AM
It seems to be in /usr/local/etc/init.d instead
Title: Re: Help with alsa sound persistence
Post by: Jason W on March 28, 2009, 06:35:51 AM
That's right, it does not get symlinked to /etc/init.d/ like alsasound does.
Title: Re: Help with alsa sound persistence
Post by: Jason W on March 30, 2009, 08:20:56 PM
/usr/local/etc/init.d/alsastart has been merged with /usr/local/etc/init.d/alsasound.  So the command would be:

/usr/local/etc/init.d/alsasound start

to boot with alsa loading automatically.  Basically alsastart was fixing the modprobing of alsasound, no reason to have it seperate.
Title: Re: Help with alsa sound persistence
Post by: IanG on April 02, 2009, 06:04:11 AM
OK - that seems to have fixed it. It's starting now.

Many thanks for the help!