Home | History | Annotate | Download | only in audio

Lines Matching full:profile

459            IOProfile *profile = mHwModules[i]->mOutputProfiles[j];
460 if (profile->isCompatibleProfile(device, samplingRate, format,
463 if (mAvailableOutputDevices & profile->mSupportedDevices) {
518 IOProfile *profile = getProfileForDirectOutput(device,
523 if (profile != NULL) {
527 AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor(profile);
536 output = mpClientInterface->openOutput(profile->mModule->mHandle,
816 IOProfile *profile = getInputProfile(device,
820 if (profile == NULL) {
821 ALOGW("getInput() could not find profile for device %04x, samplingRate %d, format %d,"
827 if (profile->mModule->mHandle == 0) {
828 ALOGE("getInput(): HW module %s not opened", profile->mModule->mName);
832 AudioInputDescriptor *inputDesc = new AudioInputDescriptor(profile);
840 input = mpClientInterface->openInput(profile->mModule->mHandle,
1545 ALOGV("checkOutputsForDevice(): adding profile %d from module %d", j, i);
1559 IOProfile *profile = profiles[profile_index];
1561 // nothing to do if one output is already opened for this profile
1565 if (!desc->isDuplicated() && desc->mProfile == profile) {
1574 desc = new AudioOutputDescriptor(profile);
1576 audio_io_handle_t output = mpClientInterface->openOutput(profile->mModule->mHandle,
1587 if (profile->mSamplingRates[0] == 0) {
1594 loadSamplingRates(value, profile);
1597 if (profile->mFormats[0] == 0) {
1604 loadFormats(value, profile);
1607 if (profile->mChannelMasks[0] == 0) {
1614 loadOutChannels(value + 1, profile);
1617 if (((profile->mSamplingRates[0] == 0) &&
1618 (profile->mSamplingRates.size() < 2)) ||
1619 ((profile->mFormats[0] == 0) &&
1620 (profile->mFormats.size() < 2)) ||
1621 ((profile->mFormats[0] == 0) &&
1622 (profile->mChannelMasks.size() < 2))) {
1692 IOProfile *profile = mHwModules[i]->mOutputProfiles[j];
1693 if ((profile->mSupportedDevices & device) &&
1694 (profile->mFlags & AUDIO_OUTPUT_FLAG_DIRECT)) {
1695 ALOGV("checkOutputsForDevice(): clearing direct output profile %d on module %d",
1697 if (profile->mSamplingRates[0] == 0) {
1698 profile->mSamplingRates.clear();
1699 profile->mSamplingRates.add(0);
1701 if (profile->mFormats[0] == 0) {
1702 profile->mFormats.clear();
1703 profile->mFormats.add((audio_format_t)0);
1705 if (profile->mChannelMasks[0] == 0) {
1706 profile->mChannelMasks.clear();
1707 profile->mChannelMasks.add((audio_channel_mask_t)0);
2337 // Choose an input profile based on the requested capture parameters: select the first available
2338 // profile supporting all requested parameters.
2347 IOProfile *profile = mHwModules[i]->mInputProfiles[j];
2348 if (profile->isCompatibleProfile(device, samplingRate, format,
2350 return profile;
2875 const IOProfile *profile)
2879 mOutput1(0), mOutput2(0), mProfile(profile)
2888 if (profile != NULL) {
2889 mSamplingRate = profile->mSamplingRates[0];
2890 mFormat = profile->mFormats[0];
2891 mChannelMask = profile->mChannelMasks[0];
2892 mFlags = profile->mFlags;
3002 AudioPolicyManagerBase::AudioInputDescriptor::AudioInputDescriptor(const IOProfile *profile)
3005 mInputSource(0), mProfile(profile)
3147 // checks if the IO profile is compatible with specified parameters. By convention a value of 0
3344 void AudioPolicyManagerBase::loadSamplingRates(char *name, IOProfile *profile)
3351 profile->mSamplingRates.add(0);
3359 profile->mSamplingRates.add(rate);
3366 void AudioPolicyManagerBase::loadFormats(char *name, IOProfile *profile)
3373 profile->mFormats.add((audio_format_t)0);
3382 profile->mFormats.add(format);
3389 void AudioPolicyManagerBase::loadInChannels(char *name, IOProfile *profile)
3396 profile->mChannelMasks.add((audio_channel_mask_t)0);
3407 profile->mChannelMasks.add(channelMask);
3414 void AudioPolicyManagerBase::loadOutChannels(char *name, IOProfile *profile)
3423 profile->mChannelMasks.add((audio_channel_mask_t)0);
3433 profile->mChannelMasks.add(channelMask);
3444 IOProfile *profile = new IOProfile(module);
3448 loadSamplingRates((char *)node->value, profile);
3450 loadFormats((char *)node->value, profile);
3452 loadInChannels((char *)node->value, profile);
3454 profile->mSupportedDevices = parseDeviceNames((char *)node->value);
3458 ALOGW_IF(profile->mSupportedDevices == (audio_devices_t)0,
3460 ALOGW_IF(profile->mChannelMasks.size() == 0,
3462 ALOGW_IF(profile->mSamplingRates.size() == 0,
3464 ALOGW_IF(profile->mFormats.size() == 0,
3466 if ((profile->mSupportedDevices != (audio_devices_t)0) &&
3467 (profile->mChannelMasks.size() != 0) &&
3468 (profile->mSamplingRates.size() != 0) &&
3469 (profile->mFormats.size() != 0)) {
3471 ALOGV("loadInput() adding input mSupportedDevices %04x", profile->mSupportedDevices);
3473 module->mInputProfiles.add(profile);
3476 delete profile;
3485 IOProfile *profile = new IOProfile(module);
3489 loadSamplingRates((char *)node->value, profile);
3491 loadFormats((char *)node->value, profile);
3493 loadOutChannels((char *)node->value, profile);
3495 profile->mSupportedDevices = parseDeviceNames((char *)node->value);
3497 profile->mFlags = parseFlagNames((char *)node->value);
3501 ALOGW_IF(profile->mSupportedDevices == (audio_devices_t)0,
3503 ALOGW_IF(profile->mChannelMasks.size() == 0,
3505 ALOGW_IF(profile->mSamplingRates.size() == 0,
3507 ALOGW_IF(profile->mFormats.size() == 0,
3509 if ((profile->mSupportedDevices != (audio_devices_t)0) &&
3510 (profile->mChannelMasks.size() != 0) &&
3511 (profile->mSamplingRates.size() != 0) &&
3512 (profile->mFormats.size() != 0)) {
3515 profile->mSupportedDevices, profile->mFlags);
3517 module->mOutputProfiles.add(profile);
3520 delete profile;
3636 IOProfile *profile;
3644 profile = new IOProfile(module);
3645 profile->mSamplingRates.add(44100);
3646 profile->mFormats.add(AUDIO_FORMAT_PCM_16_BIT);
3647 profile->mChannelMasks.add(AUDIO_CHANNEL_OUT_STEREO);
3648 profile->mSupportedDevices = AUDIO_DEVICE_OUT_SPEAKER;
3649 profile->mFlags = AUDIO_OUTPUT_FLAG_PRIMARY;
3650 module->mOutputProfiles.add(profile);
3652 profile = new IOProfile(module);
3653 profile->mSamplingRates.add(8000);
3654 profile->mFormats.add(AUDIO_FORMAT_PCM_16_BIT);
3655 profile->mChannelMasks.add(AUDIO_CHANNEL_IN_MONO);
3656 profile->mSupportedDevices = AUDIO_DEVICE_IN_BUILTIN_MIC;
3657 module->mInputProfiles.add(profile);