WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Help with alsa sound persistence  (Read 6934 times)

Offline IanG

  • Newbie
  • *
  • Posts: 4
Help with alsa sound persistence
« on: March 27, 2009, 08: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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14624
Re: Help with alsa sound persistence
« Reply #1 on: March 27, 2009, 10:24:06 AM »
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.

Offline IanG

  • Newbie
  • *
  • Posts: 4
Re: Help with alsa sound persistence
« Reply #2 on: March 27, 2009, 10:34:41 AM »
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.

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: Help with alsa sound persistence
« Reply #3 on: March 27, 2009, 12: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?

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Help with alsa sound persistence
« Reply #4 on: March 27, 2009, 12: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.   

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Help with alsa sound persistence
« Reply #5 on: March 27, 2009, 09:50:45 PM »
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. 

Offline IanG

  • Newbie
  • *
  • Posts: 4
Re: Help with alsa sound persistence
« Reply #6 on: March 28, 2009, 02: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?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10981
Re: Help with alsa sound persistence
« Reply #7 on: March 28, 2009, 03:17:28 AM »
It seems to be in /usr/local/etc/init.d instead
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Help with alsa sound persistence
« Reply #8 on: March 28, 2009, 03:35:51 AM »
That's right, it does not get symlinked to /etc/init.d/ like alsasound does.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Help with alsa sound persistence
« Reply #9 on: March 30, 2009, 05: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.

Offline IanG

  • Newbie
  • *
  • Posts: 4
Re: Help with alsa sound persistence
« Reply #10 on: April 02, 2009, 03:04:11 AM »
OK - that seems to have fixed it. It's starting now.

Many thanks for the help!