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

Commit b9b9fa3d authored by Glenn Kasten's avatar Glenn Kasten Committed by android-build-merger
Browse files

Merge "Use audio_module_handle_t and audio_patch_handle_t consistently" into nyc-dev

am: 54b48c31

* commit '54b48c31':
  Use audio_module_handle_t and audio_patch_handle_t consistently

Change-Id: Icbe23830212ccdbf49ee6e7978642aeb3d2de6c6
parents 538a7799 54b48c31
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1355,7 +1355,7 @@ status_t BnAudioFlinger::onTransact(
            CHECK_INTERFACE(IAudioFlinger, data, reply);
            CHECK_INTERFACE(IAudioFlinger, data, reply);
            struct audio_patch patch;
            struct audio_patch patch;
            data.read(&patch, sizeof(struct audio_patch));
            data.read(&patch, sizeof(struct audio_patch));
            audio_patch_handle_t handle = {};
            audio_patch_handle_t handle = AUDIO_PATCH_HANDLE_NONE;
            if (data.read(&handle, sizeof(audio_patch_handle_t)) != NO_ERROR) {
            if (data.read(&handle, sizeof(audio_patch_handle_t)) != NO_ERROR) {
                ALOGE("b/23905951");
                ALOGE("b/23905951");
            }
            }
+5 −5
Original line number Original line Diff line number Diff line
@@ -965,7 +965,7 @@ status_t BnAudioPolicyService::onTransact(
            audio_channel_mask_t channelMask = data.readInt32();
            audio_channel_mask_t channelMask = data.readInt32();
            audio_input_flags_t flags = (audio_input_flags_t) data.readInt32();
            audio_input_flags_t flags = (audio_input_flags_t) data.readInt32();
            audio_port_handle_t selectedDeviceId = (audio_port_handle_t) data.readInt32();
            audio_port_handle_t selectedDeviceId = (audio_port_handle_t) data.readInt32();
            audio_io_handle_t input = {};
            audio_io_handle_t input = AUDIO_IO_HANDLE_NONE;
            status_t status = getInputForAttr(&attr, &input, session, uid,
            status_t status = getInputForAttr(&attr, &input, session, uid,
                                              samplingRate, format, channelMask,
                                              samplingRate, format, channelMask,
                                              flags, selectedDeviceId);
                                              flags, selectedDeviceId);
@@ -1197,7 +1197,7 @@ status_t BnAudioPolicyService::onTransact(
            CHECK_INTERFACE(IAudioPolicyService, data, reply);
            CHECK_INTERFACE(IAudioPolicyService, data, reply);
            struct audio_patch patch;
            struct audio_patch patch;
            data.read(&patch, sizeof(struct audio_patch));
            data.read(&patch, sizeof(struct audio_patch));
            audio_patch_handle_t handle = {};
            audio_patch_handle_t handle = AUDIO_PATCH_HANDLE_NONE;
            if (data.read(&handle, sizeof(audio_patch_handle_t)) != NO_ERROR) {
            if (data.read(&handle, sizeof(audio_patch_handle_t)) != NO_ERROR) {
                ALOGE("b/23912202");
                ALOGE("b/23912202");
            }
            }
@@ -1275,9 +1275,9 @@ status_t BnAudioPolicyService::onTransact(
            CHECK_INTERFACE(IAudioPolicyService, data, reply);
            CHECK_INTERFACE(IAudioPolicyService, data, reply);
            sp<IAudioPolicyServiceClient> client = interface_cast<IAudioPolicyServiceClient>(
            sp<IAudioPolicyServiceClient> client = interface_cast<IAudioPolicyServiceClient>(
                    data.readStrongBinder());
                    data.readStrongBinder());
            audio_session_t session = {};
            audio_session_t session = AUDIO_SESSION_NONE;
            audio_io_handle_t ioHandle = {};
            audio_io_handle_t ioHandle = AUDIO_IO_HANDLE_NONE;
            audio_devices_t device = {};
            audio_devices_t device = AUDIO_DEVICE_NONE;
            status_t status = acquireSoundTriggerSession(&session, &ioHandle, &device);
            status_t status = acquireSoundTriggerSession(&session, &ioHandle, &device);
            reply->writeInt32(status);
            reply->writeInt32(status);
            if (status == NO_ERROR) {
            if (status == NO_ERROR) {
+5 −5
Original line number Original line Diff line number Diff line
@@ -1544,10 +1544,10 @@ Exit:
audio_module_handle_t AudioFlinger::loadHwModule(const char *name)
audio_module_handle_t AudioFlinger::loadHwModule(const char *name)
{
{
    if (name == NULL) {
    if (name == NULL) {
        return 0;
        return AUDIO_MODULE_HANDLE_NONE;
    }
    }
    if (!settingsAllowed()) {
    if (!settingsAllowed()) {
        return 0;
        return AUDIO_MODULE_HANDLE_NONE;
    }
    }
    Mutex::Autolock _l(mLock);
    Mutex::Autolock _l(mLock);
    return loadHwModule_l(name);
    return loadHwModule_l(name);
@@ -1568,7 +1568,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name)
    int rc = load_audio_interface(name, &dev);
    int rc = load_audio_interface(name, &dev);
    if (rc) {
    if (rc) {
        ALOGE("loadHwModule() error %d loading module %s", rc, name);
        ALOGE("loadHwModule() error %d loading module %s", rc, name);
        return 0;
        return AUDIO_MODULE_HANDLE_NONE;
    }
    }


    mHardwareStatus = AUDIO_HW_INIT;
    mHardwareStatus = AUDIO_HW_INIT;
@@ -1576,7 +1576,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name)
    mHardwareStatus = AUDIO_HW_IDLE;
    mHardwareStatus = AUDIO_HW_IDLE;
    if (rc) {
    if (rc) {
        ALOGE("loadHwModule() init check error %d for module %s", rc, name);
        ALOGE("loadHwModule() init check error %d for module %s", rc, name);
        return 0;
        return AUDIO_MODULE_HANDLE_NONE;
    }
    }


    // Check and cache this HAL's level of support for master mute and master
    // Check and cache this HAL's level of support for master mute and master
@@ -1623,7 +1623,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name)
        mHardwareStatus = AUDIO_HW_IDLE;
        mHardwareStatus = AUDIO_HW_IDLE;
    }
    }


    audio_module_handle_t handle = nextUniqueId(AUDIO_UNIQUE_ID_USE_MODULE);
    audio_module_handle_t handle = (audio_module_handle_t) nextUniqueId(AUDIO_UNIQUE_ID_USE_MODULE);
    mAudioHwDevs.add(handle, new AudioHwDevice(handle, name, dev, flags));
    mAudioHwDevs.add(handle, new AudioHwDevice(handle, name, dev, flags));


    ALOGI("loadHwModule() Loaded %s audio interface from %s (%s) handle %d",
    ALOGI("loadHwModule() Loaded %s audio interface from %s (%s) handle %d",
+1 −1
Original line number Original line Diff line number Diff line
@@ -349,7 +349,7 @@ status_t AudioFlinger::PatchPanel::createAudioPatch(const struct audio_patch *pa
exit:
exit:
    ALOGV("createAudioPatch() status %d", status);
    ALOGV("createAudioPatch() status %d", status);
    if (status == NO_ERROR) {
    if (status == NO_ERROR) {
        *handle = audioflinger->nextUniqueId(AUDIO_UNIQUE_ID_USE_PATCH);
        *handle = (audio_patch_handle_t) audioflinger->nextUniqueId(AUDIO_UNIQUE_ID_USE_PATCH);
        newPatch->mHandle = *handle;
        newPatch->mHandle = *handle;
        newPatch->mHalHandle = halHandle;
        newPatch->mHalHandle = halHandle;
        mPatches.add(newPatch);
        mPatches.add(newPatch);
+1 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ public:
};
};


class AudioSourceCollection :
class AudioSourceCollection :
        public DefaultKeyedVector< audio_patch_handle_t, sp<AudioSourceDescriptor> >
        public DefaultKeyedVector< audio_io_handle_t, sp<AudioSourceDescriptor> >
{
{
public:
public:
    status_t dump(int fd) const;
    status_t dump(int fd) const;
Loading