Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd0609de authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Gerrit Code Review
Browse files

Merge "audio: Update hardwired configuration"

parents 1d23120b 26526f15
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -47,10 +47,14 @@ ndk::ScopedAStatus Config::getEngineConfig(AudioHalEngineConfig* _aidl_return) {
                LOG(WARNING) << __func__ << mAudioPolicyConverter.getError();
                LOG(WARNING) << __func__ << mAudioPolicyConverter.getError();
            }
            }
        }
        }
        // Logging full contents of the config is an overkill, just provide statistics.
        LOG(DEBUG) << "getEngineConfig: number of strategies parsed: "
                   << engConfig.productStrategies.size()
                   << ", default strategy: " << engConfig.defaultProductStrategyId
                   << ", number of volume groups parsed: " << engConfig.volumeGroups.size();
        return engConfig;
        return engConfig;
    }();
    }();
    *_aidl_return = returnEngCfg;
    *_aidl_return = returnEngCfg;
    LOG(DEBUG) << __func__ << ": returning " << _aidl_return->toString();
    return ndk::ScopedAStatus::ok();
    return ndk::ScopedAStatus::ok();
}
}
}  // namespace aidl::android::hardware::audio::core
}  // namespace aidl::android::hardware::audio::core
+6 −2
Original line number Original line Diff line number Diff line
@@ -81,6 +81,8 @@ static AudioPortExt createDeviceExt(AudioDeviceType devType, int32_t flags,
        deviceExt.device.address = "bottom";
        deviceExt.device.address = "bottom";
    } else if (devType == AudioDeviceType::IN_MICROPHONE_BACK && connection.empty()) {
    } else if (devType == AudioDeviceType::IN_MICROPHONE_BACK && connection.empty()) {
        deviceExt.device.address = "back";
        deviceExt.device.address = "back";
    } else if (devType == AudioDeviceType::IN_SUBMIX || devType == AudioDeviceType::OUT_SUBMIX) {
        deviceExt.device.address = "0";
    }
    }
    deviceExt.device.type.connection = std::move(connection);
    deviceExt.device.type.connection = std::move(connection);
    deviceExt.flags = flags;
    deviceExt.flags = flags;
@@ -365,8 +367,10 @@ std::unique_ptr<Configuration> getRSubmixConfiguration() {


        // Device ports
        // Device ports


        AudioPort rsubmixOutDevice = createPort(c.nextPortId++, "Remote Submix Out", 0, false,
        AudioPort rsubmixOutDevice =
                                                createDeviceExt(AudioDeviceType::OUT_SUBMIX, 0));
                createPort(c.nextPortId++, "Remote Submix Out", 0, false,
                           createDeviceExt(AudioDeviceType::OUT_SUBMIX, 0,
                                           AudioDeviceDescription::CONNECTION_VIRTUAL));
        rsubmixOutDevice.profiles.push_back(
        rsubmixOutDevice.profiles.push_back(
                createProfile(PcmType::INT_24_BIT, {AudioChannelLayout::LAYOUT_STEREO}, {48000}));
                createProfile(PcmType::INT_24_BIT, {AudioChannelLayout::LAYOUT_STEREO}, {48000}));
        c.ports.push_back(rsubmixOutDevice);
        c.ports.push_back(rsubmixOutDevice);