tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

00main (1808B)


      1 # This is toplevel configuration for for 'alsactl init'.
      2 # See 'man alsactl_init' for syntax.
      3 
      4 # set root device directory in sysfs for soundcard for ATTR{} command
      5 CONFIG{sysfs_device}="/class/sound/card$cardinfo{card}/device"
      6 ACCESS!="$sysfsroot$config{sysfs_device}", \
      7 	CONFIG{sysfs_device}="/class/sound/controlC$cardinfo{card}/device"
      8 
      9 # test for extra commands
     10 ENV{CMD}=="help", INCLUDE="help", GOTO="00main_end"
     11 ENV{CMD}=="info", INCLUDE="info", GOTO="00main_end"
     12 ENV{CMD}=="default", INCLUDE="default", GOTO="00main_end"
     13 ENV{CMD}=="test", INCLUDE="test", GOTO="00main_end"
     14 ENV{CMD}=="*", ERROR="Unknown command '$env{CMD}'\n", GOTO="00main_end"
     15 
     16 # include files with real configuration
     17 #
     18 # steps are:
     19 #   1) look for preinit subdirectory and parse all files in it
     20 #   2) if RESULT=="skip", skip ALSA standard configuration files
     21 #   3) do ALSA standard configuration
     22 #   4) look for postinit subdirectory and parse all files in it
     23 #   5) if RESULT!="true", initialize hardware using a guess method,
     24 #      print an error message and return with exit code 99
     25 #   6) return with exit code 0 (success)
     26 #
     27 
     28 RESULT="unknown"
     29 ACCESS=="preinit", INCLUDE="preinit"
     30 RESULT=="skip", GOTO="init_end"
     31 
     32 # real ALSA configuration database
     33 CARDINFO{driver}=="HDA-Intel", INCLUDE="hda", GOTO="init_end"
     34 CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end"
     35 CARDINFO{driver}=="Test", INCLUDE="test", GOTO="init_end"
     36 
     37 LABEL="init_end"
     38 ACCESS=="postinit", INCLUDE="postinit"
     39 RESULT=="true", GOTO="00_mainend"
     40 ERROR="Found hardware: \"$cardinfo{driver}\" \"$cardinfo{mixername}\" \"$cardinfo{components}\" \"$attr{subsystem_vendor}\" \"$attr{subsystem_device}\"\n"
     41 ERROR="Hardware is initialized using a generic method\n"
     42 INCLUDE="default"
     43 EXIT="99"
     44 
     45 #
     46 # label identifying end of main file
     47 #
     48 
     49 LABEL="00main_end"