LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-02-2004, 03:20 PM   #1
AFI_Flame
Member
 
Registered: Apr 2004
Location: Nolensville, TN
Distribution: OpenSuse 10.2
Posts: 253

Rep: Reputation: 30
ALSA Booting Up Muted


I just compiled a new 2.6.7 kernel for my Slackware 10.0 and got ALSA set up. I ran alsaconf and everything works great but every time I reboot the sound goes back to being muted. How do I fix this?
 
Old 07-02-2004, 03:45 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
man alsactl
 
Old 07-02-2004, 04:10 PM   #3
AFI_Flame
Member
 
Registered: Apr 2004
Location: Nolensville, TN
Distribution: OpenSuse 10.2
Posts: 253

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by keefaz
man alsactl
Yea i already looked at that... I did an "alsactl store" and now i can do an "alsactl restore" and I get my volume back but I want to know how to do this automatically without having to type "alsactl restore" everytime.
 
Old 07-02-2004, 04:14 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You don't have to, it is done for you at boot by the /etc/rc.d/rc.alsa init script.
 
Old 07-02-2004, 04:16 PM   #5
AFI_Flame
Member
 
Registered: Apr 2004
Location: Nolensville, TN
Distribution: OpenSuse 10.2
Posts: 253

Original Poster
Rep: Reputation: 30
I don't have that script... I uninstalled the ALSA drivers that came with Slackware and compiled my own when I upgraded my kernel.
 
Old 07-02-2004, 04:19 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Here is the code :
Code:
#!/bin/sh
# Load the mixer settings and OSS compatibility for ALSA.
# (the Advanced Linux Sound Architecture)

# A function to load the ALSA mixer settings:
load_alsa_mixer() {
  if [ -r /etc/asound.state ]; then
    echo "Loading ALSA mixer settings:  /usr/sbin/alsactl restore"
    /usr/sbin/alsactl restore
  else
    echo "ALSA warning:  No mixer settings found in /etc/asound.state."
    echo "  Sound may be muted.  Use 'alsamixer' to unmute your sound card,"
    echo "  and then 'alsactl store' to save the default ALSA mixer settings"
    echo "  to be loaded at boot."
  fi
}

# A function to load the ALSA OSS compat modules:
load_alsa_oss_modules() {
  if ! cat /proc/modules | grep -w snd-pcm-oss 1> /dev/null 2> /dev/null ; then
    echo "Loading OSS compatibility modules for ALSA."
    modprobe snd-pcm-oss
    modprobe snd-mixer-oss
  fi
}

# If hotplug or something else has loaded the ALSA modules, then
# simply load the mixer settings and make sure the OSS compat
# modules are loaded:
if [ -d /proc/asound ]; then
  load_alsa_mixer
  load_alsa_oss_modules
else
  # If there are ALSA modules defined in /etc/modules.conf, but
  # ALSA is not yet loaded, then load the modules now:
  DRIVERS=`modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | awk '{ print $3 }'`
  if [ ! "$DRIVERS" = "" ]; then
    echo "Loading ALSA kernel modules."
    for module in $DRIVERS; do
      modprobe $module
    done
  fi
  # If ALSA is now up, then load the mixer settings and OSS modules:
  if [ -d /proc/asound ]; then
    load_alsa_mixer
    load_alsa_oss_modules
  fi
fi
save as /etc/rc.d/rc.alsa and chmod +x rc.alsa

Last edited by keefaz; 07-02-2004 at 04:21 PM.
 
Old 07-02-2004, 04:41 PM   #7
HuMJohn
Member
 
Registered: Jun 2004
Location: California - home of Slackware
Distribution: Slackware
Posts: 59

Rep: Reputation: 15
Quote:
Originally posted by AFI_Flame
I don't have that script... I uninstalled the ALSA drivers that came with Slackware and compiled my own when I upgraded my kernel.
Did you compile and install the alsa-utils package, too? That is where the rc.alsa, et al, come from.
 
Old 07-02-2004, 04:46 PM   #8
AFI_Flame
Member
 
Registered: Apr 2004
Location: Nolensville, TN
Distribution: OpenSuse 10.2
Posts: 253

Original Poster
Rep: Reputation: 30
Yea i compiled alsa-utils but it didn't give me that file. I just copied that code and now it works That also loaded my OSS Compatibilty too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA, sound always muted after reboot. repe Slackware 5 11-14-2006 01:48 PM
alsa muted through OSS ? qwijibow Linux - General 0 11-13-2004 08:28 PM
ALSA booting problem Djony Linux - Hardware 0 10-03-2004 08:58 PM
How do I change the default muted alsa setting in Core 2? enderjm Fedora 6 04-08-2004 12:35 PM
alsa always starts muted true_atlantis Slackware 3 01-13-2004 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration