2022-01-27 13:19:32 +01:00
|
|
|
# This is the toplevel configuration for 'alsactl init'.
|
2008-07-31 15:45:08 +02:00
|
|
|
# See 'man alsactl_init' for syntax.
|
|
|
|
|
|
|
|
# set root device directory in sysfs for soundcard for ATTR{} command
|
2009-04-30 11:26:15 +02:00
|
|
|
CONFIG{sysfs_device}="/class/sound/card$cardinfo{card}/device"
|
|
|
|
ACCESS!="$sysfsroot$config{sysfs_device}", \
|
|
|
|
CONFIG{sysfs_device}="/class/sound/controlC$cardinfo{card}/device"
|
2008-07-31 15:45:08 +02:00
|
|
|
|
|
|
|
# test for extra commands
|
|
|
|
ENV{CMD}=="help", INCLUDE="help", GOTO="00main_end"
|
|
|
|
ENV{CMD}=="info", INCLUDE="info", GOTO="00main_end"
|
2008-08-18 15:01:44 +02:00
|
|
|
ENV{CMD}=="default", INCLUDE="default", GOTO="00main_end"
|
2008-07-31 15:45:08 +02:00
|
|
|
ENV{CMD}=="test", INCLUDE="test", GOTO="00main_end"
|
|
|
|
ENV{CMD}=="*", ERROR="Unknown command '$env{CMD}'\n", GOTO="00main_end"
|
|
|
|
|
|
|
|
# include files with real configuration
|
2008-08-13 20:49:07 +02:00
|
|
|
#
|
|
|
|
# steps are:
|
|
|
|
# 1) look for preinit subdirectory and parse all files in it
|
|
|
|
# 2) if RESULT=="skip", skip ALSA standard configuration files
|
|
|
|
# 3) do ALSA standard configuration
|
|
|
|
# 4) look for postinit subdirectory and parse all files in it
|
2008-08-18 15:01:44 +02:00
|
|
|
# 5) if RESULT!="true", initialize hardware using a guess method,
|
|
|
|
# print an error message and return with exit code 99
|
2008-08-13 20:49:07 +02:00
|
|
|
# 6) return with exit code 0 (success)
|
|
|
|
#
|
|
|
|
|
|
|
|
RESULT="unknown"
|
|
|
|
ACCESS=="preinit", INCLUDE="preinit"
|
|
|
|
RESULT=="skip", GOTO="init_end"
|
|
|
|
|
|
|
|
# real ALSA configuration database
|
|
|
|
CARDINFO{driver}=="HDA-Intel", INCLUDE="hda", GOTO="init_end"
|
2009-05-05 11:10:35 +02:00
|
|
|
CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end"
|
2008-08-13 20:49:07 +02:00
|
|
|
CARDINFO{driver}=="Test", INCLUDE="test", GOTO="init_end"
|
|
|
|
|
|
|
|
LABEL="init_end"
|
|
|
|
ACCESS=="postinit", INCLUDE="postinit"
|
2020-10-13 17:30:11 +02:00
|
|
|
RESULT=="true", GOTO="00main_end"
|
2010-09-02 15:03:23 +02:00
|
|
|
ERROR="Found hardware: \"$cardinfo{driver}\" \"$cardinfo{mixername}\" \"$cardinfo{components}\" \"$attr{subsystem_vendor}\" \"$attr{subsystem_device}\"\n"
|
2010-09-02 15:36:56 +02:00
|
|
|
ERROR="Hardware is initialized using a generic method\n"
|
2008-08-18 15:01:44 +02:00
|
|
|
INCLUDE="default"
|
2008-08-13 20:49:07 +02:00
|
|
|
EXIT="99"
|
|
|
|
|
|
|
|
#
|
|
|
|
# label identifying end of main file
|
|
|
|
#
|
|
|
|
|
2008-07-31 15:45:08 +02:00
|
|
|
LABEL="00main_end"
|