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