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