Changeset 63c29e8


Ignore:
Timestamp:
08/19/2005 10:40:00 PM (19 years ago)
Author:
DJ Lucas <dj@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
f182eed
Parents:
6d5b743
Message:

Updated dev.d scripts and text in alsa-utils

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4956 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    r6d5b743 r63c29e8  
    4545      <itemizedlist>
    4646        <listitem>
     47          <para>[dj] - Updated dev.d scripts and surrounding text
     48          in alsa-utils.</para>
     49        </listitem>
     50        <listitem>
    4751          <para>[randy] - Updated to Sysstat-6.0.1.</para>
    4852        </listitem>
  • multimedia/libdriv/alsa-utils.xml

    r6d5b743 r63c29e8  
    124124      <filename class='directory'>dev.d</filename> handler script that will
    125125      execute when the device is detected
    126       during boot (when plugged in for USB devices).  While still the
     126      during boot (when plugged in for USB devices).</para>
     127
     128      <note>
     129        <para>For versions of udev greater than 0.58, this script will
     130        not work by default.  You'll have to add dev.d compatibility by adding
     131        a udev rules file that contains the line
     132        'RUN="/sbin/udev_send_devd" to continue using the now depreciated
     133        dev.d system.</para>
     134      </note>
     135
     136      <para>  While still the
    127137      <systemitem class="username">root</systemitem> user, create the
    128138      <filename class='directory'>dev.d</filename> script with the following
     
    130140
    131141<screen role="root"><userinput>install -v -d -m755 /etc/dev.d/snd &amp;&amp;
    132 cat &gt;&gt; /etc/dev.d/snd/alsa.dev &lt;&lt; "EOF"
     142cat &gt; /etc/dev.d/snd/alsa.dev &lt;&lt; "EOF"
    133143#!/bin/sh -e
     144# This script is called by udevd when a change in a device is
     145# detected, including initial detection upon bootup.
     146# udevd sets the environment variables ACTION and DEVNAME.
     147
     148[ "$ACTION" = "add" ] || exit 0
    134149DEV_BASENAME="${DEVNAME##*/}"
    135150N="${DEV_BASENAME#controlC}"
    136151case "$DEV_BASENAME" in
    137         controlC[0-7])
    138                 x=0
    139                 while [ $x -lt 20 ]
    140                 do
    141                         sleep 1
    142                         if [ -f /usr/sbin/alsactl ]; then
    143                         /usr/sbin/alsactl restore $N
    144                         exit 0
    145                         else
    146                                 if [ $x -eq 20 ]; then
    147                                 exit 1
    148                                 fi
    149                         fi
    150                 done &amp;
    151         ;;
     152    controlC[0-7])
     153        x=0
     154        while [ $x -lt 20 ]; do
     155            # Wait up to 20 seconds for /usr to be mounted if necessary
     156            if [ -f /usr/sbin/alsactl ]; then
     157                /usr/sbin/alsactl restore $N
     158                exit 0
     159            fi
     160            sleep 1
     161            x=`expr $x + 1`
     162        done &amp; # Put the while command in the background and continue
     163    ;;
    152164esac
    153165exit 0
     
    157169
    158170      <para>You may wish to do additional configuration on a per card basis.
    159       For example, if you wish to load soundfont banks into the first
    160       device (card0), use the following sample script:</para>
     171      For example, if you wish to load soundfont banks, use the following
     172      sample script:</para>
    161173
    162174<screen>#!/bin/sh -e
    163 # Begin /etc/dev.d/snd/controlC0/asfxload.dev
    164 
    165 # Load GM8.sf2 for soundcard 0
    166 /usr/bin/asfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 -D "hw:0,2"
    167 
    168 # End /etc/dev.d/snd/controlC0/sfxload.dev</screen>
     175# Begin /etc/dev.d/snd/<replaceable>[DEVICE]</replaceable>/asfxload.dev
     176
     177x=0
     178    while [ $x -lt 20 ]; do
     179        # Wait up to 20 seconds for /usr to be mounted if necessary
     180        if [ -f /usr/bin/asfxload ]; then
     181            # Load 8 MB sountfont bank
     182            /usr/bin/asfxload /usr/share/sounds/sf2/8mbgmsfx.sf2 -D "<replaceable>[ALSA device string]</replaceable>"
     183            exit 0
     184        fi
     185        sleep 1
     186        x=`expr $x + 1`
     187    done &amp; # Put the while command in the background and continue
     188
     189exit 0
     190# End /etc/dev.d/snd/<replaceable>[DEVICE]</replaceable>/asfxload.dev</screen>
    169191
    170192    </sect3>
Note: See TracChangeset for help on using the changeset viewer.