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

Commit 459fc746 authored by Vlad Popa's avatar Vlad Popa
Browse files

Add property to describe port id updates

This will be used by the upper layers to be able to track events that
will occur for a specific port id.

Test: make
Bug: 235521198
Change-Id: If7c7fa707f9829e7b6c0fc16c4fe41bd66f8dbf4
parent 2e97f618
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ typedef enum {
    PLAYER_STATE_PAUSED   = 3,
    PLAYER_STATE_STOPPED  = 4,
    PLAYER_UPDATE_DEVICE_ID = 5,
    PLAYER_UPDATE_PORT_ID = 6,
} player_state_t;

// must be kept in sync with definitions in AudioManager.java
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#ifndef ANDROID_IAUDIOMANAGER_H
#define ANDROID_IAUDIOMANAGER_H

#include <audiomanager/AudioManager.h>
#include <utils/Errors.h>
#include <binder/IInterface.h>
#include <hardware/power.h>
@@ -52,7 +53,7 @@ public:
    /*oneway*/ virtual status_t playerAttributes(audio_unique_id_t piid, audio_usage_t usage,
                audio_content_type_t content)= 0;
    /*oneway*/ virtual status_t playerEvent(audio_unique_id_t piid, player_state_t event,
                audio_port_handle_t deviceId) = 0;
                audio_port_handle_t eventId) = 0;
    /*oneway*/ virtual status_t releasePlayer(audio_unique_id_t piid) = 0;
    virtual audio_unique_id_t trackRecorder(const sp<IBinder>& recorder) = 0;
    /*oneway*/ virtual status_t recorderEvent(audio_unique_id_t riid, recorder_state_t event) = 0;
+2 −2
Original line number Diff line number Diff line
@@ -87,12 +87,12 @@ public:
    }

    virtual status_t playerEvent(audio_unique_id_t piid, player_state_t event,
            audio_port_handle_t deviceId) {
            audio_port_handle_t eventId) {
        Parcel data, reply;
        data.writeInterfaceToken(IAudioManager::getInterfaceDescriptor());
        data.writeInt32((int32_t) piid);
        data.writeInt32((int32_t) event);
        data.writeInt32((int32_t) deviceId);
        data.writeInt32((int32_t) eventId);
        return remote()->transact(PLAYER_EVENT, data, &reply, IBinder::FLAG_ONEWAY);
    }