00main 1.8 KB

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