test (10699B)
1 # Test code 2 # Just for debugging purposes 3 4 PRINT="Default CTL:\n" 5 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 6 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 7 PRINT=" CTL{device}=\"$ctl{device}\"\n" 8 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 9 PRINT=" CTL{name}=\"$ctl{name}\"\n" 10 PRINT=" CTL{index}=\"$ctl{index}\"\n" 11 12 CTL{reset}="mixer" 13 14 PRINT="After CTL{reset}=\"mixer\":\n" 15 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 16 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 17 PRINT=" CTL{device}=\"$ctl{device}\"\n" 18 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 19 PRINT=" CTL{name}=\"$ctl{name}\"\n" 20 PRINT=" CTL{index}=\"$ctl{index}\"\n" 21 22 CTL{numid}="987" 23 CTL{iface}="sequencer" 24 CTL{device}="10" 25 CTL{subdevice}="20" 26 CTL{name}="Just Test" 27 CTL{index}="999" 28 29 PRINT="After test sequence:\n" 30 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 31 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 32 PRINT=" CTL{device}=\"$ctl{device}\"\n" 33 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 34 PRINT=" CTL{name}=\"$ctl{name}\"\n" 35 PRINT=" CTL{index}=\"$ctl{index}\"\n" 36 37 ERROR="Ignore following error:\n " 38 PROGRAM="__just_test" 39 40 PRINT="CTL{do_count} test:\n" 41 CTL{search}="mixer", CTL{name}="*Switch*", \ 42 PRINT=" *Switch* count result: $ctl{do_count}\n" 43 44 PRINT="__ctl_search test:\n" 45 CTL{search}="mixer", CTL{name}="*Switch*", PROGRAM!="__ctl_search", GOTO="skip_switch_search" 46 PRINT=" *Switch 0* search result: $result\n" 47 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 48 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 49 PRINT=" CTL{device}=\"$ctl{device}\"\n" 50 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 51 PRINT=" CTL{name}=\"$ctl{name}\"\n" 52 PRINT=" CTL{index}=\"$ctl{index}\"\n" 53 CTL{search}="mixer", CTL{name}="*Switch*", PROGRAM!="__ctl_search 1", GOTO="skip_switch_search" 54 PRINT=" *Switch 1* search result: $result\n" 55 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 56 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 57 PRINT=" CTL{device}=\"$ctl{device}\"\n" 58 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 59 PRINT=" CTL{name}=\"$ctl{name}\"\n" 60 PRINT=" CTL{index}=\"$ctl{index}\"\n" 61 62 PRINT="First ten elements:\n" 63 CTL{search}="mixer", CTL{name}="*", CTL{do_search 0}!="1", GOTO="skip_first_ten_search" 64 PRINT=" Element #0:\n" 65 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 66 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 67 PRINT=" CTL{device}=\"$ctl{device}\"\n" 68 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 69 PRINT=" CTL{name}=\"$ctl{name}\"\n" 70 PRINT=" CTL{index}=\"$ctl{index}\"\n" 71 PRINT=" CTL{type}=\"$ctl{type}\"\n" 72 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 73 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 74 PRINT=" CTL{count}=\"$ctl{count}\"\n" 75 PRINT=" CTL{min}=\"$ctl{min}\"\n" 76 PRINT=" CTL{max}=\"$ctl{max}\"\n" 77 PRINT=" CTL{step}=\"$ctl{step}\"\n" 78 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 79 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 80 PRINT=" CTL{items}=\"$ctl{items}\"\n" 81 PRINT=" CTL{value}=\"$ctl{value}\"\n" 82 CTL{search}="mixer", CTL{name}="*", CTL{do_search 1}!="1", GOTO="skip_first_ten_search" 83 PRINT=" Element #1:\n" 84 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 85 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 86 PRINT=" CTL{device}=\"$ctl{device}\"\n" 87 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 88 PRINT=" CTL{name}=\"$ctl{name}\"\n" 89 PRINT=" CTL{index}=\"$ctl{index}\"\n" 90 PRINT=" CTL{type}=\"$ctl{type}\"\n" 91 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 92 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 93 PRINT=" CTL{count}=\"$ctl{count}\"\n" 94 PRINT=" CTL{min}=\"$ctl{min}\"\n" 95 PRINT=" CTL{max}=\"$ctl{max}\"\n" 96 PRINT=" CTL{step}=\"$ctl{step}\"\n" 97 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 98 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 99 PRINT=" CTL{items}=\"$ctl{items}\"\n" 100 PRINT=" CTL{value}=\"$ctl{value}\"\n" 101 CTL{search}="mixer", CTL{name}="*", CTL{do_search 2}!="1", GOTO="skip_first_ten_search" 102 PRINT=" Element #2:\n" 103 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 104 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 105 PRINT=" CTL{device}=\"$ctl{device}\"\n" 106 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 107 PRINT=" CTL{name}=\"$ctl{name}\"\n" 108 PRINT=" CTL{index}=\"$ctl{index}\"\n" 109 PRINT=" CTL{type}=\"$ctl{type}\"\n" 110 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 111 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 112 PRINT=" CTL{count}=\"$ctl{count}\"\n" 113 PRINT=" CTL{min}=\"$ctl{min}\"\n" 114 PRINT=" CTL{max}=\"$ctl{max}\"\n" 115 PRINT=" CTL{step}=\"$ctl{step}\"\n" 116 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 117 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 118 PRINT=" CTL{items}=\"$ctl{items}\"\n" 119 PRINT=" CTL{value}=\"$ctl{value}\"\n" 120 CTL{search}="mixer", CTL{name}="*", CTL{do_search 3}!="3", GOTO="skip_first_ten_search" 121 PRINT=" Element #3:\n" 122 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 123 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 124 PRINT=" CTL{device}=\"$ctl{device}\"\n" 125 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 126 PRINT=" CTL{name}=\"$ctl{name}\"\n" 127 PRINT=" CTL{index}=\"$ctl{index}\"\n" 128 PRINT=" CTL{type}=\"$ctl{type}\"\n" 129 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 130 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 131 PRINT=" CTL{count}=\"$ctl{count}\"\n" 132 PRINT=" CTL{min}=\"$ctl{min}\"\n" 133 PRINT=" CTL{max}=\"$ctl{max}\"\n" 134 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 135 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 136 PRINT=" CTL{step}=\"$ctl{step}\"\n" 137 PRINT=" CTL{items}=\"$ctl{items}\"\n" 138 PRINT=" CTL{value}=\"$ctl{value}\"\n" 139 CTL{search}="mixer", CTL{name}="*", CTL{do_search 4}!="1", GOTO="skip_first_ten_search" 140 PRINT=" Element #4:\n" 141 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 142 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 143 PRINT=" CTL{device}=\"$ctl{device}\"\n" 144 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 145 PRINT=" CTL{name}=\"$ctl{name}\"\n" 146 PRINT=" CTL{index}=\"$ctl{index}\"\n" 147 PRINT=" CTL{type}=\"$ctl{type}\"\n" 148 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 149 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 150 PRINT=" CTL{count}=\"$ctl{count}\"\n" 151 PRINT=" CTL{min}=\"$ctl{min}\"\n" 152 PRINT=" CTL{max}=\"$ctl{max}\"\n" 153 PRINT=" CTL{step}=\"$ctl{step}\"\n" 154 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 155 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 156 PRINT=" CTL{items}=\"$ctl{items}\"\n" 157 PRINT=" CTL{value}=\"$ctl{value}\"\n" 158 CTL{search}="mixer", CTL{name}="*", CTL{do_search 5}!="1", GOTO="skip_first_ten_search" 159 PRINT=" Element #5:\n" 160 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 161 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 162 PRINT=" CTL{device}=\"$ctl{device}\"\n" 163 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 164 PRINT=" CTL{name}=\"$ctl{name}\"\n" 165 PRINT=" CTL{index}=\"$ctl{index}\"\n" 166 PRINT=" CTL{type}=\"$ctl{type}\"\n" 167 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 168 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 169 PRINT=" CTL{count}=\"$ctl{count}\"\n" 170 PRINT=" CTL{min}=\"$ctl{min}\"\n" 171 PRINT=" CTL{max}=\"$ctl{max}\"\n" 172 PRINT=" CTL{step}=\"$ctl{step}\"\n" 173 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 174 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 175 PRINT=" CTL{items}=\"$ctl{items}\"\n" 176 PRINT=" CTL{value}=\"$ctl{value}\"\n" 177 CTL{search}="mixer", CTL{name}="*", CTL{do_search 6}!="1", GOTO="skip_first_ten_search" 178 PRINT=" Element #6:\n" 179 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 180 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 181 PRINT=" CTL{device}=\"$ctl{device}\"\n" 182 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 183 PRINT=" CTL{name}=\"$ctl{name}\"\n" 184 PRINT=" CTL{index}=\"$ctl{index}\"\n" 185 PRINT=" CTL{type}=\"$ctl{type}\"\n" 186 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 187 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 188 PRINT=" CTL{count}=\"$ctl{count}\"\n" 189 PRINT=" CTL{min}=\"$ctl{min}\"\n" 190 PRINT=" CTL{max}=\"$ctl{max}\"\n" 191 PRINT=" CTL{step}=\"$ctl{step}\"\n" 192 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 193 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 194 PRINT=" CTL{items}=\"$ctl{items}\"\n" 195 PRINT=" CTL{value}=\"$ctl{value}\"\n" 196 CTL{search}="mixer", CTL{name}="*", CTL{do_search 7}!="1", GOTO="skip_first_ten_search" 197 PRINT=" Element #7:\n" 198 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 199 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 200 PRINT=" CTL{device}=\"$ctl{device}\"\n" 201 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 202 PRINT=" CTL{name}=\"$ctl{name}\"\n" 203 PRINT=" CTL{index}=\"$ctl{index}\"\n" 204 PRINT=" CTL{type}=\"$ctl{type}\"\n" 205 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 206 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 207 PRINT=" CTL{count}=\"$ctl{count}\"\n" 208 PRINT=" CTL{min}=\"$ctl{min}\"\n" 209 PRINT=" CTL{max}=\"$ctl{max}\"\n" 210 PRINT=" CTL{step}=\"$ctl{step}\"\n" 211 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 212 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 213 PRINT=" CTL{items}=\"$ctl{items}\"\n" 214 PRINT=" CTL{value}=\"$ctl{value}\"\n" 215 CTL{search}="mixer", CTL{name}="*", CTL{do_search 8}!="1", GOTO="skip_first_ten_search" 216 PRINT=" Element #8:\n" 217 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 218 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 219 PRINT=" CTL{device}=\"$ctl{device}\"\n" 220 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 221 PRINT=" CTL{name}=\"$ctl{name}\"\n" 222 PRINT=" CTL{index}=\"$ctl{index}\"\n" 223 PRINT=" CTL{type}=\"$ctl{type}\"\n" 224 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 225 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 226 PRINT=" CTL{count}=\"$ctl{count}\"\n" 227 PRINT=" CTL{min}=\"$ctl{min}\"\n" 228 PRINT=" CTL{max}=\"$ctl{max}\"\n" 229 PRINT=" CTL{step}=\"$ctl{step}\"\n" 230 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 231 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 232 PRINT=" CTL{items}=\"$ctl{items}\"\n" 233 PRINT=" CTL{value}=\"$ctl{value}\"\n" 234 CTL{search}="mixer", CTL{name}="*", CTL{do_search 9}!="1", GOTO="skip_first_ten_search" 235 PRINT=" Element #9:\n" 236 PRINT=" CTL{numid}=\"$ctl{numid}\"\n" 237 PRINT=" CTL{iface}=\"$ctl{iface}\"\n" 238 PRINT=" CTL{device}=\"$ctl{device}\"\n" 239 PRINT=" CTL{subdevice}=\"$ctl{subdevice}\"\n" 240 PRINT=" CTL{name}=\"$ctl{name}\"\n" 241 PRINT=" CTL{index}=\"$ctl{index}\"\n" 242 PRINT=" CTL{type}=\"$ctl{type}\"\n" 243 PRINT=" CTL{attr}=\"$ctl{attr}\"\n" 244 PRINT=" CTL{owner}=\"$ctl{owner}\"\n" 245 PRINT=" CTL{count}=\"$ctl{count}\"\n" 246 PRINT=" CTL{min}=\"$ctl{min}\"\n" 247 PRINT=" CTL{max}=\"$ctl{max}\"\n" 248 PRINT=" CTL{step}=\"$ctl{step}\"\n" 249 PRINT=" CTL{dBmin}=\"$ctl{dBmin}\"\n" 250 PRINT=" CTL{dBmax}=\"$ctl{dBmax}\"\n" 251 PRINT=" CTL{items}=\"$ctl{items}\"\n" 252 PRINT=" CTL{value}=\"$ctl{value}\"\n" 253 LABEL="skip_first_ten_search" 254 255 PRINT="Elements write test #1:\n", \ 256 CTL{search}="mixer", CTL{name}="Front Playback Switch", \ 257 CTL{do_search}=="1", CTL{value}="on,on", \ 258 PRINT=" result=$result\n" 259 PRINT="Elements write test #2:\n", \ 260 CTL{search}="mixer", CTL{name}="Front Playback Volume", \ 261 CTL{do_search}=="1", CTL{value}="32,32", \ 262 PRINT=" result=$result\n" 263 PRINT="Elements write test #3:\n", \ 264 CTL{search}="mixer", CTL{name}="Front Playback Volume Error", \ 265 CTL{do_search}=="1", \ 266 PRINT=" result=$result\n" 267 268 #CTL{reset}="mixer", CTL{name}="Input Source", PRINT="***$ctl{enums}\n" 269 270 PRINT="\nAll tests done..\n"