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 5CONFIG{sysfs_device}="/class/sound/card$cardinfo{card}/device" 6ACCESS!="$sysfsroot$config{sysfs_device}", \ 7 CONFIG{sysfs_device}="/class/sound/controlC$cardinfo{card}/device" 8 9# test for extra commands 10ENV{CMD}=="help", INCLUDE="help", GOTO="00main_end" 11ENV{CMD}=="info", INCLUDE="info", GOTO="00main_end" 12ENV{CMD}=="default", INCLUDE="default", GOTO="00main_end" 13ENV{CMD}=="test", INCLUDE="test", GOTO="00main_end" 14ENV{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 28RESULT="unknown" 29ACCESS=="preinit", INCLUDE="preinit" 30RESULT=="skip", GOTO="init_end" 31 32# real ALSA configuration database 33CARDINFO{driver}=="HDA-Intel", INCLUDE="hda", GOTO="init_end" 34CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end" 35CARDINFO{driver}=="Test", INCLUDE="test", GOTO="init_end" 36 37LABEL="init_end" 38ACCESS=="postinit", INCLUDE="postinit" 39RESULT=="true", GOTO="00main_end" 40ERROR="Found hardware: \"$cardinfo{driver}\" \"$cardinfo{mixername}\" \"$cardinfo{components}\" \"$attr{subsystem_vendor}\" \"$attr{subsystem_device}\"\n" 41ERROR="Hardware is initialized using a generic method\n" 42INCLUDE="default" 43EXIT="99" 44 45# 46# label identifying end of main file 47# 48 49LABEL="00main_end" 50