Lines Matching refs:node

36     cnode *node = root->first_child;
40 while (node) {
41 if (strcmp(node->name, GAIN_MODE) == 0) {
42 gain->setMode(GainModeConverter::maskFromString(node->value));
43 } else if (strcmp(node->name, GAIN_CHANNELS) == 0) {
46 if (InputChannelConverter::fromString(node->value, mask)) {
50 if (OutputChannelConverter::fromString(node->value, mask)) {
54 } else if (strcmp(node->name, GAIN_MIN_VALUE) == 0) {
55 gain->setMinValueInMb(atoi(node->value));
56 } else if (strcmp(node->name, GAIN_MAX_VALUE) == 0) {
57 gain->setMaxValueInMb(atoi(node->value));
58 } else if (strcmp(node->name, GAIN_DEFAULT_VALUE) == 0) {
59 gain->setDefaultValueInMb(atoi(node->value));
60 } else if (strcmp(node->name, GAIN_STEP_VALUE) == 0) {
61 gain->setStepValueInMb(atoi(node->value));
62 } else if (strcmp(node->name, GAIN_MIN_RAMP_MS) == 0) {
63 gain->setMinRampInMs(atoi(node->value));
64 } else if (strcmp(node->name, GAIN_MAX_RAMP_MS) == 0) {
65 gain->setMaxRampInMs(atoi(node->value));
67 node = node->next;
82 cnode *node = root->first_child;
84 while (node) {
85 ALOGV("loadGains() loading gain %s", node->name);
86 loadAudioPortGain(node, audioPort, index++);
87 node = node->next;
103 cnode *node = root->first_child;
106 while (node) {
107 if (strcmp(node->name, APM_DEVICE_TYPE) == 0) {
108 deviceFromString(node->value, type);
111 node = node->next;
120 node = root->first_child;
121 while (node) {
122 if (strcmp(node->name, APM_DEVICE_ADDRESS) == 0) {
123 deviceDesc->mAddress = String8((char *)node->value);
124 } else if (strcmp(node->name, CHANNELS_TAG) == 0) {
128 inputChannelMasksFromString(node->value),
133 outputChannelMasksFromString(node->value),
136 } else if (strcmp(node->name, GAINS_TAG) == 0) {
137 loadDeviceDescriptorGains(node, deviceDesc);
139 node = node->next;
153 cnode *node = root->first_child;
162 while (node) {
163 if (strcmp(node->name, FORMATS_TAG) == 0 &&
164 strcmp(node->value, DYNAMIC_VALUE_TAG) != 0) {
165 formats = formatsFromString(node->value);
166 } else if (strcmp(node->name, SAMPLING_RATES_TAG) == 0 &&
167 strcmp(node->value, DYNAMIC_VALUE_TAG) != 0) {
168 collectionFromString<SampleRateTraits>(node->value, sampleRates);
169 } else if (strcmp(node->name, CHANNELS_TAG) == 0 &&
170 strcmp(node->value, DYNAMIC_VALUE_TAG) != 0) {
172 channels = inputChannelMasksFromString(node->value);
174 channels = outputChannelMasksFromString(node->value);
176 } else if (strcmp(node->name, DEVICES_TAG) == 0) {
178 loadDevicesFromTag(node->value, devices, module->getDeclaredDevices());
180 } else if (strcmp(node->name, FLAGS_TAG) == 0) {
182 profile->setFlags(InputFlagConverter::maskFromString(node->value));
184 profile->setFlags(OutputFlagConverter::maskFromString(node->value));
186 } else if (strcmp(node->name, GAINS_TAG) == 0) {
187 loadAudioPortGains(node, *profile);
189 node = node->next;
225 cnode *node = config_find(root, DEVICES_TAG);
226 if (node != NULL) {
227 node = node->first_child;
229 while (node) {
230 ALOGV("loadHwModule() loading device %s", node->name);
231 status_t tmpStatus = loadHwModuleDevice(node, devices);
235 node = node->next;
239 node = config_find(root, OUTPUTS_TAG);
240 if (node != NULL) {
241 node = node->first_child;
242 while (node) {
243 ALOGV("loadHwModule() loading output %s", node->name);
244 status_t tmpStatus = loadHwModuleProfile(node, module, AUDIO_PORT_ROLE_SOURCE);
248 node = node->next;
251 node = config_find(root, INPUTS_TAG);
252 if (node != NULL) {
253 node = node->first_child;
254 while (node) {
255 ALOGV("loadHwModule() loading input %s", node->name);
256 status_t tmpStatus = loadHwModuleProfile(node, module, AUDIO_PORT_ROLE_SINK);
260 node = node->next;
271 cnode *node = config_find(root, AUDIO_HW_MODULE_TAG);
272 if (node == NULL) {
276 node = node->first_child;
277 while (node) {
278 ALOGV("loadHwModules() loading module %s", node->name);
279 sp<HwModule> module = new HwModule(node->name);
280 if (loadHwModule(node, module, config) == NO_ERROR) {
283 node = node->next;
323 cnode *node = config_find(root, GLOBAL_CONFIG_TAG);
325 if (node == NULL) {
333 node = node->first_child;
334 while (node) {
335 if (strcmp(ATTACHED_OUTPUT_DEVICES_TAG, node->name) == 0) {
337 loadDevicesFromTag(node->value, availableOutputDevices, declaredDevices);
341 } else if (strcmp(DEFAULT_OUTPUT_DEVICE_TAG, node->name) == 0) {
343 deviceFromString(node->value, device);
351 } else if (strcmp(ATTACHED_INPUT_DEVICES_TAG, node->name) == 0) {
353 loadDevicesFromTag(node->value, availableInputDevices, declaredDevices);
356 } else if (strcmp(AUDIO_HAL_VERSION_TAG, node->name) == 0) {
358 sscanf((char *)node->value, "%u.%u", &major, &minor);
362 node = node->next;
370 cnode *node = config_find(root, GLOBAL_CONFIG_TAG);
372 if (node == NULL) {
375 node = node->first_child;
376 while (node) {
377 if (strcmp(SPEAKER_DRC_ENABLED_TAG, node->name) == 0) {
379 if (utilities::convertTo<std::string, bool>(node->value, speakerDrcEnabled)) {
384 node = node->next;