(command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-x)} {(/usr/sbin/alsactl)} {(Lit_Other ']')}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PATH spids:[80]) op: Equal rhs: {(/usr/local/sbin) (Lit_Other ':') (/usr/local/bin) (Lit_Other ':') (/usr/sbin) (Lit_Other ':') (/usr/bin) (Lit_Other ':') (/sbin) (Lit_Other ':') (/bin) } spids: [80] ) ] spids: [80] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:MYNAME spids:[93]) op: Equal rhs: {(/etc/init.d/alsa-utils)} spids: [93] ) ] spids: [93] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ALSACTLHOME spids:[96]) op: Equal rhs: {(/run/alsa)} spids: [96] ) ] spids: [96] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_DollarName '$ALSACTLHOME'))} {(Lit_Other ']')}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$ALSACTLHOME'))}) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (C {(.)} {(/usr/share/alsa/utils.sh)}) (command.FuncDef name: log_action_end_msg_and_exit body: (command.BraceGroup children: [ (C {(log_action_end_msg)} {(DQ ($ VSub_Number '$1'))} { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(DQ ($ VSub_Number '$2'))} ) spids: [149 155] ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {($ VSub_Number '$1')} ) ] spids: [140] ) spids: [136 139] ) (command.FuncDef name: executable body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe Op_DPipe] children: [ (C {(Lit_Other '[')} {(-x)} {(/bin/which)} {(Lit_Other ']')}) (C {(Lit_Other '[')} {(-x)} {(/usr/bin/which)} {(Lit_Other ']')}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.SimpleCommand words: [{(which)} {(DQ ($ VSub_Number '$1'))}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) ] spids: [172] ) spids: [168 171] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(executable)} {(amixer)}) (command.BraceGroup children: [ (command.Sentence child: (command.SimpleCommand words: [ {(echo)} {(DQ (${ VSub_Name MYNAME) (': Error: No amixer program available.'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) terminator: <Op_Semi ';'> ) ] spids: [233] ) ] ) (command.FuncDef name: restore_levels body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-f)} {(/var/lib/alsa/asound.state)} {(Lit_Other ']')}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CARD spids:[283]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [283] ) ] spids: [283] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(all)} {(Lit_Other ']')} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CARD spids:[303]) op: Equal rhs: {(DQ )} spids: [303] ) ] spids: [303] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:MSG spids:[326]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [ {(alsactl)} {(-E)} {(Lit_VarLike 'HOME=') (DQ ($ VSub_DollarName '$ALSACTLHOME')) } {(restore)} {($ VSub_DollarName '$CARD')} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [328 347] ) ) } spids: [326] ) ] spids: [326] ) (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_DollarName '$MSG'))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 364] ) ] else_action: [ (command.SimpleCommand words: [{(alsactl)} {(-F)} {(restore)} {($ VSub_DollarName '$CARD')}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) (C {(log_action_cont_msg)} {(DQ ("warning: 'alsactl -E HOME=")) ($ VSub_DollarName '$ALSACTLHOME') (DQ (' restore') (word_part.BracedVarSub token: <VSub_Name CARD> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(' ') ($ VSub_DollarName '$CARD')} ) spids: [406 411] ) ("' failed with error message '") ($ VSub_DollarName '$MSG') ("'") ) } ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [372 423] ) ] spids: [265] ) spids: [261 264] ) (command.FuncDef name: store_levels body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CARD spids:[438]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [438] ) ] spids: [438] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(all)} {(Lit_Other ']')} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CARD spids:[458]) op: Equal rhs: {(DQ )} spids: [458] ) ] spids: [458] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:MSG spids:[465]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [ {(alsactl)} {(-E)} {(Lit_VarLike 'HOME=') (DQ ($ VSub_DollarName '$ALSACTLHOME')) } {(store)} {($ VSub_DollarName '$CARD')} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [467 483] ) ) } spids: [465] ) ] spids: [465] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(sleep)} {(1)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [16777215 488] ) ] else_action: [ (C {(log_action_cont_msg)} { (DQ ("warning: 'alsactl store") (word_part.BracedVarSub token: <VSub_Name CARD> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(' ') ($ VSub_DollarName '$CARD')} ) spids: [508 513] ) ("' failed with error message '") ($ VSub_DollarName '$MSG') ("'") ) } ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [501 525] ) ] spids: [435] ) spids: [431 434] ) (command.FuncDef name: mute_and_zero_levels_on_card body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CARDOPT spids:[541]) op: Equal rhs: {(DQ ('-c ') ($ VSub_Number '$1'))} spids: [541] ) ] spids: [541] ) (command.ForEach iter_name: CTL iter_words: [ {(Master)} {(PCM)} {(Synth)} {(CD)} {(Line)} {(Mic)} {(DQ ('PCM,1'))} {(Wave)} {(Music)} {(AC97)} {(DQ ('Master Digital'))} {(DAC)} {(DQ ('DAC,0'))} {(DQ ('DAC,1'))} {(Headphone)} {(Speaker)} {(Playback)} ] do_arg_iter: F body: (command.DoGroup children: [(C {(mute_and_zero_level)} {(DQ ($ VSub_DollarName '$CTL'))})] spids: [631 641] ) spids: [553 16777215] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [538] ) spids: [534 537] ) (command.FuncDef name: mute_and_zero_levels body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TTZML_RETURNSTATUS spids:[679]) op: Equal rhs: {(0)} spids: [679] ) ] spids: [679] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(all)}] action: [ (command.ForEach iter_name: CARD iter_words: [ { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo_card_indices)})]) left_token: <Left_CommandSub '$('> spids: [702 704] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(mute_and_zero_levels_on_card)} {(DQ ($ VSub_DollarName '$CARD'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TTZML_RETURNSTATUS spids:[719]) op: Equal rhs: {(1)} spids: [719] ) ] spids: [719] ) ] ) ] spids: [708 723] ) spids: [701 706] ) ] spids: [692 693 726 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(mute_and_zero_levels_on_card)} {(DQ ($ VSub_Number '$1'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TTZML_RETURNSTATUS spids:[741]) op: Equal rhs: {(1)} spids: [741] ) ] spids: [741] ) ] ) ] spids: [729 730 745 16777215] ) ] spids: [683 689 748] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_DollarName '$TTZML_RETURNSTATUS')} ) ] spids: [676] ) spids: [672 675] ) (command.FuncDef name: card_OK body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) (C {(bugout)}) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(all)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(Lit_Other '[')} {(-d)} {(/proc/asound)} {(Lit_Other ']')}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_QMark '$?')} ) ] spids: [16777215 798] ) ] else_action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-d)} {(DQ (/proc/asound/card) ($ VSub_Number '$1'))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(-d)} {(DQ (/proc/asound/) ($ VSub_Number '$1'))} {(Lit_Other ']')} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_QMark '$?')} ) ] spids: [815 848] ) ] spids: [766] ) spids: [762 765] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[873]) op: Equal rhs: {(0)} spids: [873] ) ] spids: [873] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARGET_CARD spids:[877]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [877] ) ] spids: [877] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$TARGET_CARD'))} arms: [ (case_arm pat_list: [{(DQ )} {(all)}] action: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARGET_CARD spids:[898]) op: Equal rhs: {(all)} spids: [898] ) ] spids: [898] ) terminator: <Op_Semi ';'> ) (C {(log_action_begin_msg)} {(DQ ('Setting up ALSA'))}) ] spids: [892 896 909 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(log_action_begin_msg)} {(DQ ('Setting up ALSA card ') (${ VSub_Name TARGET_CARD))} ) ] spids: [912 913 924 16777215] ) ] spids: [883 889 927] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(card_OK)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (C {(log_action_end_msg_and_exit)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {($ VSub_QMark '$?')}) terminator: <Op_Semi ';'> ) ] ) left_token: <Left_CommandSub '$('> spids: [941 961] ) ) } {(DQ ('none loaded'))} ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(preinit_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[977]) op: Equal rhs: {(1)} spids: [977] ) ] spids: [977] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [(C {(restore_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))})] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(sanify_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[1004]) op: Equal rhs: {(1)} spids: [1004] ) ] spids: [1004] ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (command.SimpleCommand words: [{(restore_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) (C {(Lit_Other ':')}) ] ) ] spids: [16777215 993] ) ] spids: [16777215 1025] ) (C {(log_action_end_msg_and_exit)} {(DQ ($ VSub_DollarName '$EXITSTATUS'))}) ] spids: [869 870 1035 16777215] ) (case_arm pat_list: [{(stop)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[1042]) op: Equal rhs: {(0)} spids: [1042] ) ] spids: [1042] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARGET_CARD spids:[1046]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [1046] ) ] spids: [1046] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$TARGET_CARD'))} arms: [ (case_arm pat_list: [{(DQ )} {(all)}] action: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARGET_CARD spids:[1067]) op: Equal rhs: {(all)} spids: [1067] ) ] spids: [1067] ) terminator: <Op_Semi ';'> ) (C {(log_action_begin_msg)} {(DQ ('Shutting down ALSA'))}) ] spids: [1061 1065 1078 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(log_action_begin_msg)} {(DQ ('Shutting down ALSA card ') (${ VSub_Name TARGET_CARD))} ) ] spids: [1081 1082 1093 16777215] ) ] spids: [1052 1058 1096] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(card_OK)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (C {(log_action_end_msg_and_exit)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {($ VSub_QMark '$?')}) terminator: <Op_Semi ';'> ) ] ) left_token: <Left_CommandSub '$('> spids: [1110 1130] ) ) } {(DQ ('none loaded'))} ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(store_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[1146]) op: Equal rhs: {(1)} spids: [1146] ) ] spids: [1146] ) ] ) (C {(log_action_end_msg_and_exit)} {(DQ ($ VSub_DollarName '$EXITSTATUS'))}) ] spids: [1038 1039 1161 16777215] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[1170]) op: Equal rhs: {(0)} spids: [1170] ) ] spids: [1170] ) (command.AndOr ops: [Op_DPipe] children: [ (C {($ VSub_Number '$0')} {(stop)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[1180]) op: Equal rhs: {(1)} spids: [1180] ) ] spids: [1180] ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {($ VSub_Number '$0')} {(start)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXITSTATUS spids:[1190]) op: Equal rhs: {(1)} spids: [1190] ) ] spids: [1190] ) ] ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {($ VSub_DollarName '$EXITSTATUS')} ) ] spids: [1164 1167 1199 16777215] ) (case_arm pat_list: [{(reset)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARGET_CARD spids:[1206]) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [1206] ) ] spids: [1206] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$TARGET_CARD'))} arms: [ (case_arm pat_list: [{(DQ )} {(all)}] action: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARGET_CARD spids:[1227]) op: Equal rhs: {(all)} spids: [1227] ) ] spids: [1227] ) terminator: <Op_Semi ';'> ) (C {(log_action_begin_msg)} {(DQ ('Resetting ALSA'))}) ] spids: [1221 1225 1238 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(log_action_begin_msg)} {(DQ ('Resetting ALSA card ') (${ VSub_Name TARGET_CARD))} ) ] spids: [1241 1242 1253 16777215] ) ] spids: [1212 1218 1256] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(card_OK)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (C {(log_action_end_msg_and_exit)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) (command.Sentence child: (C {(echo)} {($ VSub_QMark '$?')}) terminator: <Op_Semi ';'> ) ] ) left_token: <Left_CommandSub '$('> spids: [1270 1290] ) ) } {(DQ ('none loaded'))} ) ] ) (C {(preinit_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (C {(sanify_levels)} {(DQ ($ VSub_DollarName '$TARGET_CARD'))}) (C {(log_action_end_msg_and_exit)} {(DQ ($ VSub_QMark '$?'))}) ] spids: [1202 1203 1319 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('Usage: ') ($ VSub_DollarName '$MYNAME') (' {start [CARD]|stop [CARD]|restart [CARD]|reset [CARD]}') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [1322 1323 1343 16777215] ) ] spids: [860 866 1345] ) ] )