replace common qcom sources with samsung ones
This commit is contained in:
33
qcom/opensource/pal/ipc/aidl/Android.bp
Normal file
33
qcom/opensource/pal/ipc/aidl/Android.bp
Normal file
@@ -0,0 +1,33 @@
|
||||
aidl_interface {
|
||||
name: "vendor.qti.hardware.pal",
|
||||
srcs: ["vendor/qti/hardware/pal/*.aidl"],
|
||||
vendor: true,
|
||||
stability: "vintf",
|
||||
imports: [
|
||||
"android.hardware.common-V2",
|
||||
"android.hardware.common.fmq-V1",
|
||||
],
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: false,
|
||||
},
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
ndk: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
owner: "qti",
|
||||
frozen: true,
|
||||
versions_with_info: [
|
||||
{
|
||||
version: "1",
|
||||
imports: [
|
||||
"android.hardware.common-V2",
|
||||
"android.hardware.common.fmq-V1",
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
}
|
1
qcom/opensource/pal/ipc/aidl/Android.mk
Normal file
1
qcom/opensource/pal/ipc/aidl/Android.mk
Normal file
@@ -0,0 +1 @@
|
||||
include $(call all-subdir-makefiles)
|
@@ -0,0 +1 @@
|
||||
efa1395e3de0d2b7d4af32f4d8d0943bb061804e
|
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
interface IPAL {
|
||||
void ipc_pal_add_remove_effect(in long handle, in vendor.qti.hardware.pal.PalAudioEffect effect, in boolean enable);
|
||||
byte[] ipc_pal_gef_rw_param(in int paramId, in byte[] paramPayload, in vendor.qti.hardware.pal.PalDeviceId devId, in vendor.qti.hardware.pal.PalStreamType streamType, in byte dir);
|
||||
boolean ipc_pal_get_mic_mute();
|
||||
byte[] ipc_pal_get_param(in int paramId);
|
||||
vendor.qti.hardware.pal.PalSessionTime ipc_pal_get_timestamp(in long handle);
|
||||
void ipc_pal_register_global_callback(in vendor.qti.hardware.pal.IPALCallback cb, in long cookie);
|
||||
void ipc_pal_set_mic_mute(in boolean state);
|
||||
void ipc_pal_set_param(in int paramId, in byte[] payload);
|
||||
void ipc_pal_stream_close(in long handle);
|
||||
vendor.qti.hardware.pal.PalMmapBuffer ipc_pal_stream_create_mmap_buffer(in long handle, in int minSizeFrames);
|
||||
void ipc_pal_stream_drain(in long handle, in vendor.qti.hardware.pal.PalDrainType type);
|
||||
void ipc_pal_stream_flush(in long handle);
|
||||
int ipc_pal_stream_get_buffer_size(in long handle, in int inBufSize, in int outBufSize);
|
||||
vendor.qti.hardware.pal.PalDevice[] ipc_pal_stream_get_device(in long handle);
|
||||
vendor.qti.hardware.pal.PalMmapPosition ipc_pal_stream_get_mmap_position(in long handle);
|
||||
boolean ipc_pal_stream_get_mute(in long handle);
|
||||
vendor.qti.hardware.pal.PalParamPayload ipc_pal_stream_get_param(in long handle, in int paramId);
|
||||
byte[] ipc_pal_stream_get_tags_with_module_info(in long handle, in int size);
|
||||
vendor.qti.hardware.pal.PalVolumeData ipc_pal_stream_get_volume(in long handle);
|
||||
long ipc_pal_stream_open(in vendor.qti.hardware.pal.PalStreamAttributes attributes, in vendor.qti.hardware.pal.PalDevice[] devices, in vendor.qti.hardware.pal.ModifierKV[] modifiers, in vendor.qti.hardware.pal.IPALCallback cb, in long clientData);
|
||||
void ipc_pal_stream_pause(in long handle);
|
||||
vendor.qti.hardware.pal.PalReadReturnData ipc_pal_stream_read(in long handle, in vendor.qti.hardware.pal.PalBuffer[] buffer);
|
||||
void ipc_pal_stream_resume(in long handle);
|
||||
vendor.qti.hardware.pal.PalBufferConfig[] ipc_pal_stream_set_buffer_size(in long handle, in vendor.qti.hardware.pal.PalBufferConfig rxConfig, in vendor.qti.hardware.pal.PalBufferConfig txConfig);
|
||||
void ipc_pal_stream_set_device(in long handle, in vendor.qti.hardware.pal.PalDevice[] devices);
|
||||
void ipc_pal_stream_set_mute(in long handle, in boolean state);
|
||||
void ipc_pal_stream_set_param(in long handle, in int param_id, in vendor.qti.hardware.pal.PalParamPayloadShmem payload);
|
||||
void ipc_pal_stream_set_volume(in long handle, in vendor.qti.hardware.pal.PalVolumeData vol);
|
||||
void ipc_pal_stream_start(in long handle);
|
||||
void ipc_pal_stream_stop(in long handle);
|
||||
void ipc_pal_stream_suspend(in long handle);
|
||||
int ipc_pal_stream_write(in long handle, in vendor.qti.hardware.pal.PalBuffer[] buffer);
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
interface IPALCallback {
|
||||
void eventCallback(in long handle, in int eventId, in int eventDataSize, in byte[] eventData, in long cookie);
|
||||
oneway void eventCallbackRWDone(in long handle, in int eventId, in int eventDataSize, in vendor.qti.hardware.pal.PalCallbackBuffer[] rwDonePayload, in long cookie);
|
||||
vendor.qti.hardware.pal.PalCallbackReturnData prepareMQForTransfer(in long handle, in long cookie);
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable ModifierKV {
|
||||
int key;
|
||||
int value;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalAudioEffect {
|
||||
PAL_AUDIO_EFFECT_NONE = 0x0,
|
||||
PAL_AUDIO_EFFECT_EC = 0x1,
|
||||
PAL_AUDIO_EFFECT_NS = 0x2,
|
||||
PAL_AUDIO_EFFECT_ECNS = 0x3,
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalAudioFmt {
|
||||
PAL_AUDIO_FMT_DEFAULT_PCM = 0x1,
|
||||
PAL_AUDIO_FMT_PCM_S16_LE = PAL_AUDIO_FMT_DEFAULT_PCM /* 1 */,
|
||||
PAL_AUDIO_FMT_DEFAULT_COMPRESSED = 0x2,
|
||||
PAL_AUDIO_FMT_MP3 = PAL_AUDIO_FMT_DEFAULT_COMPRESSED /* 2 */,
|
||||
PAL_AUDIO_FMT_AAC = 0x3,
|
||||
PAL_AUDIO_FMT_AAC_ADTS = 0x4,
|
||||
PAL_AUDIO_FMT_AAC_ADIF = 0x5,
|
||||
PAL_AUDIO_FMT_AAC_LATM = 0x6,
|
||||
PAL_AUDIO_FMT_WMA_STD = 0x7,
|
||||
PAL_AUDIO_FMT_ALAC = 0x8,
|
||||
PAL_AUDIO_FMT_APE = 0x9,
|
||||
PAL_AUDIO_FMT_WMA_PRO = 0xA,
|
||||
PAL_AUDIO_FMT_FLAC = 0xB,
|
||||
PAL_AUDIO_FMT_FLAC_OGG = 0xC,
|
||||
PAL_AUDIO_FMT_VORBIS = 0xD,
|
||||
PAL_AUDIO_FMT_AMR_NB = 0xE,
|
||||
PAL_AUDIO_FMT_AMR_WB = 0xF,
|
||||
PAL_AUDIO_FMT_AMR_WB_PLUS = 0x10,
|
||||
PAL_AUDIO_FMT_EVRC = 0x11,
|
||||
PAL_AUDIO_FMT_G711 = 0x12,
|
||||
PAL_AUDIO_FMT_QCELP = 0x13,
|
||||
PAL_AUDIO_FMT_PCM_S8 = 0x14,
|
||||
PAL_AUDIO_FMT_PCM_S24_3LE = 0x15,
|
||||
PAL_AUDIO_FMT_PCM_S24_LE = 0x16,
|
||||
PAL_AUDIO_FMT_PCM_S32_LE = 0x17,
|
||||
PAL_AUDIO_FMT_OPUS = 0x18,
|
||||
PAL_AUDIO_FMT_COMPRESSED_RANGE_BEGIN = 0xF0000000,
|
||||
PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_BEGIN = 0xF0000F00,
|
||||
PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_END = 0xF0000FFF,
|
||||
PAL_AUDIO_FMT_COMPRESSED_RANGE_END = PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_END /* -268431361 */,
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalBuffer {
|
||||
byte[] buffer;
|
||||
int size;
|
||||
int offset;
|
||||
vendor.qti.hardware.pal.TimeSpec timeStamp;
|
||||
int flags;
|
||||
vendor.qti.hardware.pal.PalExternAllocBuffInfo allocInfo;
|
||||
long frameIndex;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalBufferConfig {
|
||||
int bufCount;
|
||||
int bufSize;
|
||||
int maxMetadataSize;
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalCallbackBuffer {
|
||||
byte[] buffer;
|
||||
int size;
|
||||
vendor.qti.hardware.pal.TimeSpec timeStamp;
|
||||
int status;
|
||||
vendor.qti.hardware.pal.PalCallbackBufferInfo cbBufInfo;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalCallbackBufferInfo {
|
||||
long frameIndex;
|
||||
int sampleRate;
|
||||
int bitwidth;
|
||||
char channelCount;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalCallbackReturnData {
|
||||
vendor.qti.hardware.pal.PalReadWriteDoneResult ret;
|
||||
android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> mqDataDesc;
|
||||
android.hardware.common.fmq.MQDescriptor<vendor.qti.hardware.pal.PalReadWriteDoneCommand,android.hardware.common.fmq.SynchronizedReadWrite> mqCommandDesc;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalChannelInfo {
|
||||
char channels;
|
||||
byte[64] chMap;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalChannelVolKv {
|
||||
int chMask;
|
||||
float vol;
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalDevice {
|
||||
vendor.qti.hardware.pal.PalDeviceId id;
|
||||
vendor.qti.hardware.pal.PalMediaConfig config;
|
||||
vendor.qti.hardware.pal.PalUsbDeviceAddress address;
|
||||
String sndDevName;
|
||||
vendor.qti.hardware.pal.PalDeviceCustomConfig customConfig;
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalDeviceCustomConfig {
|
||||
String customKey;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalDeviceId {
|
||||
PAL_DEVICE_NONE = 1,
|
||||
PAL_DEVICE_OUT_EARPIECE,
|
||||
PAL_DEVICE_MAX,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalDrainType {
|
||||
PAL_DRAIN,
|
||||
PAL_DRAIN_PARTIAL,
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalEventReadWriteDonePayload {
|
||||
int tag;
|
||||
int status;
|
||||
int mdStatus;
|
||||
vendor.qti.hardware.pal.PalBuffer buff;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalExternAllocBuffInfo {
|
||||
android.hardware.common.NativeHandle allocHandle;
|
||||
int allocSize;
|
||||
int offset;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalMediaConfig {
|
||||
int sampleRate;
|
||||
int bitwidth;
|
||||
vendor.qti.hardware.pal.PalChannelInfo chInfo;
|
||||
vendor.qti.hardware.pal.PalAudioFmt audioFormatId;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalMessageQueueFlagBits {
|
||||
NOT_EMPTY = (1 << 0) /* 1 */,
|
||||
NOT_FULL = (1 << 1) /* 2 */,
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalMetadataFlags {
|
||||
PAL_META_DATA_FLAGS_NONE = 0,
|
||||
PAL_META_DATA_VALID_TS,
|
||||
PAL_META_DATA_FLAGS_MAX,
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalMmapBuffer {
|
||||
long buffer;
|
||||
int fd;
|
||||
int bufferSizeFrames;
|
||||
int burstSizeFrames;
|
||||
vendor.qti.hardware.pal.PalMmapBufferFlags flags;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalMmapBufferFlags {
|
||||
PAL_MMMAP_BUFF_FLAGS_NONE = 0,
|
||||
PAL_MMMAP_BUFF_FLAGS_APP_SHAREABLE = 1,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalMmapPosition {
|
||||
long timeNanoseconds;
|
||||
int positionFrames;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalParamChargerState {
|
||||
boolean online;
|
||||
boolean concurrentBoostEnable;
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalParamId {
|
||||
PAL_PARAM_ID_LOAD_SOUND_MODEL = 0,
|
||||
PAL_PARAM_ID_RECOGNITION_CONFIG = 1,
|
||||
PAL_PARAM_ID_ECNS_ON_OFF = 2,
|
||||
PAL_PARAM_ID_DIRECTION_OF_ARRIVAL = 3,
|
||||
PAL_PARAM_ID_UIEFFECT = 4,
|
||||
PAL_PARAM_ID_STOP_BUFFERING = 5,
|
||||
PAL_PARAM_ID_CODEC_CONFIGURATION = 6,
|
||||
PAL_PARAM_ID_DEVICE_CONNECTION = 7,
|
||||
PAL_PARAM_ID_SCREEN_STATE = 8,
|
||||
PAL_PARAM_ID_CHARGING_STATE = 9,
|
||||
PAL_PARAM_ID_DEVICE_ROTATION = 10,
|
||||
PAL_PARAM_ID_BT_SCO = 11,
|
||||
PAL_PARAM_ID_BT_SCO_WB = 12,
|
||||
PAL_PARAM_ID_BT_SCO_SWB = 13,
|
||||
PAL_PARAM_ID_BT_A2DP_RECONFIG = 14,
|
||||
PAL_PARAM_ID_BT_A2DP_RECONFIG_SUPPORTED = 15,
|
||||
PAL_PARAM_ID_BT_A2DP_SUSPENDED = 16,
|
||||
PAL_PARAM_ID_BT_A2DP_TWS_CONFIG = 17,
|
||||
PAL_PARAM_ID_BT_A2DP_ENCODER_LATENCY = 18,
|
||||
PAL_PARAM_ID_DEVICE_CAPABILITY = 19,
|
||||
PAL_PARAM_ID_GET_SOUND_TRIGGER_PROPERTIES = 20,
|
||||
PAL_PARAM_ID_TTY_MODE = 21,
|
||||
PAL_PARAM_ID_VOLUME_BOOST = 22,
|
||||
PAL_PARAM_ID_SLOW_TALK = 23,
|
||||
PAL_PARAM_ID_SPEAKER_RAS = 24,
|
||||
PAL_PARAM_ID_SP_MODE = 25,
|
||||
PAL_PARAM_ID_GAIN_LVL_MAP = 26,
|
||||
PAL_PARAM_ID_GAIN_LVL_CAL = 27,
|
||||
PAL_PARAM_ID_GAPLESS_MDATA = 28,
|
||||
PAL_PARAM_ID_HD_VOICE = 29,
|
||||
PAL_PARAM_ID_WAKEUP_ENGINE_CONFIG = 30,
|
||||
PAL_PARAM_ID_WAKEUP_BUFFERING_CONFIG = 31,
|
||||
PAL_PARAM_ID_WAKEUP_ENGINE_RESET = 32,
|
||||
PAL_PARAM_ID_WAKEUP_MODULE_VERSION = 33,
|
||||
PAL_PARAM_ID_WAKEUP_CUSTOM_CONFIG = 34,
|
||||
PAL_PARAM_ID_UNLOAD_SOUND_MODEL = 35,
|
||||
PAL_PARAM_ID_MODULE_CONFIG = 36,
|
||||
PAL_PARAM_ID_BT_A2DP_LC3_CONFIG = 37,
|
||||
PAL_PARAM_ID_PROXY_CHANNEL_CONFIG = 38,
|
||||
PAL_PARAM_ID_CONTEXT_LIST = 39,
|
||||
PAL_PARAM_ID_HAPTICS_INTENSITY = 40,
|
||||
PAL_PARAM_ID_HAPTICS_VOLUME = 41,
|
||||
PAL_PARAM_ID_BT_A2DP_DECODER_LATENCY = 42,
|
||||
PAL_PARAM_ID_CUSTOM_CONFIGURATION = 43,
|
||||
PAL_PARAM_ID_KW_TRANSFER_LATENCY = 44,
|
||||
PAL_PARAM_ID_BT_A2DP_FORCE_SWITCH = 45,
|
||||
PAL_PARAM_ID_BT_SCO_LC3 = 46,
|
||||
PAL_PARAM_ID_DEVICE_MUTE = 47,
|
||||
PAL_PARAM_ID_UPD_REGISTER_FOR_EVENTS = 48,
|
||||
PAL_PARAM_ID_SP_GET_CAL = 49,
|
||||
PAL_PARAM_ID_BT_A2DP_CAPTURE_SUSPENDED = 50,
|
||||
PAL_PARAM_ID_SNDCARD_STATE = 51,
|
||||
PAL_PARAM_ID_HIFI_PCM_FILTER = 52,
|
||||
PAL_PARAM_ID_CHARGER_STATE = 53,
|
||||
PAL_PARAM_ID_BT_SCO_NREC = 54,
|
||||
PAL_PARAM_ID_VOLUME_USING_SET_PARAM = 55,
|
||||
PAL_PARAM_ID_UHQA_FLAG = 56,
|
||||
PAL_PARAM_ID_STREAM_ATTRIBUTES = 57,
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalParamPayload {
|
||||
byte[] payload;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalParamPayloadShmem {
|
||||
long payloadSize;
|
||||
ParcelFileDescriptor fd;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalReadReturnData {
|
||||
int ret;
|
||||
vendor.qti.hardware.pal.PalBuffer[] buffer;
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalReadWriteDoneCommand {
|
||||
WRITE_READY,
|
||||
DRAIN_READY,
|
||||
PARTIAL_DRAIN_READY,
|
||||
READ_DONE,
|
||||
ERROR,
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalReadWriteDoneResult {
|
||||
OK,
|
||||
NOT_INITIALIZED,
|
||||
INVALID_ARGUMENTS,
|
||||
INVALID_STATE,
|
||||
NOT_SUPPORTED,
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalSessionTime {
|
||||
vendor.qti.hardware.pal.PalTimeus sessionTime;
|
||||
vendor.qti.hardware.pal.PalTimeus absoluteTime;
|
||||
vendor.qti.hardware.pal.PalTimeus timestamp;
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalStreamAttributes {
|
||||
vendor.qti.hardware.pal.PalStreamType type;
|
||||
vendor.qti.hardware.pal.PalStreamInfo info;
|
||||
vendor.qti.hardware.pal.PalStreamFlag flags;
|
||||
vendor.qti.hardware.pal.PalStreamDirection direction;
|
||||
vendor.qti.hardware.pal.PalMediaConfig inMediaConfig;
|
||||
vendor.qti.hardware.pal.PalMediaConfig outMediaConfig;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalStreamDirection {
|
||||
PAL_AUDIO_OUTPUT = 0x1,
|
||||
PAL_AUDIO_INPUT = 0x2,
|
||||
PAL_AUDIO_INPUT_OUTPUT = 0x3,
|
||||
PAL_AUDIO_INVALID = 0x4,
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalStreamFlag {
|
||||
PAL_STREAM_FLAG_TIMESTAMP = 0x1,
|
||||
PAL_STREAM_FLAG_NON_BLOCKING = 0x2,
|
||||
PAL_STREAM_FLAG_MMAP = 0x4,
|
||||
PAL_STREAM_FLAG_MMAP_NO_IRQ = 0x8,
|
||||
PAL_STREAM_FLAG_EXTERN_MEM = 0x10,
|
||||
PAL_STREAM_FLAG_SRCM_INBAND = 0x20,
|
||||
PAL_STREAM_FLAG_INVALID,
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalStreamInfo {
|
||||
long version;
|
||||
long size;
|
||||
long durationUs;
|
||||
boolean hasVideo;
|
||||
int txProxyType;
|
||||
int rxProxyType;
|
||||
boolean isStreaming;
|
||||
int loopbackType;
|
||||
int hapticsType;
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalStreamType {
|
||||
PAL_STREAM_LOW_LATENCY = 1,
|
||||
PAL_STREAM_DEEP_BUFFER = 2,
|
||||
PAL_STREAM_COMPRESSED = 3,
|
||||
PAL_STREAM_VOIP = 4,
|
||||
PAL_STREAM_VOIP_RX = 5,
|
||||
PAL_STREAM_VOIP_TX = 6,
|
||||
PAL_STREAM_VOICE_CALL_MUSIC = 7,
|
||||
PAL_STREAM_GENERIC = 8,
|
||||
PAL_STREAM_RAW = 9,
|
||||
PAL_STREAM_VOICE_RECOGNITION = 10,
|
||||
PAL_STREAM_VOICE_CALL_RECORD = 11,
|
||||
PAL_STREAM_VOICE_CALL_TX = 12,
|
||||
PAL_STREAM_VOICE_CALL_RX_TX = 13,
|
||||
PAL_STREAM_VOICE_CALL = 14,
|
||||
PAL_STREAM_LOOPBACK = 15,
|
||||
PAL_STREAM_TRANSCODE = 16,
|
||||
PAL_STREAM_VOICE_UI = 17,
|
||||
PAL_STREAM_PCM_OFFLOAD = 18,
|
||||
PAL_STREAM_ULTRA_LOW_LATENCY = 19,
|
||||
PAL_STREAM_PROXY = 20,
|
||||
PAL_STREAM_NON_TUNNEL = 21,
|
||||
PAL_STREAM_HAPTICS = 22,
|
||||
PAL_STREAM_ACD = 23,
|
||||
PAL_STREAM_CONTEXT_PROXY = 24,
|
||||
PAL_STREAM_SENSOR_PCM_DATA = 25,
|
||||
PAL_STREAM_ULTRASOUND = 26,
|
||||
PAL_STREAM_SPATIAL_AUDIO = 27,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalTimeus {
|
||||
int valLsw;
|
||||
int valMsw;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalUsbDeviceAddress {
|
||||
int cardId;
|
||||
int deviceNum;
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalVolumeData {
|
||||
vendor.qti.hardware.pal.PalChannelVolKv[] volPair;
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum Status {
|
||||
UNKNOWN = (-1) /* -1 */,
|
||||
SUCCESS = 0,
|
||||
IO_ERROR,
|
||||
BUSY,
|
||||
NO_SPACE,
|
||||
INVALID_FD,
|
||||
ADVERTISE_ERROR,
|
||||
PROTOCOL_NOT_AVAILABLE,
|
||||
NOT_SUPPORTED,
|
||||
DOWN_WITH_SSR,
|
||||
NOW_INPROGRESS,
|
||||
ALREADY_INPROGRESS,
|
||||
CANCELLED,
|
||||
NOT_RECOVERABLE,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable TimeSpec {
|
||||
long tvSec;
|
||||
long tvNSec;
|
||||
}
|
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
interface IPAL {
|
||||
void ipc_pal_add_remove_effect(in long handle, in vendor.qti.hardware.pal.PalAudioEffect effect, in boolean enable);
|
||||
byte[] ipc_pal_gef_rw_param(in int paramId, in byte[] paramPayload, in vendor.qti.hardware.pal.PalDeviceId devId, in vendor.qti.hardware.pal.PalStreamType streamType, in byte dir);
|
||||
boolean ipc_pal_get_mic_mute();
|
||||
byte[] ipc_pal_get_param(in int paramId);
|
||||
vendor.qti.hardware.pal.PalSessionTime ipc_pal_get_timestamp(in long handle);
|
||||
void ipc_pal_register_global_callback(in vendor.qti.hardware.pal.IPALCallback cb, in long cookie);
|
||||
void ipc_pal_set_mic_mute(in boolean state);
|
||||
void ipc_pal_set_param(in int paramId, in byte[] payload);
|
||||
void ipc_pal_stream_close(in long handle);
|
||||
vendor.qti.hardware.pal.PalMmapBuffer ipc_pal_stream_create_mmap_buffer(in long handle, in int minSizeFrames);
|
||||
void ipc_pal_stream_drain(in long handle, in vendor.qti.hardware.pal.PalDrainType type);
|
||||
void ipc_pal_stream_flush(in long handle);
|
||||
int ipc_pal_stream_get_buffer_size(in long handle, in int inBufSize, in int outBufSize);
|
||||
vendor.qti.hardware.pal.PalDevice[] ipc_pal_stream_get_device(in long handle);
|
||||
vendor.qti.hardware.pal.PalMmapPosition ipc_pal_stream_get_mmap_position(in long handle);
|
||||
boolean ipc_pal_stream_get_mute(in long handle);
|
||||
vendor.qti.hardware.pal.PalParamPayload ipc_pal_stream_get_param(in long handle, in int paramId);
|
||||
byte[] ipc_pal_stream_get_tags_with_module_info(in long handle, in int size);
|
||||
vendor.qti.hardware.pal.PalVolumeData ipc_pal_stream_get_volume(in long handle);
|
||||
long ipc_pal_stream_open(in vendor.qti.hardware.pal.PalStreamAttributes attributes, in vendor.qti.hardware.pal.PalDevice[] devices, in vendor.qti.hardware.pal.ModifierKV[] modifiers, in vendor.qti.hardware.pal.IPALCallback cb, in long clientData);
|
||||
void ipc_pal_stream_pause(in long handle);
|
||||
vendor.qti.hardware.pal.PalReadReturnData ipc_pal_stream_read(in long handle, in vendor.qti.hardware.pal.PalBuffer[] buffer);
|
||||
void ipc_pal_stream_resume(in long handle);
|
||||
vendor.qti.hardware.pal.PalBufferConfig[] ipc_pal_stream_set_buffer_size(in long handle, in vendor.qti.hardware.pal.PalBufferConfig rxConfig, in vendor.qti.hardware.pal.PalBufferConfig txConfig);
|
||||
void ipc_pal_stream_set_device(in long handle, in vendor.qti.hardware.pal.PalDevice[] devices);
|
||||
void ipc_pal_stream_set_mute(in long handle, in boolean state);
|
||||
void ipc_pal_stream_set_param(in long handle, in int param_id, in vendor.qti.hardware.pal.PalParamPayloadShmem payload);
|
||||
void ipc_pal_stream_set_volume(in long handle, in vendor.qti.hardware.pal.PalVolumeData vol);
|
||||
void ipc_pal_stream_start(in long handle);
|
||||
void ipc_pal_stream_stop(in long handle);
|
||||
void ipc_pal_stream_suspend(in long handle);
|
||||
int ipc_pal_stream_write(in long handle, in vendor.qti.hardware.pal.PalBuffer[] buffer);
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
interface IPALCallback {
|
||||
void eventCallback(in long handle, in int eventId, in int eventDataSize, in byte[] eventData, in long cookie);
|
||||
oneway void eventCallbackRWDone(in long handle, in int eventId, in int eventDataSize, in vendor.qti.hardware.pal.PalCallbackBuffer[] rwDonePayload, in long cookie);
|
||||
vendor.qti.hardware.pal.PalCallbackReturnData prepareMQForTransfer(in long handle, in long cookie);
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable ModifierKV {
|
||||
int key;
|
||||
int value;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalAudioEffect {
|
||||
PAL_AUDIO_EFFECT_NONE = 0x0,
|
||||
PAL_AUDIO_EFFECT_EC = 0x1,
|
||||
PAL_AUDIO_EFFECT_NS = 0x2,
|
||||
PAL_AUDIO_EFFECT_ECNS = 0x3,
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalAudioFmt {
|
||||
PAL_AUDIO_FMT_DEFAULT_PCM = 0x1,
|
||||
PAL_AUDIO_FMT_PCM_S16_LE = PAL_AUDIO_FMT_DEFAULT_PCM /* 1 */,
|
||||
PAL_AUDIO_FMT_DEFAULT_COMPRESSED = 0x2,
|
||||
PAL_AUDIO_FMT_MP3 = PAL_AUDIO_FMT_DEFAULT_COMPRESSED /* 2 */,
|
||||
PAL_AUDIO_FMT_AAC = 0x3,
|
||||
PAL_AUDIO_FMT_AAC_ADTS = 0x4,
|
||||
PAL_AUDIO_FMT_AAC_ADIF = 0x5,
|
||||
PAL_AUDIO_FMT_AAC_LATM = 0x6,
|
||||
PAL_AUDIO_FMT_WMA_STD = 0x7,
|
||||
PAL_AUDIO_FMT_ALAC = 0x8,
|
||||
PAL_AUDIO_FMT_APE = 0x9,
|
||||
PAL_AUDIO_FMT_WMA_PRO = 0xA,
|
||||
PAL_AUDIO_FMT_FLAC = 0xB,
|
||||
PAL_AUDIO_FMT_FLAC_OGG = 0xC,
|
||||
PAL_AUDIO_FMT_VORBIS = 0xD,
|
||||
PAL_AUDIO_FMT_AMR_NB = 0xE,
|
||||
PAL_AUDIO_FMT_AMR_WB = 0xF,
|
||||
PAL_AUDIO_FMT_AMR_WB_PLUS = 0x10,
|
||||
PAL_AUDIO_FMT_EVRC = 0x11,
|
||||
PAL_AUDIO_FMT_G711 = 0x12,
|
||||
PAL_AUDIO_FMT_QCELP = 0x13,
|
||||
PAL_AUDIO_FMT_PCM_S8 = 0x14,
|
||||
PAL_AUDIO_FMT_PCM_S24_3LE = 0x15,
|
||||
PAL_AUDIO_FMT_PCM_S24_LE = 0x16,
|
||||
PAL_AUDIO_FMT_PCM_S32_LE = 0x17,
|
||||
PAL_AUDIO_FMT_OPUS = 0x18,
|
||||
PAL_AUDIO_FMT_COMPRESSED_RANGE_BEGIN = 0xF0000000,
|
||||
PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_BEGIN = 0xF0000F00,
|
||||
PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_END = 0xF0000FFF,
|
||||
PAL_AUDIO_FMT_COMPRESSED_RANGE_END = PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_END /* -268431361 */,
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalBuffer {
|
||||
byte[] buffer;
|
||||
int size;
|
||||
int offset;
|
||||
vendor.qti.hardware.pal.TimeSpec timeStamp;
|
||||
int flags;
|
||||
vendor.qti.hardware.pal.PalExternAllocBuffInfo allocInfo;
|
||||
long frameIndex;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalBufferConfig {
|
||||
int bufCount;
|
||||
int bufSize;
|
||||
int maxMetadataSize;
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalCallbackBuffer {
|
||||
byte[] buffer;
|
||||
int size;
|
||||
vendor.qti.hardware.pal.TimeSpec timeStamp;
|
||||
int status;
|
||||
vendor.qti.hardware.pal.PalCallbackBufferInfo cbBufInfo;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalCallbackBufferInfo {
|
||||
long frameIndex;
|
||||
int sampleRate;
|
||||
int bitwidth;
|
||||
char channelCount;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalCallbackReturnData {
|
||||
vendor.qti.hardware.pal.PalReadWriteDoneResult ret;
|
||||
android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> mqDataDesc;
|
||||
android.hardware.common.fmq.MQDescriptor<vendor.qti.hardware.pal.PalReadWriteDoneCommand,android.hardware.common.fmq.SynchronizedReadWrite> mqCommandDesc;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalChannelInfo {
|
||||
char channels;
|
||||
byte[64] chMap;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalChannelVolKv {
|
||||
int chMask;
|
||||
float vol;
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalDevice {
|
||||
vendor.qti.hardware.pal.PalDeviceId id;
|
||||
vendor.qti.hardware.pal.PalMediaConfig config;
|
||||
vendor.qti.hardware.pal.PalUsbDeviceAddress address;
|
||||
String sndDevName;
|
||||
vendor.qti.hardware.pal.PalDeviceCustomConfig customConfig;
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalDeviceCustomConfig {
|
||||
String customKey;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalDeviceId {
|
||||
PAL_DEVICE_NONE = 1,
|
||||
PAL_DEVICE_OUT_EARPIECE,
|
||||
PAL_DEVICE_MAX,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalDrainType {
|
||||
PAL_DRAIN,
|
||||
PAL_DRAIN_PARTIAL,
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalEventReadWriteDonePayload {
|
||||
int tag;
|
||||
int status;
|
||||
int mdStatus;
|
||||
vendor.qti.hardware.pal.PalBuffer buff;
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalExternAllocBuffInfo {
|
||||
android.hardware.common.NativeHandle allocHandle;
|
||||
int allocSize;
|
||||
int offset;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalMediaConfig {
|
||||
int sampleRate;
|
||||
int bitwidth;
|
||||
vendor.qti.hardware.pal.PalChannelInfo chInfo;
|
||||
vendor.qti.hardware.pal.PalAudioFmt audioFormatId;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalMessageQueueFlagBits {
|
||||
NOT_EMPTY = (1 << 0) /* 1 */,
|
||||
NOT_FULL = (1 << 1) /* 2 */,
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalMetadataFlags {
|
||||
PAL_META_DATA_FLAGS_NONE = 0,
|
||||
PAL_META_DATA_VALID_TS,
|
||||
PAL_META_DATA_FLAGS_MAX,
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalMmapBuffer {
|
||||
long buffer;
|
||||
int fd;
|
||||
int bufferSizeFrames;
|
||||
int burstSizeFrames;
|
||||
vendor.qti.hardware.pal.PalMmapBufferFlags flags;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalMmapBufferFlags {
|
||||
PAL_MMMAP_BUFF_FLAGS_NONE = 0,
|
||||
PAL_MMMAP_BUFF_FLAGS_APP_SHAREABLE = 1,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalMmapPosition {
|
||||
long timeNanoseconds;
|
||||
int positionFrames;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalParamChargerState {
|
||||
boolean online;
|
||||
boolean concurrentBoostEnable;
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalParamId {
|
||||
PAL_PARAM_ID_LOAD_SOUND_MODEL = 0,
|
||||
PAL_PARAM_ID_RECOGNITION_CONFIG = 1,
|
||||
PAL_PARAM_ID_ECNS_ON_OFF = 2,
|
||||
PAL_PARAM_ID_DIRECTION_OF_ARRIVAL = 3,
|
||||
PAL_PARAM_ID_UIEFFECT = 4,
|
||||
PAL_PARAM_ID_STOP_BUFFERING = 5,
|
||||
PAL_PARAM_ID_CODEC_CONFIGURATION = 6,
|
||||
PAL_PARAM_ID_DEVICE_CONNECTION = 7,
|
||||
PAL_PARAM_ID_SCREEN_STATE = 8,
|
||||
PAL_PARAM_ID_CHARGING_STATE = 9,
|
||||
PAL_PARAM_ID_DEVICE_ROTATION = 10,
|
||||
PAL_PARAM_ID_BT_SCO = 11,
|
||||
PAL_PARAM_ID_BT_SCO_WB = 12,
|
||||
PAL_PARAM_ID_BT_SCO_SWB = 13,
|
||||
PAL_PARAM_ID_BT_A2DP_RECONFIG = 14,
|
||||
PAL_PARAM_ID_BT_A2DP_RECONFIG_SUPPORTED = 15,
|
||||
PAL_PARAM_ID_BT_A2DP_SUSPENDED = 16,
|
||||
PAL_PARAM_ID_BT_A2DP_TWS_CONFIG = 17,
|
||||
PAL_PARAM_ID_BT_A2DP_ENCODER_LATENCY = 18,
|
||||
PAL_PARAM_ID_DEVICE_CAPABILITY = 19,
|
||||
PAL_PARAM_ID_GET_SOUND_TRIGGER_PROPERTIES = 20,
|
||||
PAL_PARAM_ID_TTY_MODE = 21,
|
||||
PAL_PARAM_ID_VOLUME_BOOST = 22,
|
||||
PAL_PARAM_ID_SLOW_TALK = 23,
|
||||
PAL_PARAM_ID_SPEAKER_RAS = 24,
|
||||
PAL_PARAM_ID_SP_MODE = 25,
|
||||
PAL_PARAM_ID_GAIN_LVL_MAP = 26,
|
||||
PAL_PARAM_ID_GAIN_LVL_CAL = 27,
|
||||
PAL_PARAM_ID_GAPLESS_MDATA = 28,
|
||||
PAL_PARAM_ID_HD_VOICE = 29,
|
||||
PAL_PARAM_ID_WAKEUP_ENGINE_CONFIG = 30,
|
||||
PAL_PARAM_ID_WAKEUP_BUFFERING_CONFIG = 31,
|
||||
PAL_PARAM_ID_WAKEUP_ENGINE_RESET = 32,
|
||||
PAL_PARAM_ID_WAKEUP_MODULE_VERSION = 33,
|
||||
PAL_PARAM_ID_WAKEUP_CUSTOM_CONFIG = 34,
|
||||
PAL_PARAM_ID_UNLOAD_SOUND_MODEL = 35,
|
||||
PAL_PARAM_ID_MODULE_CONFIG = 36,
|
||||
PAL_PARAM_ID_BT_A2DP_LC3_CONFIG = 37,
|
||||
PAL_PARAM_ID_PROXY_CHANNEL_CONFIG = 38,
|
||||
PAL_PARAM_ID_CONTEXT_LIST = 39,
|
||||
PAL_PARAM_ID_HAPTICS_INTENSITY = 40,
|
||||
PAL_PARAM_ID_HAPTICS_VOLUME = 41,
|
||||
PAL_PARAM_ID_BT_A2DP_DECODER_LATENCY = 42,
|
||||
PAL_PARAM_ID_CUSTOM_CONFIGURATION = 43,
|
||||
PAL_PARAM_ID_KW_TRANSFER_LATENCY = 44,
|
||||
PAL_PARAM_ID_BT_A2DP_FORCE_SWITCH = 45,
|
||||
PAL_PARAM_ID_BT_SCO_LC3 = 46,
|
||||
PAL_PARAM_ID_DEVICE_MUTE = 47,
|
||||
PAL_PARAM_ID_UPD_REGISTER_FOR_EVENTS = 48,
|
||||
PAL_PARAM_ID_SP_GET_CAL = 49,
|
||||
PAL_PARAM_ID_BT_A2DP_CAPTURE_SUSPENDED = 50,
|
||||
PAL_PARAM_ID_SNDCARD_STATE = 51,
|
||||
PAL_PARAM_ID_HIFI_PCM_FILTER = 52,
|
||||
PAL_PARAM_ID_CHARGER_STATE = 53,
|
||||
PAL_PARAM_ID_BT_SCO_NREC = 54,
|
||||
PAL_PARAM_ID_VOLUME_USING_SET_PARAM = 55,
|
||||
PAL_PARAM_ID_UHQA_FLAG = 56,
|
||||
PAL_PARAM_ID_STREAM_ATTRIBUTES = 57,
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalParamPayload {
|
||||
byte[] payload;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalParamPayloadShmem {
|
||||
long payloadSize;
|
||||
ParcelFileDescriptor fd;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalReadReturnData {
|
||||
int ret;
|
||||
vendor.qti.hardware.pal.PalBuffer[] buffer;
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalReadWriteDoneCommand {
|
||||
WRITE_READY,
|
||||
DRAIN_READY,
|
||||
PARTIAL_DRAIN_READY,
|
||||
READ_DONE,
|
||||
ERROR,
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalReadWriteDoneResult {
|
||||
OK,
|
||||
NOT_INITIALIZED,
|
||||
INVALID_ARGUMENTS,
|
||||
INVALID_STATE,
|
||||
NOT_SUPPORTED,
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalSessionTime {
|
||||
vendor.qti.hardware.pal.PalTimeus sessionTime;
|
||||
vendor.qti.hardware.pal.PalTimeus absoluteTime;
|
||||
vendor.qti.hardware.pal.PalTimeus timestamp;
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalStreamAttributes {
|
||||
vendor.qti.hardware.pal.PalStreamType type;
|
||||
vendor.qti.hardware.pal.PalStreamInfo info;
|
||||
vendor.qti.hardware.pal.PalStreamFlag flags;
|
||||
vendor.qti.hardware.pal.PalStreamDirection direction;
|
||||
vendor.qti.hardware.pal.PalMediaConfig inMediaConfig;
|
||||
vendor.qti.hardware.pal.PalMediaConfig outMediaConfig;
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalStreamDirection {
|
||||
PAL_AUDIO_OUTPUT = 0x1,
|
||||
PAL_AUDIO_INPUT = 0x2,
|
||||
PAL_AUDIO_INPUT_OUTPUT = 0x3,
|
||||
PAL_AUDIO_INVALID = 0x4,
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalStreamFlag {
|
||||
PAL_STREAM_FLAG_TIMESTAMP = 0x1,
|
||||
PAL_STREAM_FLAG_NON_BLOCKING = 0x2,
|
||||
PAL_STREAM_FLAG_MMAP = 0x4,
|
||||
PAL_STREAM_FLAG_MMAP_NO_IRQ = 0x8,
|
||||
PAL_STREAM_FLAG_EXTERN_MEM = 0x10,
|
||||
PAL_STREAM_FLAG_SRCM_INBAND = 0x20,
|
||||
PAL_STREAM_FLAG_INVALID,
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalStreamInfo {
|
||||
long version;
|
||||
long size;
|
||||
long durationUs;
|
||||
boolean hasVideo;
|
||||
int txProxyType;
|
||||
int rxProxyType;
|
||||
boolean isStreaming;
|
||||
int loopbackType;
|
||||
int hapticsType;
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum PalStreamType {
|
||||
PAL_STREAM_LOW_LATENCY = 1,
|
||||
PAL_STREAM_DEEP_BUFFER = 2,
|
||||
PAL_STREAM_COMPRESSED = 3,
|
||||
PAL_STREAM_VOIP = 4,
|
||||
PAL_STREAM_VOIP_RX = 5,
|
||||
PAL_STREAM_VOIP_TX = 6,
|
||||
PAL_STREAM_VOICE_CALL_MUSIC = 7,
|
||||
PAL_STREAM_GENERIC = 8,
|
||||
PAL_STREAM_RAW = 9,
|
||||
PAL_STREAM_VOICE_RECOGNITION = 10,
|
||||
PAL_STREAM_VOICE_CALL_RECORD = 11,
|
||||
PAL_STREAM_VOICE_CALL_TX = 12,
|
||||
PAL_STREAM_VOICE_CALL_RX_TX = 13,
|
||||
PAL_STREAM_VOICE_CALL = 14,
|
||||
PAL_STREAM_LOOPBACK = 15,
|
||||
PAL_STREAM_TRANSCODE = 16,
|
||||
PAL_STREAM_VOICE_UI = 17,
|
||||
PAL_STREAM_PCM_OFFLOAD = 18,
|
||||
PAL_STREAM_ULTRA_LOW_LATENCY = 19,
|
||||
PAL_STREAM_PROXY = 20,
|
||||
PAL_STREAM_NON_TUNNEL = 21,
|
||||
PAL_STREAM_HAPTICS = 22,
|
||||
PAL_STREAM_ACD = 23,
|
||||
PAL_STREAM_CONTEXT_PROXY = 24,
|
||||
PAL_STREAM_SENSOR_PCM_DATA = 25,
|
||||
PAL_STREAM_ULTRASOUND = 26,
|
||||
PAL_STREAM_SPATIAL_AUDIO = 27,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalTimeus {
|
||||
int valLsw;
|
||||
int valMsw;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalUsbDeviceAddress {
|
||||
int cardId;
|
||||
int deviceNum;
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable PalVolumeData {
|
||||
vendor.qti.hardware.pal.PalChannelVolKv[] volPair;
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum Status {
|
||||
UNKNOWN = (-1) /* -1 */,
|
||||
SUCCESS = 0,
|
||||
IO_ERROR,
|
||||
BUSY,
|
||||
NO_SPACE,
|
||||
INVALID_FD,
|
||||
ADVERTISE_ERROR,
|
||||
PROTOCOL_NOT_AVAILABLE,
|
||||
NOT_SUPPORTED,
|
||||
DOWN_WITH_SSR,
|
||||
NOW_INPROGRESS,
|
||||
ALREADY_INPROGRESS,
|
||||
CANCELLED,
|
||||
NOT_RECOVERABLE,
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.qti.hardware.pal;
|
||||
@VintfStability
|
||||
parcelable TimeSpec {
|
||||
long tvSec;
|
||||
long tvNSec;
|
||||
}
|
39
qcom/opensource/pal/ipc/aidl/aidlconverter/Android.bp
Normal file
39
qcom/opensource/pal/ipc/aidl/aidlconverter/Android.bp
Normal file
@@ -0,0 +1,39 @@
|
||||
cc_library_static {
|
||||
|
||||
name: "libpalaidltypeconverter",
|
||||
vendor: true,
|
||||
|
||||
cflags: [
|
||||
"-v",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wthread-safety",
|
||||
],
|
||||
tidy: true,
|
||||
|
||||
// { SEC_AUDIO_COMMON
|
||||
include_dirs: ["system/media/audio/include"],
|
||||
// } SEC_AUDIO_COMMON
|
||||
|
||||
export_include_dirs: ["inc"],
|
||||
|
||||
srcs: [
|
||||
"src/PalLegacyToAidl.cpp",
|
||||
"src/PalAidlToLegacy.cpp",
|
||||
"src/SharedMemoryWrapper.cpp",
|
||||
],
|
||||
|
||||
static_libs: ["libaidlcommonsupport"],
|
||||
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
"libbinder_ndk",
|
||||
"libbase",
|
||||
"libcutils",
|
||||
"libutils",
|
||||
"vendor.qti.hardware.pal-V1-ndk",
|
||||
],
|
||||
|
||||
header_libs: ["libarpal_headers"],
|
||||
|
||||
}
|
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PalDefs.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalCallbackBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/Status.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
|
||||
using aidl::vendor::qti::hardware::pal::Status;
|
||||
using aidl::vendor::qti::hardware::pal::PalCallbackBuffer;
|
||||
|
||||
inline uint64_t convertAidlHandleToLegacy(int64_t aidlHandle) {
|
||||
return (static_cast<uint64_t>(aidlHandle));
|
||||
}
|
||||
|
||||
inline int64_t convertLegacyHandleToAidlHandle(pal_stream_handle_t* handle) {
|
||||
return (int64_t)handle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief convertStatus_tToExceptionCode converts status_t based errorcode
|
||||
* to Status (AIDL) type. This is used to preserve errors code across the
|
||||
* AIDL layers. These Status types are used to throw AStatus_fromServiceSpecificErrorWithMessage
|
||||
* @param errcode status_t error code.
|
||||
* @return Status Aidl object corresponding to legacy error code.
|
||||
*/
|
||||
static Status convertStatus_tToExceptionCode(int errcode) {
|
||||
switch (errcode) {
|
||||
case -EIO:
|
||||
return Status::IO_ERROR;
|
||||
case -EBUSY:
|
||||
return Status::BUSY;
|
||||
case -ENOSPC:
|
||||
return Status::NO_SPACE;
|
||||
case -EBADR:
|
||||
return Status::INVALID_FD;
|
||||
case -EADV:
|
||||
return Status::ADVERTISE_ERROR;
|
||||
case -ENOPROTOOPT:
|
||||
return Status::PROTOCOL_NOT_AVAILABLE;
|
||||
case -EOPNOTSUPP:
|
||||
return Status::NOT_SUPPORTED;
|
||||
case -ENETRESET:
|
||||
return Status::DOWN_WITH_SSR;
|
||||
case -EALREADY:
|
||||
return Status::NOW_INPROGRESS;
|
||||
case -EINPROGRESS:
|
||||
return Status::ALREADY_INPROGRESS;
|
||||
case -ECANCELED:
|
||||
return Status::CANCELLED;
|
||||
case -ENOTRECOVERABLE:
|
||||
return Status::NOT_RECOVERABLE;
|
||||
default:
|
||||
return Status::UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief statusTFromExceptionCode converts Status(AIDL) based errorcode
|
||||
* to legacy type. This is used to preserve errors code across the
|
||||
* AIDL layers. This unmarshells the errorcode from exception received over
|
||||
* AIDL, used along with statusTFromBinderStatus.
|
||||
* @param exceptionCode exception in Status format.
|
||||
* @return legacy error code
|
||||
*/
|
||||
static int statusTFromExceptionCode(Status exceptionCode) {
|
||||
switch (exceptionCode) {
|
||||
case Status::SUCCESS:
|
||||
return ::android::OK;
|
||||
case Status::IO_ERROR:
|
||||
return -EIO;
|
||||
case Status::BUSY:
|
||||
return -EBUSY;
|
||||
case Status::NO_SPACE:
|
||||
return -ENOSPC;
|
||||
case Status::INVALID_FD:
|
||||
return -EBADR;
|
||||
case Status::ADVERTISE_ERROR:
|
||||
return -EADV;
|
||||
case Status::PROTOCOL_NOT_AVAILABLE:
|
||||
return -ENOPROTOOPT;
|
||||
case Status::NOT_SUPPORTED:
|
||||
return -EOPNOTSUPP;
|
||||
case Status::DOWN_WITH_SSR:
|
||||
return -ENETRESET;
|
||||
case Status::NOW_INPROGRESS:
|
||||
return -EALREADY;
|
||||
case Status::ALREADY_INPROGRESS:
|
||||
return -EINPROGRESS;
|
||||
case Status::CANCELLED:
|
||||
return -ECANCELED;
|
||||
case Status::NOT_RECOVERABLE:
|
||||
return -ENOTRECOVERABLE;
|
||||
case Status::UNKNOWN:
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief status_tToBinderResult converts legacy status_t codes to ScopedAStatus.
|
||||
* The known errors are mapped from binder_status.h and directly propagated,
|
||||
* rest of errors used by PAL are converted using ServiceSpecificException.
|
||||
* @param errcode linux based error code.
|
||||
* @return returns ScopedAStatus based on error code.
|
||||
*/
|
||||
|
||||
inline ::ndk::ScopedAStatus status_tToBinderResult(int errcode) {
|
||||
Status errStatus = convertStatus_tToExceptionCode(errcode);
|
||||
if (errStatus != Status::UNKNOWN) {
|
||||
return ndk::ScopedAStatus(AStatus_fromServiceSpecificErrorWithMessage(
|
||||
static_cast<int32_t>(errStatus), toString(errStatus).c_str()));
|
||||
}
|
||||
return ndk::ScopedAStatus(AStatus_fromStatus(static_cast<int32_t>(errcode)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief statusTFromBinderStatus converts ScopedAStatus to legacy status_t codes
|
||||
* The known errors are mapped from binder_status.h and directly propagated,
|
||||
* rest of errors used by PAL are converted using ServiceSpecificException.
|
||||
* converts ScopedAStatus Exception code into error using the
|
||||
* helper method statusTFromExceptionCode
|
||||
* @param status ScopedAStatus code
|
||||
* @param caller to print caller function, helpful during debugging.
|
||||
* @return returns converted status_t code.
|
||||
*/
|
||||
static inline int statusTFromBinderStatus(const ::ndk::ScopedAStatus& status,
|
||||
const std::string& caller = "") {
|
||||
if (status.isOk()) {
|
||||
return ::android::OK;
|
||||
} else if (status.getServiceSpecificError()) {
|
||||
ALOGV("%s failed with %s", caller.c_str(), status.getDescription().c_str());
|
||||
return statusTFromExceptionCode(static_cast<Status>(status.getServiceSpecificError()));
|
||||
} else {
|
||||
ALOGV("%s failed with %s", caller.c_str(), status.getDescription().c_str());
|
||||
return status.getStatus();
|
||||
}
|
||||
}
|
||||
|
||||
static void checkAndUpdateMDStatus(pal_event_read_write_done_payload* rw_done_payload,
|
||||
PalCallbackBuffer* rwDonePayload) {
|
||||
switch (rw_done_payload->md_status) {
|
||||
case ENOTRECOVERABLE: {
|
||||
ALOGE("%s: Error, md cannot be parsed in buffer", __func__);
|
||||
rwDonePayload->status = rw_done_payload->md_status;
|
||||
break;
|
||||
}
|
||||
case EOPNOTSUPP: {
|
||||
ALOGE("%s: Error, md id not recognized in buffer", __func__);
|
||||
rwDonePayload->status = rw_done_payload->md_status;
|
||||
break;
|
||||
}
|
||||
case ENOMEM: {
|
||||
ALOGE("%s: Error, md buffer size received is small", __func__);
|
||||
rwDonePayload->status = rw_done_payload->md_status;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (rw_done_payload->md_status) {
|
||||
ALOGE("%s: Error received during callback, md status = 0x%x", __func__,
|
||||
rw_done_payload->md_status);
|
||||
rwDonePayload->status = rw_done_payload->md_status;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PalDefs.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/ModifierKV.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalBufferConfig.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalCallbackBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalDevice.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalDrainType.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalParamPayload.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalSessionTime.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalStreamAttributes.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalVolumeData.h>
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
struct AidlToLegacy {
|
||||
static void convertPalStreamAttributes(const PalStreamAttributes &aidlConfig,
|
||||
struct pal_stream_attributes *palStreamAttributes);
|
||||
|
||||
static void convertPalDevice(const std::vector<PalDevice> &aidlConfig,
|
||||
struct pal_device *palDevice);
|
||||
|
||||
static void convertPalMediaConfig(const PalMediaConfig &aidlMediaConfig,
|
||||
struct pal_media_config *palMediaConfig);
|
||||
|
||||
static void convertPalUSBDeviceAddress(const PalUsbDeviceAddress aidlAddress,
|
||||
struct pal_usb_device_address *palDeviceAddress);
|
||||
|
||||
static void convertModifierKV(const std::vector<ModifierKV> &aidlConfig,
|
||||
struct modifier_kv *modifierKV);
|
||||
|
||||
static void convertPalVolumeData(const PalVolumeData &aidlConfig,
|
||||
pal_volume_data *palVolumeData);
|
||||
|
||||
static std::pair<int, int> getFdIntFromNativeHandle(
|
||||
const aidl::android::hardware::common::NativeHandle &nativeHandle, bool doDup = true);
|
||||
|
||||
static void convertPalCallbackBuffer(const PalCallbackBuffer *rwDonePayload,
|
||||
pal_callback_buffer *cbBuffer);
|
||||
|
||||
static void convertPalSessionTime(const PalSessionTime &aildSessTime,
|
||||
struct pal_session_time *palSessTime);
|
||||
};
|
||||
}
|
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PalDefs.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/ModifierKV.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalAudioEffect.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalBufferConfig.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalDevice.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalDrainType.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalMmapBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalMmapPosition.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalParamPayload.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalSessionTime.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalStreamAttributes.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalVolumeData.h>
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
struct LegacyToAidl {
|
||||
static PalStreamAttributes convertPalStreamAttributesToAidl(
|
||||
struct pal_stream_attributes *palStreamAttributes);
|
||||
|
||||
static std::vector<PalDevice> convertPalDeviceToAidl(struct pal_device *palDevice,
|
||||
int noOfDevices);
|
||||
static PalMediaConfig convertPalMediaConfigToAidl(struct pal_media_config *palMediaConfig);
|
||||
|
||||
static PalUsbDeviceAddress convertPalUSBDeviceAddressToAidl(
|
||||
struct pal_usb_device_address *palUSBAddress);
|
||||
|
||||
static std::vector<ModifierKV> convertModifierKVToAidl(struct modifier_kv *modifierKV,
|
||||
int noOfModifiers);
|
||||
|
||||
static PalDrainType convertPalDrainTypeToAidl(pal_drain_type_t palDrainType);
|
||||
|
||||
static PalBufferConfig convertPalBufferConfigToAidl(struct pal_buffer_config *palBufferConfig);
|
||||
|
||||
static PalBuffer convertPalBufferToAidl(struct pal_buffer *palBuffer);
|
||||
|
||||
static PalParamPayload convertPalParamPayloadToAidl(pal_param_payload *palParamPayload);
|
||||
|
||||
static PalAudioEffect convertPalAudioEffectToAidl(pal_audio_effect_t effect);
|
||||
|
||||
static PalMmapBuffer convertPalMmapBufferToAidl(struct pal_mmap_buffer *palMmapBuffer);
|
||||
|
||||
static PalMmapPosition convertPalMmapPositionToAidl(struct pal_mmap_position *palMmapPosition);
|
||||
|
||||
static PalVolumeData convertPalVolDataToAidl(pal_volume_data *palVolData);
|
||||
|
||||
static PalSessionTime convertPalSessionTimeToAidl(struct pal_session_time *palSessTime);
|
||||
|
||||
static std::vector<uint8_t> convertRawPalParamPayloadToVector(void *payload, size_t size);
|
||||
};
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
/**
|
||||
* @brief Helper class to read the opaque pointer from Fd
|
||||
* Scoped based management to automatically unmap shared memory
|
||||
* when the object goes out of scope.
|
||||
*/
|
||||
class SharedMemoryWrapper {
|
||||
public:
|
||||
/** Use this instantiation when shared memory creation and mapping
|
||||
* is needed. It takes size as an argument to know how much memory
|
||||
* area needs to be mapped.
|
||||
*
|
||||
* In this instantiation, shared memory fd is created, checked
|
||||
* for validity and mapped. During destruction, close of fd is
|
||||
* needed, so it sets mCloseFd to true.
|
||||
*/
|
||||
SharedMemoryWrapper(int size);
|
||||
|
||||
/** Use this instantiation when only mapping of existing fd
|
||||
* is needed. It takes shared Fd that needs to be mapped and size to
|
||||
* know the mapping size as arguments.
|
||||
*
|
||||
* In this instantiation, shared memory fd is checked for validity
|
||||
* and mapped. During destruction, close of fd is not needed as no fd
|
||||
* is created, so it sets mCloseFd to false.
|
||||
*/
|
||||
SharedMemoryWrapper(int sharedFd, int size);
|
||||
~SharedMemoryWrapper();
|
||||
int validSharedMemory(int sharedFd, int size);
|
||||
void* mapSharedMemory(int sharedFd, int size);
|
||||
void* getData();
|
||||
int getFd();
|
||||
|
||||
private:
|
||||
int mSharedFd;
|
||||
int mSize;
|
||||
void* mSharedMemory = nullptr;
|
||||
bool mCloseFd;
|
||||
};
|
||||
}
|
70
qcom/opensource/pal/ipc/aidl/aidlconverter/inc/pal/Utils.h
Normal file
70
qcom/opensource/pal/ipc/aidl/aidlconverter/inc/pal/Utils.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BinderStatus.h"
|
||||
|
||||
/*
|
||||
* @brief Pass a unique_ptr to check if memory is allocated or not.
|
||||
*/
|
||||
#define RETURN_IF_ALLOCATION_FAILED(ptr) \
|
||||
({ \
|
||||
if (ptr.get() == NULL) { \
|
||||
ALOGE("%s could not allocate memory", __func__); \
|
||||
return status_tToBinderResult(-ENOMEM); \
|
||||
} \
|
||||
})
|
||||
|
||||
/**
|
||||
* @brief Expects a std::unique_ptr
|
||||
* checks if unique_ptr is allocated or not
|
||||
* If memory is allocated then return unique_ptr
|
||||
* otherwise exit with -ENOMEM status.
|
||||
*/
|
||||
#define VALUE_OR_RETURN(ptr) \
|
||||
({ \
|
||||
auto temp = (ptr); \
|
||||
if (temp.get() == nullptr) { \
|
||||
ALOGE("%s could not allocate memory", __func__); \
|
||||
return status_tToBinderResult(-ENOMEM); \
|
||||
} \
|
||||
std::move(temp); \
|
||||
})
|
||||
|
||||
/**
|
||||
* @brief allocator with custom deleter
|
||||
* Takes a type T and size
|
||||
* return the unique_ptr for type allocated with calloc
|
||||
* When goes out of scope will be deallocated with free
|
||||
* client needs to check if returned ptr is null or not.
|
||||
* Usage:
|
||||
* with calloc and free:
|
||||
* struct pal_param_payload *param_payload = (struct pal_param_payload*)calloc(1,
|
||||
* sizeof(struct pal_param_payload));
|
||||
* if (param_payload == NULL) {
|
||||
* ALOGE("%s: Cannot allocate memory for param_payload\n", __func__);
|
||||
* return -ENOMEM;
|
||||
* }
|
||||
* ....
|
||||
* free(param_payload);
|
||||
* Now:
|
||||
* auto param_payload = VALUE_OR_RETURN(allocate<pal_param_payload>(sizeof(pal_param_payload)));
|
||||
* allocate will allocate unique_ptr as per type pal_param_payload
|
||||
* VALUE_OR_RETRUN will return the unique_ptr if allocation is succesfull
|
||||
* otherwise it will exit.
|
||||
* custom deletor will take to deallocate memory using free when scope is cleared.
|
||||
* @param size size to be allocated for type T
|
||||
* @return unique_ptr of type T with size requested.
|
||||
*/
|
||||
|
||||
using CustomDeletor = void (*)(void *);
|
||||
template <typename T>
|
||||
std::unique_ptr<T, CustomDeletor> allocate(int size) {
|
||||
T *obj = reinterpret_cast<T *>(calloc(1, size));
|
||||
return std::unique_ptr<T, CustomDeletor>{obj, free};
|
||||
}
|
||||
|
||||
using PalDevUniquePtrType = std::unique_ptr<struct pal_device, CustomDeletor>;
|
||||
using PalModifierUniquePtrType = std::unique_ptr<struct modifier_kv, CustomDeletor>;
|
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#define LOG_TAG "PalIpc::AidlToLegacy::Converter"
|
||||
|
||||
#include <PalDefs.h>
|
||||
#include <aidlcommonsupport/NativeHandle.h>
|
||||
#include <log/log.h>
|
||||
#include <pal/PalAidlToLegacy.h>
|
||||
#include <pal/Utils.h>
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
void AidlToLegacy::convertPalMediaConfig(const PalMediaConfig &aidlMediaConfig,
|
||||
struct pal_media_config *palMediaConfig) {
|
||||
palMediaConfig->sample_rate = aidlMediaConfig.sampleRate;
|
||||
palMediaConfig->bit_width = aidlMediaConfig.bitwidth;
|
||||
palMediaConfig->aud_fmt_id = (pal_audio_fmt_t)aidlMediaConfig.audioFormatId;
|
||||
palMediaConfig->ch_info.channels = aidlMediaConfig.chInfo.channels;
|
||||
memcpy(&palMediaConfig->ch_info.ch_map, &aidlMediaConfig.chInfo.chMap, sizeof(uint8_t[64]));
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertPalUSBDeviceAddress(const PalUsbDeviceAddress aidlAddress,
|
||||
struct pal_usb_device_address *palDeviceAddress) {
|
||||
palDeviceAddress->card_id = aidlAddress.cardId;
|
||||
palDeviceAddress->device_num = aidlAddress.deviceNum;
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertPalStreamAttributes(const PalStreamAttributes &aidlConfig,
|
||||
struct pal_stream_attributes *palStreamAttributes) {
|
||||
// Stream Info
|
||||
palStreamAttributes->type = (pal_stream_type_t)aidlConfig.type;
|
||||
palStreamAttributes->info.opt_stream_info.version = aidlConfig.info.version;
|
||||
palStreamAttributes->info.opt_stream_info.size = aidlConfig.info.size;
|
||||
palStreamAttributes->info.opt_stream_info.duration_us = aidlConfig.info.durationUs;
|
||||
palStreamAttributes->info.opt_stream_info.rx_proxy_type = aidlConfig.info.rxProxyType;
|
||||
palStreamAttributes->info.opt_stream_info.tx_proxy_type = aidlConfig.info.txProxyType;
|
||||
palStreamAttributes->info.opt_stream_info.has_video = aidlConfig.info.hasVideo;
|
||||
palStreamAttributes->info.opt_stream_info.is_streaming = aidlConfig.info.isStreaming;
|
||||
palStreamAttributes->info.opt_stream_info.loopback_type = aidlConfig.info.loopbackType;
|
||||
palStreamAttributes->info.opt_stream_info.haptics_type = aidlConfig.info.hapticsType;
|
||||
palStreamAttributes->flags = (pal_stream_flags_t)aidlConfig.flags;
|
||||
palStreamAttributes->direction = (pal_stream_direction_t)aidlConfig.direction;
|
||||
|
||||
// In Media Config
|
||||
convertPalMediaConfig(aidlConfig.inMediaConfig, &(palStreamAttributes->in_media_config));
|
||||
// Out Media Config
|
||||
convertPalMediaConfig(aidlConfig.outMediaConfig, &(palStreamAttributes->out_media_config));
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertPalDevice(const std::vector<PalDevice> &aidlDevConfig,
|
||||
struct pal_device *palDevice) {
|
||||
for (unsigned long i = 0; i < aidlDevConfig.size(); i++) {
|
||||
palDevice[i].id = (pal_device_id_t)aidlDevConfig[i].id;
|
||||
// Media Config
|
||||
convertPalMediaConfig(aidlDevConfig[i].config, &(palDevice[i].config));
|
||||
// USB Device Address
|
||||
convertPalUSBDeviceAddress(aidlDevConfig[i].address, &(palDevice[i].address));
|
||||
|
||||
strlcpy(palDevice[i].sndDevName, aidlDevConfig[i].sndDevName.c_str(), DEVICE_NAME_MAX_SIZE);
|
||||
strlcpy(palDevice[i].custom_config.custom_key,
|
||||
aidlDevConfig[i].customConfig.customKey.c_str(), PAL_MAX_CUSTOM_KEY_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertModifierKV(const std::vector<ModifierKV> &aidlKv,
|
||||
struct modifier_kv *modifierKv) {
|
||||
for (unsigned long i = 0; i < aidlKv.size(); i++) {
|
||||
modifierKv[i].key = aidlKv[i].key;
|
||||
modifierKv[i].value = aidlKv[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertPalVolumeData(const PalVolumeData &aidlVolConfig,
|
||||
pal_volume_data *palVolumeData) {
|
||||
palVolumeData->no_of_volpair = aidlVolConfig.volPair.size();
|
||||
for (unsigned long i = 0; i < aidlVolConfig.volPair.size(); i++) {
|
||||
palVolumeData->volume_pair[i].channel_mask = aidlVolConfig.volPair[i].chMask;
|
||||
palVolumeData->volume_pair[i].vol = aidlVolConfig.volPair[i].vol;
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<int, int> AidlToLegacy::getFdIntFromNativeHandle(
|
||||
const aidl::android::hardware::common::NativeHandle &nativeHandle, bool doDup) {
|
||||
std::pair<int, int> fdIntPair = {-1, -1};
|
||||
if (!nativeHandle.fds.empty()) {
|
||||
if (doDup) {
|
||||
fdIntPair.first = dup(nativeHandle.fds.at(0).get());
|
||||
} else {
|
||||
fdIntPair.first = (nativeHandle.fds.at(0).get());
|
||||
}
|
||||
}
|
||||
if (!nativeHandle.ints.empty()) {
|
||||
fdIntPair.second = nativeHandle.ints.at(0);
|
||||
}
|
||||
|
||||
return std::move(fdIntPair);
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertPalCallbackBuffer(const PalCallbackBuffer *rwDonePayload,
|
||||
pal_callback_buffer *cbBuffer) {
|
||||
if (cbBuffer->size > 0 && rwDonePayload->buffer.size() == cbBuffer->size)
|
||||
memcpy(cbBuffer->buffer, rwDonePayload->buffer.data(), cbBuffer->size);
|
||||
cbBuffer->ts->tv_sec = rwDonePayload->timeStamp.tvSec;
|
||||
cbBuffer->ts->tv_nsec = rwDonePayload->timeStamp.tvNSec;
|
||||
cbBuffer->status = rwDonePayload->status;
|
||||
cbBuffer->cb_buf_info.frame_index = rwDonePayload->cbBufInfo.frameIndex;
|
||||
cbBuffer->cb_buf_info.sample_rate = rwDonePayload->cbBufInfo.sampleRate;
|
||||
cbBuffer->cb_buf_info.bit_width = rwDonePayload->cbBufInfo.bitwidth;
|
||||
cbBuffer->cb_buf_info.channel_count = rwDonePayload->cbBufInfo.channelCount;
|
||||
}
|
||||
|
||||
void AidlToLegacy::convertPalSessionTime(const PalSessionTime &aildSessTime,
|
||||
struct pal_session_time *palSessTime) {
|
||||
palSessTime->session_time.value_lsw = aildSessTime.sessionTime.valLsw;
|
||||
palSessTime->session_time.value_msw = aildSessTime.sessionTime.valMsw;
|
||||
palSessTime->absolute_time.value_lsw = aildSessTime.absoluteTime.valLsw;
|
||||
palSessTime->absolute_time.value_msw = aildSessTime.absoluteTime.valMsw;
|
||||
palSessTime->timestamp.value_lsw = aildSessTime.timestamp.valLsw;
|
||||
palSessTime->timestamp.value_msw = aildSessTime.timestamp.valMsw;
|
||||
}
|
||||
}
|
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#define LOG_TAG "PalIpc::LegacyToAidl::Converter"
|
||||
|
||||
#include <PalDefs.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/ModifierKV.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalAudioEffect.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalBufferConfig.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalDevice.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalDrainType.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalMmapBuffer.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalMmapPosition.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalParamPayload.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalStreamAttributes.h>
|
||||
#include <aidlcommonsupport/NativeHandle.h>
|
||||
#include <log/log.h>
|
||||
#include <pal/PalLegacyToAidl.h>
|
||||
#include <pal/Utils.h>
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
PalMediaConfig LegacyToAidl::convertPalMediaConfigToAidl(struct pal_media_config *palMediaConfig) {
|
||||
PalMediaConfig aidlMediaConfig;
|
||||
aidlMediaConfig.sampleRate = static_cast<int>(palMediaConfig->sample_rate);
|
||||
aidlMediaConfig.bitwidth = palMediaConfig->bit_width;
|
||||
aidlMediaConfig.chInfo.channels = palMediaConfig->ch_info.channels;
|
||||
memcpy(aidlMediaConfig.chInfo.chMap.data(), palMediaConfig->ch_info.ch_map,
|
||||
PAL_MAX_CHANNELS_SUPPORTED);
|
||||
aidlMediaConfig.audioFormatId = static_cast<PalAudioFmt>(palMediaConfig->aud_fmt_id);
|
||||
return std::move(aidlMediaConfig);
|
||||
}
|
||||
|
||||
PalUsbDeviceAddress LegacyToAidl::convertPalUSBDeviceAddressToAidl(
|
||||
struct pal_usb_device_address *palUSBAddress) {
|
||||
PalUsbDeviceAddress aidlAddress;
|
||||
aidlAddress.cardId = palUSBAddress->card_id;
|
||||
aidlAddress.deviceNum = palUSBAddress->device_num;
|
||||
return std::move(aidlAddress);
|
||||
}
|
||||
|
||||
PalStreamAttributes LegacyToAidl::convertPalStreamAttributesToAidl(
|
||||
struct pal_stream_attributes *palStreamAttr) {
|
||||
if (palStreamAttr == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
PalStreamAttributes aidlStreamAttr;
|
||||
PalStreamInfo aidlStreamInfo;
|
||||
pal_stream_info palStreamInfo;
|
||||
|
||||
aidlStreamAttr.type = static_cast<PalStreamType>(palStreamAttr->type);
|
||||
|
||||
aidlStreamAttr.type = static_cast<PalStreamType>(palStreamAttr->type);
|
||||
|
||||
ALOGD("%s: %d channels[in %d : out %d] format[in %d : out %d] flags %d", __func__, __LINE__,
|
||||
palStreamAttr->in_media_config.ch_info.channels,
|
||||
palStreamAttr->out_media_config.ch_info.channels,
|
||||
palStreamAttr->in_media_config.aud_fmt_id, palStreamAttr->out_media_config.aud_fmt_id,
|
||||
palStreamAttr->flags);
|
||||
|
||||
// AIDL Stream Info
|
||||
palStreamInfo = palStreamAttr->info.opt_stream_info;
|
||||
aidlStreamInfo.version = static_cast<long>(palStreamInfo.version);
|
||||
aidlStreamInfo.size = static_cast<long>(palStreamInfo.size);
|
||||
aidlStreamInfo.durationUs = static_cast<long>(palStreamInfo.duration_us);
|
||||
aidlStreamInfo.hasVideo = palStreamInfo.has_video;
|
||||
aidlStreamInfo.rxProxyType = palStreamInfo.rx_proxy_type;
|
||||
aidlStreamInfo.txProxyType = palStreamInfo.tx_proxy_type;
|
||||
aidlStreamInfo.isStreaming = palStreamInfo.is_streaming;
|
||||
aidlStreamInfo.loopbackType = palStreamInfo.loopback_type;
|
||||
aidlStreamInfo.hapticsType = palStreamInfo.haptics_type;
|
||||
aidlStreamAttr.info = aidlStreamInfo;
|
||||
|
||||
aidlStreamAttr.flags = static_cast<PalStreamFlag>(palStreamAttr->flags);
|
||||
|
||||
aidlStreamAttr.direction = static_cast<PalStreamDirection>(palStreamAttr->direction);
|
||||
|
||||
// InMediaConfig
|
||||
aidlStreamAttr.inMediaConfig = convertPalMediaConfigToAidl(&(palStreamAttr->in_media_config));
|
||||
|
||||
// OutMediaConfig
|
||||
aidlStreamAttr.outMediaConfig = convertPalMediaConfigToAidl(&(palStreamAttr->out_media_config));
|
||||
|
||||
ALOGV("%s config %s", __func__, aidlStreamAttr.toString().c_str());
|
||||
return std::move(aidlStreamAttr);
|
||||
}
|
||||
|
||||
std::vector<PalDevice> LegacyToAidl::convertPalDeviceToAidl(struct pal_device *palDevice,
|
||||
int noOfDevices) {
|
||||
if (palDevice == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<PalDevice> aidlPalDevice;
|
||||
aidlPalDevice.resize(noOfDevices);
|
||||
|
||||
for (auto i = 0; i < noOfDevices; i++) {
|
||||
aidlPalDevice[i].id = static_cast<PalDeviceId>(palDevice[i].id);
|
||||
|
||||
// AIDL Media Config
|
||||
aidlPalDevice[i].config = convertPalMediaConfigToAidl(&(palDevice[i].config));
|
||||
|
||||
// AIDL address
|
||||
aidlPalDevice[i].address = convertPalUSBDeviceAddressToAidl(&(palDevice[i].address));
|
||||
|
||||
aidlPalDevice[i].sndDevName.resize(DEVICE_NAME_MAX_SIZE);
|
||||
strlcpy(aidlPalDevice[i].sndDevName.data(), palDevice[i].sndDevName, DEVICE_NAME_MAX_SIZE);
|
||||
|
||||
aidlPalDevice[i].customConfig.customKey.resize(PAL_MAX_CUSTOM_KEY_SIZE);
|
||||
strlcpy(aidlPalDevice[i].customConfig.customKey.data(),
|
||||
palDevice[i].custom_config.custom_key, PAL_MAX_CUSTOM_KEY_SIZE);
|
||||
}
|
||||
|
||||
return std::move(aidlPalDevice);
|
||||
}
|
||||
|
||||
std::vector<ModifierKV> LegacyToAidl::convertModifierKVToAidl(struct modifier_kv *modifierKv,
|
||||
int noOfModifiers) {
|
||||
if (modifierKv == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<ModifierKV> aidlKvVec;
|
||||
aidlKvVec.resize(noOfModifiers);
|
||||
|
||||
for (auto i = 0; i < noOfModifiers; i++) {
|
||||
aidlKvVec[i].key = modifierKv[i].key;
|
||||
aidlKvVec[i].value = modifierKv[i].value;
|
||||
}
|
||||
|
||||
return std::move(aidlKvVec);
|
||||
}
|
||||
|
||||
PalDrainType LegacyToAidl::convertPalDrainTypeToAidl(pal_drain_type_t palDrainType) {
|
||||
if (!palDrainType) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return static_cast<PalDrainType>(palDrainType);
|
||||
}
|
||||
|
||||
PalBufferConfig LegacyToAidl::convertPalBufferConfigToAidl(
|
||||
struct pal_buffer_config *palBufferConfig) {
|
||||
PalBufferConfig aidlConfig;
|
||||
|
||||
if (palBufferConfig == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
aidlConfig.bufCount = static_cast<int>(palBufferConfig->buf_count);
|
||||
aidlConfig.bufSize = static_cast<int>(palBufferConfig->buf_size);
|
||||
aidlConfig.maxMetadataSize = static_cast<int>(palBufferConfig->max_metadata_size);
|
||||
|
||||
return std::move(aidlConfig);
|
||||
}
|
||||
|
||||
PalParamPayload LegacyToAidl::convertPalParamPayloadToAidl(pal_param_payload *palParamPayload) {
|
||||
PalParamPayload aidlPayload;
|
||||
|
||||
if (palParamPayload == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
aidlPayload.payload.resize(palParamPayload->payload_size);
|
||||
memcpy(aidlPayload.payload.data(), palParamPayload->payload, palParamPayload->payload_size);
|
||||
|
||||
return std::move(aidlPayload);
|
||||
}
|
||||
|
||||
aidl::android::hardware::common::NativeHandle fdToNativeHandle(int fd, int intToCopy = -1) {
|
||||
aidl::android::hardware::common::NativeHandle handle;
|
||||
handle.fds.emplace_back(dup(fd));
|
||||
if (intToCopy != -1) handle.ints.emplace_back(intToCopy);
|
||||
return std::move(handle);
|
||||
}
|
||||
|
||||
PalBuffer LegacyToAidl::convertPalBufferToAidl(struct pal_buffer *palBuffer) {
|
||||
PalBuffer aidlBuffer;
|
||||
TimeSpec aidlTimeSpec;
|
||||
|
||||
if (palBuffer == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
aidlBuffer.size = static_cast<int>(palBuffer->size);
|
||||
aidlBuffer.offset = static_cast<int>(palBuffer->offset);
|
||||
aidlBuffer.flags = static_cast<int>(palBuffer->flags);
|
||||
aidlBuffer.frameIndex = static_cast<long>(palBuffer->frame_index);
|
||||
|
||||
// AIDL Time Stamp
|
||||
if (palBuffer->ts) {
|
||||
aidlTimeSpec.tvSec = palBuffer->ts->tv_sec;
|
||||
aidlTimeSpec.tvNSec = palBuffer->ts->tv_nsec;
|
||||
aidlBuffer.timeStamp = aidlTimeSpec;
|
||||
}
|
||||
|
||||
if (palBuffer->size && palBuffer->buffer) {
|
||||
aidlBuffer.buffer.resize(palBuffer->size);
|
||||
memcpy(aidlBuffer.buffer.data(), palBuffer->buffer, palBuffer->size);
|
||||
}
|
||||
|
||||
aidlBuffer.allocInfo.allocHandle = fdToNativeHandle(palBuffer->alloc_info.alloc_handle,
|
||||
palBuffer->alloc_info.alloc_handle);
|
||||
aidlBuffer.allocInfo.allocSize = static_cast<int>(palBuffer->alloc_info.alloc_size);
|
||||
aidlBuffer.allocInfo.offset = palBuffer->alloc_info.offset;
|
||||
|
||||
return std::move(aidlBuffer);
|
||||
}
|
||||
|
||||
PalSessionTime LegacyToAidl::convertPalSessionTimeToAidl(struct pal_session_time *palSessTime) {
|
||||
PalSessionTime aidlSessTime;
|
||||
|
||||
if (!palSessTime) {
|
||||
return {};
|
||||
}
|
||||
aidlSessTime.sessionTime.valLsw = palSessTime->session_time.value_lsw;
|
||||
aidlSessTime.sessionTime.valMsw = palSessTime->session_time.value_msw;
|
||||
aidlSessTime.absoluteTime.valLsw = palSessTime->absolute_time.value_lsw;
|
||||
aidlSessTime.absoluteTime.valMsw = palSessTime->absolute_time.value_msw;
|
||||
aidlSessTime.timestamp.valLsw = palSessTime->timestamp.value_lsw;
|
||||
aidlSessTime.timestamp.valMsw = palSessTime->timestamp.value_msw;
|
||||
|
||||
return std::move(aidlSessTime);
|
||||
}
|
||||
|
||||
PalAudioEffect LegacyToAidl::convertPalAudioEffectToAidl(pal_audio_effect_t palAudioEffect) {
|
||||
if (!palAudioEffect) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return static_cast<PalAudioEffect>(palAudioEffect);
|
||||
}
|
||||
|
||||
PalMmapBuffer LegacyToAidl::convertPalMmapBufferToAidl(struct pal_mmap_buffer *palMmapBuffer) {
|
||||
PalMmapBuffer aidlBuffer;
|
||||
|
||||
if (palMmapBuffer == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
aidlBuffer.buffer = reinterpret_cast<long>(palMmapBuffer->buffer);
|
||||
aidlBuffer.fd = palMmapBuffer->fd;
|
||||
aidlBuffer.bufferSizeFrames = palMmapBuffer->buffer_size_frames;
|
||||
aidlBuffer.burstSizeFrames = palMmapBuffer->burst_size_frames;
|
||||
aidlBuffer.flags = static_cast<PalMmapBufferFlags>(palMmapBuffer->flags);
|
||||
|
||||
return aidlBuffer;
|
||||
}
|
||||
|
||||
PalMmapPosition LegacyToAidl::convertPalMmapPositionToAidl(
|
||||
struct pal_mmap_position *palMmapPosition) {
|
||||
PalMmapPosition aidlPosition;
|
||||
|
||||
if (palMmapPosition == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
aidlPosition.timeNanoseconds = static_cast<long>(palMmapPosition->time_nanoseconds);
|
||||
aidlPosition.positionFrames = static_cast<int>(palMmapPosition->position_frames);
|
||||
|
||||
return aidlPosition;
|
||||
}
|
||||
|
||||
PalVolumeData LegacyToAidl::convertPalVolDataToAidl(pal_volume_data *palVolData) {
|
||||
PalVolumeData aidlPalVolData;
|
||||
|
||||
if (palVolData == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
aidlPalVolData.volPair.resize(palVolData->no_of_volpair);
|
||||
memcpy(aidlPalVolData.volPair.data(), palVolData->volume_pair,
|
||||
sizeof(PalChannelVolKv) * palVolData->no_of_volpair);
|
||||
|
||||
return std::move(aidlPalVolData);
|
||||
}
|
||||
|
||||
std::vector<uint8_t> LegacyToAidl::convertRawPalParamPayloadToVector(void *payload, size_t size) {
|
||||
if (payload == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> aidlPayload(size, 0);
|
||||
memcpy(aidlPayload.data(), payload, size);
|
||||
return std::move(aidlPayload);
|
||||
}
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#define LOG_TAG "PalSharedMemoryWrapper"
|
||||
|
||||
#include <android-base/macros.h>
|
||||
#include <cutils/ashmem.h>
|
||||
#include <log/log.h>
|
||||
#include <pal/SharedMemoryWrapper.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
SharedMemoryWrapper::SharedMemoryWrapper(int size) : mSize(size) {
|
||||
int status = 0;
|
||||
int sharedFd = ashmem_create_region("pal_ipc_shmem", size);
|
||||
|
||||
status = validSharedMemory(sharedFd, size);
|
||||
if (status) {
|
||||
LOG_ALWAYS_FATAL("%s: Failed to create ashmem region of size %d", __func__, size);
|
||||
} else {
|
||||
mSharedMemory = mapSharedMemory(sharedFd, size);
|
||||
if (mSharedMemory == MAP_FAILED) {
|
||||
LOG_ALWAYS_FATAL("%s: Failed to map SharedMemory fd %d", __func__, sharedFd);
|
||||
}
|
||||
}
|
||||
mSharedFd = sharedFd;
|
||||
mCloseFd = true;
|
||||
ALOGV("%s ptr %p", __func__, mSharedMemory);
|
||||
}
|
||||
|
||||
SharedMemoryWrapper::SharedMemoryWrapper(int sharedFd, int size)
|
||||
: mSharedFd(sharedFd), mSize(size) {
|
||||
int status = 0;
|
||||
status = validSharedMemory(sharedFd, size);
|
||||
if (status) {
|
||||
LOG_ALWAYS_FATAL("%s: Failed to create ashmem region of size %d", __func__, size);
|
||||
} else {
|
||||
mSharedMemory = mapSharedMemory(sharedFd, size);
|
||||
if (mSharedMemory == MAP_FAILED) {
|
||||
LOG_ALWAYS_FATAL("%s: Failed to map SharedMemory fd %d", __func__, sharedFd);
|
||||
}
|
||||
}
|
||||
mCloseFd = false;
|
||||
ALOGV("%s ptr %p", __func__, mSharedMemory);
|
||||
}
|
||||
|
||||
void* SharedMemoryWrapper::getData() {
|
||||
ALOGV("%s ptr %p", __func__, mSharedMemory);
|
||||
return mSharedMemory;
|
||||
}
|
||||
|
||||
int SharedMemoryWrapper::getFd() {
|
||||
return mSharedFd;
|
||||
}
|
||||
|
||||
int SharedMemoryWrapper::validSharedMemory(int sharedFd, int size) {
|
||||
int status = 0;
|
||||
ALOGV("%s: SharedMemory fd %d, size %d", __func__, sharedFd, size);
|
||||
if ((sharedFd < 0) || !ashmem_valid(sharedFd) || (size != ashmem_get_size_region(sharedFd))) {
|
||||
ALOGE("%s: Invalid SharedMemory fd %d", __func__, sharedFd);
|
||||
status = -1;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
void* SharedMemoryWrapper::mapSharedMemory(int sharedFd, int size) {
|
||||
ALOGV("%s: SharedMemory fd %d, size %d", __func__, sharedFd, size);
|
||||
void* mSharedMemory = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, sharedFd, 0);
|
||||
return mSharedMemory;
|
||||
}
|
||||
|
||||
SharedMemoryWrapper::~SharedMemoryWrapper() {
|
||||
if (mSharedMemory != nullptr && munmap(mSharedMemory, mSize) < 0) {
|
||||
ALOGE("%s: unmap failed %d", __func__, mSharedFd);
|
||||
}
|
||||
if (mCloseFd) {
|
||||
ALOGI("%s Closing fd %d", __func__, mSharedFd);
|
||||
close(mSharedFd);
|
||||
}
|
||||
}
|
||||
}
|
40
qcom/opensource/pal/ipc/aidl/client/Android.bp
Normal file
40
qcom/opensource/pal/ipc/aidl/client/Android.bp
Normal file
@@ -0,0 +1,40 @@
|
||||
cc_library_shared {
|
||||
name: "libpalclient",
|
||||
owner: "qti",
|
||||
vendor: true,
|
||||
|
||||
cflags: [
|
||||
"-v",
|
||||
"-Wall",
|
||||
"-Wthread-safety",
|
||||
],
|
||||
tidy: true,
|
||||
|
||||
include_dirs: [
|
||||
"vendor/qcom/opensource/pal/inc",
|
||||
"system/media/audio/include" // SEC_AUDIO_COMMON
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"PalClientWrapper.cpp",
|
||||
"PalCallback.cpp",
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
"libcutils",
|
||||
"libutils",
|
||||
"vendor.qti.hardware.pal-V1-ndk",
|
||||
"libfmq",
|
||||
"libbinder_ndk",
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
"libaidlcommonsupport",
|
||||
"libpalaidltypeconverter",
|
||||
],
|
||||
|
||||
export_header_lib_headers: ["libarpal_headers"],
|
||||
header_libs: ["libarpal_headers"],
|
||||
|
||||
}
|
174
qcom/opensource/pal/ipc/aidl/client/PalCallback.cpp
Normal file
174
qcom/opensource/pal/ipc/aidl/client/PalCallback.cpp
Normal file
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
#include "PalCallback.h"
|
||||
#include <aidl/vendor/qti/hardware/pal/BnPALCallback.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/IPAL.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalReadWriteDoneResult.h>
|
||||
#include <log/log.h>
|
||||
#include <pal/BinderStatus.h>
|
||||
|
||||
using android::status_t;
|
||||
using android::sp;
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
void DataTransferThread::startTransfer(int eventId) {
|
||||
size_t availToRead = mDataMQ->availableToRead();
|
||||
|
||||
if (mDataMQ->read(&mBuffer[0], availToRead)) {
|
||||
ALOGV("%s: calling client callback, data size %zu", __func__, availToRead);
|
||||
|
||||
const PalCallbackBuffer *rwDonePayload = (PalCallbackBuffer *)&mBuffer[0];
|
||||
auto cbBuffer = std::make_unique<pal_callback_buffer>();
|
||||
auto bufTimeSpec = std::make_unique<timespec>();
|
||||
if (!bufTimeSpec) {
|
||||
ALOGE("%s: Failed to allocate memory for timespec", __func__);
|
||||
return;
|
||||
}
|
||||
cbBuffer.get()->ts = (timespec *)bufTimeSpec.get();
|
||||
|
||||
std::vector<uint8_t> buffData;
|
||||
cbBuffer->size = rwDonePayload->size;
|
||||
if (cbBuffer->size > 0 && rwDonePayload->buffer.size() == cbBuffer->size) {
|
||||
buffData.resize(cbBuffer->size);
|
||||
cbBuffer->buffer = buffData.data();
|
||||
}
|
||||
AidlToLegacy::convertPalCallbackBuffer(rwDonePayload, cbBuffer.get());
|
||||
mStreamCallback((pal_stream_handle_t *)mStreamHandle, eventId, (uint32_t *)cbBuffer.get(),
|
||||
(uint32_t)availToRead, mStreamCookie);
|
||||
}
|
||||
}
|
||||
|
||||
bool DataTransferThread::threadLoop() {
|
||||
while (!std::atomic_load_explicit(mStop, std::memory_order_acquire)) {
|
||||
uint32_t efState = 0;
|
||||
mEfGroup->wait(static_cast<uint32_t>(PalMessageQueueFlagBits::NOT_EMPTY), &efState);
|
||||
if (!(efState & static_cast<uint32_t>(PalMessageQueueFlagBits::NOT_EMPTY))) {
|
||||
continue; // Nothing to do.
|
||||
}
|
||||
PalReadWriteDoneCommand eventId;
|
||||
if (!mCommandMQ->read(&eventId)) {
|
||||
continue;
|
||||
}
|
||||
startTransfer((int)eventId);
|
||||
mEfGroup->wake(static_cast<uint32_t>(PalMessageQueueFlagBits::NOT_FULL));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
::ndk::ScopedAStatus PalCallback::prepareMQForTransfer(int64_t handle, int64_t cookie,
|
||||
PalCallbackReturnData *callbackData) {
|
||||
status_t status;
|
||||
// Create message queues.
|
||||
if (mDataMQ) {
|
||||
ALOGE("the client attempts to call prepareForWriting twice");
|
||||
callbackData->ret = PalReadWriteDoneResult::INVALID_STATE;
|
||||
return status_tToBinderResult(-EINVAL);
|
||||
}
|
||||
|
||||
std::unique_ptr<DataMQ> tempDataMQ(
|
||||
new DataMQ(sizeof(PalCallbackBuffer) * 2, true /* EventFlag */));
|
||||
|
||||
std::unique_ptr<CommandMQ> tempCommandMQ(new CommandMQ(1));
|
||||
if (!tempDataMQ->isValid() || !tempCommandMQ->isValid()) {
|
||||
ALOGE_IF(!tempDataMQ->isValid(), "data MQ is invalid");
|
||||
ALOGE_IF(!tempCommandMQ->isValid(), "command MQ is invalid");
|
||||
callbackData->ret = PalReadWriteDoneResult::INVALID_ARGUMENTS;
|
||||
return status_tToBinderResult(-EINVAL);
|
||||
}
|
||||
EventFlag *tempRawEfGroup{};
|
||||
status = EventFlag::createEventFlag(tempDataMQ->getEventFlagWord(), &tempRawEfGroup);
|
||||
std::unique_ptr<EventFlag, void (*)(EventFlag *)> tempElfGroup(
|
||||
tempRawEfGroup, [](auto *ef) { EventFlag::deleteEventFlag(&ef); });
|
||||
if (status != ::android::OK || !tempElfGroup) {
|
||||
ALOGE("failed creating event flag for data MQ: %s", strerror(-status));
|
||||
callbackData->ret = PalReadWriteDoneResult::INVALID_ARGUMENTS;
|
||||
return status_tToBinderResult(-EINVAL);
|
||||
}
|
||||
|
||||
// Create and launch the thread.
|
||||
auto tempDataTransferThread = sp<DataTransferThread>::make(
|
||||
&mStopDataTransferThread, handle, mCallback, tempDataMQ.get(), tempCommandMQ.get(),
|
||||
tempElfGroup.get(), cookie);
|
||||
if (!tempDataTransferThread->init()) {
|
||||
ALOGW("failed to start writer thread: %s", strerror(-status));
|
||||
callbackData->ret = PalReadWriteDoneResult::INVALID_ARGUMENTS;
|
||||
return status_tToBinderResult(-EINVAL);
|
||||
}
|
||||
status = tempDataTransferThread->run("read_write_cb", ::android::PRIORITY_URGENT_AUDIO);
|
||||
if (status != ::android::OK) {
|
||||
ALOGW("failed to start read_write_cb thread: %s", strerror(-status));
|
||||
callbackData->ret = PalReadWriteDoneResult::INVALID_ARGUMENTS;
|
||||
return status_tToBinderResult(-EINVAL);
|
||||
}
|
||||
|
||||
mDataMQ = std::move(tempDataMQ);
|
||||
mCommandMQ = std::move(tempCommandMQ);
|
||||
mDataTransferThread = tempDataTransferThread;
|
||||
mEfGroup = tempElfGroup.release();
|
||||
callbackData->ret = PalReadWriteDoneResult::OK;
|
||||
callbackData->mqDataDesc = mDataMQ->dupeDesc();
|
||||
callbackData->mqCommandDesc = mCommandMQ->dupeDesc();
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
::ndk::ScopedAStatus PalCallback::eventCallback(int64_t handle, int32_t eventId,
|
||||
int32_t eventDataSize,
|
||||
const std::vector<uint8_t> &eventData,
|
||||
int64_t cookie) {
|
||||
uint32_t *evData = NULL;
|
||||
int8_t *src = NULL;
|
||||
evData = (uint32_t *)calloc(1, eventDataSize);
|
||||
if (!evData) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
src = (int8_t *)eventData.data();
|
||||
memcpy(evData, src, eventDataSize);
|
||||
|
||||
mCallback((pal_stream_handle_t *)handle, eventId, evData, eventDataSize, cookie);
|
||||
|
||||
exit:
|
||||
if (evData) {
|
||||
free(evData);
|
||||
}
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
::ndk::ScopedAStatus PalCallback::eventCallbackRWDone(
|
||||
int64_t handle, int32_t eventId, int32_t eventDataSize,
|
||||
const std::vector<::aidl::vendor::qti::hardware::pal::PalCallbackBuffer> &aidlRWDonePayload,
|
||||
int64_t cookie) {
|
||||
const ::aidl::vendor::qti::hardware::pal::PalCallbackBuffer *rwDonePayload =
|
||||
aidlRWDonePayload.data();
|
||||
auto cbBuffer = std::make_unique<pal_callback_buffer>();
|
||||
|
||||
AidlToLegacy::convertPalCallbackBuffer(rwDonePayload, cbBuffer.get());
|
||||
mCallback((pal_stream_handle_t *)handle, eventId, (uint32_t *)cbBuffer.get(), eventDataSize,
|
||||
cookie);
|
||||
|
||||
return ::ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
void PalCallback::cleanupDataTransferThread() {
|
||||
mStopDataTransferThread.store(true, std::memory_order_release);
|
||||
if (mEfGroup) {
|
||||
mEfGroup->wake(static_cast<uint32_t>(PalMessageQueueFlagBits::NOT_EMPTY));
|
||||
}
|
||||
if (mDataTransferThread.get()) {
|
||||
status_t status = mDataTransferThread->join();
|
||||
ALOGE_IF(status, "write thread exit error: %s", strerror(-status));
|
||||
}
|
||||
if (mEfGroup) {
|
||||
status_t status = EventFlag::deleteEventFlag(&mEfGroup);
|
||||
ALOGE_IF(status, "write MQ event flag deletion error: %s", strerror(-status));
|
||||
}
|
||||
}
|
||||
|
||||
PalCallback::~PalCallback() {
|
||||
cleanupDataTransferThread();
|
||||
}
|
||||
}
|
94
qcom/opensource/pal/ipc/aidl/client/PalCallback.h
Normal file
94
qcom/opensource/pal/ipc/aidl/client/PalCallback.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PalDefs.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/BnPALCallback.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/PalMessageQueueFlagBits.h>
|
||||
#include <fmq/AidlMessageQueue.h>
|
||||
#include <fmq/EventFlag.h>
|
||||
#include <log/log.h>
|
||||
#include <pal/PalAidlToLegacy.h>
|
||||
#include <pal/PalLegacyToAidl.h>
|
||||
#include <utils/Thread.h>
|
||||
|
||||
using ::android::AidlMessageQueue;
|
||||
using ::aidl::android::hardware::common::fmq::SynchronizedReadWrite;
|
||||
using ::android::hardware::EventFlag;
|
||||
using ::android::Thread;
|
||||
using android::sp;
|
||||
|
||||
namespace aidl::vendor::qti::hardware::pal {
|
||||
|
||||
class PalCallback : public BnPALCallback {
|
||||
public:
|
||||
typedef AidlMessageQueue<int8_t, SynchronizedReadWrite> DataMQ;
|
||||
typedef AidlMessageQueue<PalReadWriteDoneCommand, SynchronizedReadWrite> CommandMQ;
|
||||
::ndk::ScopedAStatus eventCallback(int64_t handle, int32_t eventId, int32_t eventDataSize,
|
||||
const std::vector<uint8_t>& eventData,
|
||||
int64_t cookie) override;
|
||||
|
||||
::ndk::ScopedAStatus eventCallbackRWDone(
|
||||
int64_t handle, int32_t eventId, int32_t eventDataSize,
|
||||
const std::vector<::aidl::vendor::qti::hardware::pal::PalCallbackBuffer>&
|
||||
aidlRWDonePayload,
|
||||
int64_t cookie) override;
|
||||
::ndk::ScopedAStatus prepareMQForTransfer(int64_t handle, int64_t cookie,
|
||||
PalCallbackReturnData* aidlReturn) override;
|
||||
|
||||
PalCallback(pal_stream_callback callBack) {
|
||||
if (callBack) {
|
||||
mCallback = callBack;
|
||||
}
|
||||
}
|
||||
void cleanupDataTransferThread();
|
||||
virtual ~PalCallback();
|
||||
|
||||
protected:
|
||||
pal_stream_callback mCallback;
|
||||
std::unique_ptr<DataMQ> mDataMQ = nullptr;
|
||||
std::unique_ptr<CommandMQ> mCommandMQ = nullptr;
|
||||
EventFlag* mEfGroup = nullptr;
|
||||
std::atomic<bool> mStopDataTransferThread = false;
|
||||
sp<Thread> mDataTransferThread = nullptr;
|
||||
uint64_t mCookie;
|
||||
};
|
||||
|
||||
class DataTransferThread : public Thread {
|
||||
public:
|
||||
DataTransferThread(std::atomic<bool>* stop, int64_t streamHandle,
|
||||
pal_stream_callback clbkObject, PalCallback::DataMQ* dataMQ,
|
||||
PalCallback::CommandMQ* commandMQ, EventFlag* efGroup, uint64_t cookie)
|
||||
: Thread(false),
|
||||
mStop(stop),
|
||||
mStreamHandle(streamHandle),
|
||||
mStreamCallback(clbkObject),
|
||||
mDataMQ(dataMQ),
|
||||
mCommandMQ(commandMQ),
|
||||
mEfGroup(efGroup),
|
||||
mBuffer(nullptr),
|
||||
mStreamCookie(cookie) {}
|
||||
bool init() {
|
||||
mBuffer.reset(new (std::nothrow) int8_t[mDataMQ->getQuantumCount()]);
|
||||
return mBuffer != nullptr;
|
||||
}
|
||||
virtual ~DataTransferThread() {}
|
||||
|
||||
private:
|
||||
std::atomic<bool>* mStop;
|
||||
uint64_t mStreamHandle;
|
||||
pal_stream_callback mStreamCallback;
|
||||
PalCallback::DataMQ* mDataMQ;
|
||||
PalCallback::CommandMQ* mCommandMQ;
|
||||
EventFlag* mEfGroup;
|
||||
std::unique_ptr<int8_t[]> mBuffer;
|
||||
uint64_t mStreamCookie;
|
||||
|
||||
bool threadLoop() override;
|
||||
|
||||
void startTransfer(int eventId);
|
||||
};
|
||||
}
|
609
qcom/opensource/pal/ipc/aidl/client/PalClientWrapper.cpp
Normal file
609
qcom/opensource/pal/ipc/aidl/client/PalClientWrapper.cpp
Normal file
@@ -0,0 +1,609 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#define LOG_TAG "PalClientWrapper"
|
||||
#include <PalApi.h>
|
||||
#include <PalDefs.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/BnPALCallback.h>
|
||||
#include <aidl/vendor/qti/hardware/pal/IPAL.h>
|
||||
#include <aidlcommonsupport/NativeHandle.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
#include <pal/BinderStatus.h>
|
||||
#include <pal/PalAidlToLegacy.h>
|
||||
#include <pal/PalLegacyToAidl.h>
|
||||
#include <pal/SharedMemoryWrapper.h>
|
||||
#include <pal/Utils.h>
|
||||
#include "PalCallback.h"
|
||||
|
||||
using ::aidl::vendor::qti::hardware::pal::AidlToLegacy;
|
||||
using ::aidl::vendor::qti::hardware::pal::IPAL;
|
||||
using ::aidl::vendor::qti::hardware::pal::IPALCallback;
|
||||
using ::aidl::vendor::qti::hardware::pal::LegacyToAidl;
|
||||
using ::aidl::vendor::qti::hardware::pal::ModifierKV;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalBuffer;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalBufferConfig;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalCallback;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalDevice;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalDeviceId;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalMmapBuffer;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalMmapPosition;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalParamPayload;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalReadReturnData;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalSessionTime;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalStreamAttributes;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalStreamType;
|
||||
using ::aidl::vendor::qti::hardware::pal::SharedMemoryWrapper;
|
||||
using ::aidl::vendor::qti::hardware::pal::PalParamPayloadShmem;
|
||||
using ::ndk::ScopedFileDescriptor;
|
||||
|
||||
static std::shared_ptr<IPAL> gPalClient = nullptr;
|
||||
static bool gPalServiceDied = false;
|
||||
::ndk::ScopedAIBinder_DeathRecipient gDeathRecipient;
|
||||
std::mutex gLock;
|
||||
|
||||
#define RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client) \
|
||||
({ \
|
||||
if (client.get() == nullptr) { \
|
||||
ALOGE(" %s PAL service doesn't exist ", __func__); \
|
||||
return -EINVAL; \
|
||||
} \
|
||||
})
|
||||
|
||||
void serviceDied(void *cookie) {
|
||||
ALOGE("%s : PAL Service died, cookie : %llu", __func__, (unsigned long long)cookie);
|
||||
gPalServiceDied = true;
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
std::shared_ptr<IPAL> getPal() {
|
||||
std::lock_guard<std::mutex> guard(gLock);
|
||||
if (gPalClient == nullptr) {
|
||||
const std::string instance = std::string() + IPAL::descriptor + "/default";
|
||||
|
||||
// pool of threads for handling Binder transactions.
|
||||
ABinderProcess_startThreadPool();
|
||||
auto binder = ::ndk::SpAIBinder(AServiceManager_waitForService(instance.c_str()));
|
||||
ALOGV("got binder %p", binder.get());
|
||||
|
||||
auto newClient = IPAL::fromBinder(binder);
|
||||
if (newClient == nullptr) {
|
||||
ALOGE("%s: %d, Could not get PAL client from binder.", __func__, __LINE__);
|
||||
return nullptr;
|
||||
}
|
||||
gPalClient = newClient;
|
||||
|
||||
gDeathRecipient =
|
||||
::ndk::ScopedAIBinder_DeathRecipient(AIBinder_DeathRecipient_new(&serviceDied));
|
||||
auto status = ::ndk::ScopedAStatus::fromStatus(
|
||||
AIBinder_linkToDeath(binder.get(), gDeathRecipient.get(), (void *)serviceDied));
|
||||
|
||||
if (!status.isOk()) {
|
||||
ALOGE("linking service to death failed: %d: %s", status.getStatus(),
|
||||
status.getMessage());
|
||||
} else {
|
||||
ALOGI("linked to death %d: %s", status.getStatus(), status.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
ALOGV("%s gPalClient %p ", __func__, gPalClient.get());
|
||||
return gPalClient;
|
||||
}
|
||||
|
||||
int32_t pal_init() {
|
||||
gPalClient = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(gPalClient);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pal_deinit() {
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t pal_stream_open(struct pal_stream_attributes *attr, uint32_t no_of_devices,
|
||||
struct pal_device *devices, uint32_t no_of_modifiers,
|
||||
struct modifier_kv *modifiers, pal_stream_callback cb, uint64_t cookie,
|
||||
pal_stream_handle_t **stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
int32_t ret = -EINVAL;
|
||||
std::shared_ptr<IPALCallback> ClbkBinder = ::ndk::SharedRefBase::make<PalCallback>(cb);
|
||||
struct pal_stream_info info = attr->info.opt_stream_info;
|
||||
|
||||
ALOGV("%s: ver [%ld] sz [%ld] dur[%ld] has_video [%d] is_streaming [%d] lpbk_type [%d]",
|
||||
__func__, info.version, info.size, info.duration_us, info.has_video, info.is_streaming,
|
||||
info.loopback_type);
|
||||
|
||||
std::vector<PalDevice> aidlDevVec;
|
||||
std::vector<ModifierKV> aidlKvVec;
|
||||
|
||||
auto aidlPalStreamAttr = LegacyToAidl::convertPalStreamAttributesToAidl(attr);
|
||||
|
||||
if (devices) {
|
||||
aidlDevVec = LegacyToAidl::convertPalDeviceToAidl(devices, no_of_devices);
|
||||
} else {
|
||||
ALOGE("Invalid devices");
|
||||
}
|
||||
if (modifiers) {
|
||||
aidlKvVec = LegacyToAidl::convertModifierKVToAidl(modifiers, no_of_modifiers);
|
||||
} else {
|
||||
ALOGW("Invalid Modifiers");
|
||||
}
|
||||
|
||||
int64_t aidlCookie = int64_t(cookie);
|
||||
int64_t aidlReturn;
|
||||
|
||||
ret = statusTFromBinderStatus(client->ipc_pal_stream_open(
|
||||
aidlPalStreamAttr, aidlDevVec, aidlKvVec, ClbkBinder, aidlCookie, &aidlReturn));
|
||||
*stream_handle = (uint64_t *)aidlReturn;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t pal_stream_close(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_close(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_start(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_start(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_stop(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_stop(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_pause(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_pause(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_resume(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_resume(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_flush(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_flush(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_drain(pal_stream_handle_t *stream_handle, pal_drain_type_t type) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
auto aidlDrainType = LegacyToAidl::convertPalDrainTypeToAidl(type);
|
||||
return statusTFromBinderStatus(client->ipc_pal_stream_drain(
|
||||
convertLegacyHandleToAidlHandle(stream_handle), aidlDrainType));
|
||||
}
|
||||
|
||||
int32_t pal_stream_suspend(pal_stream_handle_t *stream_handle) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_suspend(convertLegacyHandleToAidlHandle(stream_handle)));
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_buffer_size(pal_stream_handle_t *stream_handle, size_t *in_buffer,
|
||||
size_t *out_buffer) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_tags_with_module_info(pal_stream_handle_t *stream_handle, size_t *size,
|
||||
uint8_t *payload) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
std::vector<uint8_t> aidlPayload;
|
||||
|
||||
auto status = client->ipc_pal_stream_get_tags_with_module_info(
|
||||
convertLegacyHandleToAidlHandle(stream_handle), *size, &aidlPayload);
|
||||
|
||||
if (payload && (*size > 0) && (*size <= aidlPayload.size())) {
|
||||
memcpy(payload, aidlPayload.data(), *size);
|
||||
} else if (payload && (*size > aidlPayload.size())) {
|
||||
memcpy(payload, aidlPayload.data(), aidlPayload.size());
|
||||
}
|
||||
*size = aidlPayload.size();
|
||||
return statusTFromBinderStatus(status);
|
||||
}
|
||||
|
||||
int32_t pal_stream_set_buffer_size(pal_stream_handle_t *stream_handle,
|
||||
pal_buffer_config_t *in_buff_cfg,
|
||||
pal_buffer_config_t *out_buff_cfg) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
if (in_buff_cfg) {
|
||||
ALOGV("%s:%d input incnt %d buf_sz %d max_metadata_size %d", __func__, __LINE__,
|
||||
in_buff_cfg->buf_count, in_buff_cfg->buf_size, in_buff_cfg->max_metadata_size);
|
||||
}
|
||||
if (out_buff_cfg) {
|
||||
ALOGV("%s:%d output incnt %d buf_sz %d max_metadata_size %d", __func__, __LINE__,
|
||||
out_buff_cfg->buf_count, out_buff_cfg->buf_size, out_buff_cfg->max_metadata_size);
|
||||
}
|
||||
|
||||
auto aidlInBufCfg = LegacyToAidl::convertPalBufferConfigToAidl(in_buff_cfg);
|
||||
auto aidlOutBufCfg = LegacyToAidl::convertPalBufferConfigToAidl(out_buff_cfg);
|
||||
|
||||
std::vector<PalBufferConfig> _aidl_return_buff_cfg;
|
||||
|
||||
auto status = client->ipc_pal_stream_set_buffer_size((int64_t)stream_handle, aidlInBufCfg,
|
||||
aidlOutBufCfg, &_aidl_return_buff_cfg);
|
||||
if (!_aidl_return_buff_cfg.empty()) {
|
||||
in_buff_cfg->buf_count = _aidl_return_buff_cfg[0].bufCount;
|
||||
in_buff_cfg->buf_size = _aidl_return_buff_cfg[0].bufSize;
|
||||
in_buff_cfg->max_metadata_size = _aidl_return_buff_cfg[0].maxMetadataSize;
|
||||
}
|
||||
if (_aidl_return_buff_cfg.size() == 2) {
|
||||
out_buff_cfg->buf_count = _aidl_return_buff_cfg[1].bufCount;
|
||||
out_buff_cfg->buf_size = _aidl_return_buff_cfg[1].bufSize;
|
||||
out_buff_cfg->max_metadata_size = _aidl_return_buff_cfg[1].maxMetadataSize;
|
||||
}
|
||||
|
||||
return statusTFromBinderStatus(status);
|
||||
}
|
||||
|
||||
ssize_t pal_stream_read(pal_stream_handle_t *stream_handle, struct pal_buffer *buf) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
int ret = -EINVAL;
|
||||
if (stream_handle == nullptr) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<PalBuffer> aidlPalBufVec;
|
||||
|
||||
auto aidlBuf = LegacyToAidl::convertPalBufferToAidl(buf);
|
||||
|
||||
ALOGV("%s:%d size %d %d", __func__, __LINE__, aidlBuf.size, buf->size);
|
||||
ALOGV("%s:%d alloc handle %d sending %d", __func__, __LINE__, buf->alloc_info.alloc_handle,
|
||||
aidlBuf.allocInfo.allocSize);
|
||||
|
||||
aidlPalBufVec.push_back(std::move(aidlBuf));
|
||||
|
||||
PalReadReturnData _aidl_return_buf;
|
||||
auto status =
|
||||
client->ipc_pal_stream_read((int64_t)stream_handle, aidlPalBufVec, &_aidl_return_buf);
|
||||
if (_aidl_return_buf.ret > 0) {
|
||||
if (_aidl_return_buf.buffer.data()->size > buf->size) {
|
||||
ALOGE("ret buf sz %d bigger than request buf sz %d",
|
||||
_aidl_return_buf.buffer.data()->size, buf->size);
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
if (buf->ts) {
|
||||
buf->ts->tv_sec = _aidl_return_buf.buffer.data()->timeStamp.tvSec;
|
||||
buf->ts->tv_nsec = _aidl_return_buf.buffer.data()->timeStamp.tvNSec;
|
||||
}
|
||||
buf->flags = _aidl_return_buf.buffer.data()->flags;
|
||||
if (buf->buffer) {
|
||||
memcpy(buf->buffer, _aidl_return_buf.buffer.data()->buffer.data(), buf->size);
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = _aidl_return_buf.ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ssize_t pal_stream_write(pal_stream_handle_t *stream_handle, struct pal_buffer *buf) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
if (stream_handle == nullptr) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ALOGV("%s:%d hndl %p", __func__, __LINE__, stream_handle);
|
||||
|
||||
int32_t aidlReturn;
|
||||
std::vector<PalBuffer> aidlPalBufVec;
|
||||
auto aidlBuf = LegacyToAidl::convertPalBufferToAidl(buf);
|
||||
|
||||
ALOGV("%s:%d size %d %d", __func__, __LINE__, aidlBuf.size, buf->size);
|
||||
ALOGV("%s:%d alloc handle %d sending %d", __func__, __LINE__, buf->alloc_info.alloc_handle,
|
||||
aidlBuf.allocInfo.allocSize);
|
||||
|
||||
aidlPalBufVec.push_back(std::move(aidlBuf));
|
||||
|
||||
auto status = client->ipc_pal_stream_write((int64_t)stream_handle, aidlPalBufVec, &aidlReturn);
|
||||
if (aidlReturn >= 0 && status.isOk()) {
|
||||
return aidlReturn;
|
||||
} else {
|
||||
return statusTFromBinderStatus(status);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_device(pal_stream_handle_t *stream_handle, uint32_t no_of_devices,
|
||||
struct pal_device *devices) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
ALOGD("%s:%d:", __func__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pal_stream_set_device(pal_stream_handle_t *stream_handle, uint32_t no_of_devices,
|
||||
struct pal_device *devices) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
if (devices == nullptr) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
auto aidlStreamHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
|
||||
ALOGD("%s:%d:total device size %d", __func__, __LINE__, no_of_devices);
|
||||
|
||||
auto aidlPalDevVec = LegacyToAidl::convertPalDeviceToAidl(devices, no_of_devices);
|
||||
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_set_device(aidlStreamHandle, aidlPalDevVec));
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_param(pal_stream_handle_t *stream_handle, uint32_t param_id,
|
||||
pal_param_payload **param_payload) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
ALOGV("%s:%d:", __func__, __LINE__);
|
||||
if (stream_handle == NULL || !(*param_payload)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
PalParamPayload _aidl_return_paramPayload;
|
||||
|
||||
auto aidlStreamHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
auto status = client->ipc_pal_stream_get_param(aidlStreamHandle, param_id,
|
||||
&_aidl_return_paramPayload);
|
||||
if (status.isOk()) {
|
||||
*param_payload = (pal_param_payload *)calloc(
|
||||
1, sizeof(pal_param_payload) + _aidl_return_paramPayload.payload.size());
|
||||
if (*param_payload == nullptr) {
|
||||
ALOGE("%s:%d Failed to allocate memory for (*param_payload)", __func__, __LINE__);
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
(*param_payload)->payload_size = _aidl_return_paramPayload.payload.size();
|
||||
memcpy((*param_payload)->payload, _aidl_return_paramPayload.payload.data(),
|
||||
(*param_payload)->payload_size);
|
||||
}
|
||||
}
|
||||
return statusTFromBinderStatus(status);
|
||||
}
|
||||
|
||||
int32_t pal_stream_set_param(pal_stream_handle_t *stream_handle, uint32_t param_id,
|
||||
pal_param_payload *param_payload) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
if (stream_handle == nullptr || param_payload == nullptr) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int status = 0;
|
||||
SharedMemoryWrapper memWrapper(param_payload->payload_size);
|
||||
int sharedFd = memWrapper.getFd();
|
||||
void *memPayload = memWrapper.getData();
|
||||
|
||||
ALOGV("%s ptr %p", __func__, memPayload);
|
||||
if (memPayload) {
|
||||
PalParamPayloadShmem payload;
|
||||
memcpy(memPayload, param_payload->payload, param_payload->payload_size);
|
||||
payload.fd = ScopedFileDescriptor(sharedFd);
|
||||
payload.payloadSize = param_payload->payload_size;
|
||||
auto aidlStreamHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
status = statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_set_param(aidlStreamHandle, param_id, payload));
|
||||
} else {
|
||||
ALOGE("%s:%d Failed to get shared memory", __func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_volume(pal_stream_handle_t *stream_handle, struct pal_volume_data *volume) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
ALOGD("%s:%d:", __func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int32_t pal_stream_set_volume(pal_stream_handle_t *stream_handle, struct pal_volume_data *volume) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
if (stream_handle == nullptr) {
|
||||
ALOGE("Invalid stream_handle!");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (volume == nullptr) {
|
||||
ALOGE("Invalid volume!");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
auto aidlStreamHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
auto aidlVolData = LegacyToAidl::convertPalVolDataToAidl(volume);
|
||||
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_set_volume(aidlStreamHandle, aidlVolData));
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_mute(pal_stream_handle_t *stream_handle, bool *state) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
ALOGD("%s:%d:", __func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int32_t pal_stream_set_mute(pal_stream_handle_t *stream, bool state) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
int64_t aidlHandle = convertLegacyHandleToAidlHandle(stream);
|
||||
|
||||
return statusTFromBinderStatus(client->ipc_pal_stream_set_mute(aidlHandle, state));
|
||||
}
|
||||
|
||||
int32_t pal_get_mic_mute(bool *state) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(client->ipc_pal_get_mic_mute(state));
|
||||
}
|
||||
|
||||
int32_t pal_set_mic_mute(bool state) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
return statusTFromBinderStatus(client->ipc_pal_set_mic_mute(state));
|
||||
}
|
||||
|
||||
int32_t pal_get_timestamp(pal_stream_handle_t *stream_handle, struct pal_session_time *stime) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
int64_t aidlHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
|
||||
PalSessionTime aidlSessionTime;
|
||||
|
||||
auto status =
|
||||
statusTFromBinderStatus(client->ipc_pal_get_timestamp(aidlHandle, &aidlSessionTime));
|
||||
|
||||
if (stime != NULL) {
|
||||
AidlToLegacy::convertPalSessionTime(aidlSessionTime, stime);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int32_t pal_add_remove_effect(pal_stream_handle_t *stream_handle, pal_audio_effect_t effect,
|
||||
bool enable) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
int64_t aidlHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
|
||||
auto aidlAudioEffect = LegacyToAidl::convertPalAudioEffectToAidl(effect);
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_add_remove_effect(aidlHandle, aidlAudioEffect, enable));
|
||||
}
|
||||
|
||||
int32_t pal_set_param(uint32_t param_id, void *param_payload, size_t payload_size) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
int32_t aidlParamId = static_cast<uint32_t>(param_id);
|
||||
|
||||
std::vector<uint8_t> aidlPayload(payload_size, 0);
|
||||
memcpy(aidlPayload.data(), param_payload, payload_size);
|
||||
|
||||
int32_t aidlPayloadSize = static_cast<int32_t>(payload_size);
|
||||
|
||||
return statusTFromBinderStatus(client->ipc_pal_set_param(aidlParamId, aidlPayload));
|
||||
}
|
||||
|
||||
int32_t pal_get_param(uint32_t param_id, void **param_payload, size_t *payload_size, void *query) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
int32_t aidlParamId = static_cast<uint32_t>(param_id);
|
||||
uint32_t size;
|
||||
std::vector<uint8_t> aidlPayload;
|
||||
|
||||
auto status = client->ipc_pal_get_param(aidlParamId, &aidlPayload);
|
||||
|
||||
size = aidlPayload.size();
|
||||
|
||||
if (status.isOk() && *param_payload == NULL) {
|
||||
*param_payload = calloc(1, size);
|
||||
if (!(*param_payload)) {
|
||||
ALOGE("Failed to allocate memory for (*param_payload) %s %d", __func__, __LINE__);
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
memcpy(*param_payload, aidlPayload.data(), size);
|
||||
*payload_size = size;
|
||||
}
|
||||
}
|
||||
return statusTFromBinderStatus(status);
|
||||
}
|
||||
|
||||
int32_t pal_stream_create_mmap_buffer(pal_stream_handle_t *stream_handle, int32_t min_size_frames,
|
||||
struct pal_mmap_buffer *info) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
int64_t aidlHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
|
||||
PalMmapBuffer aidlBuffer = LegacyToAidl::convertPalMmapBufferToAidl(info);
|
||||
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_create_mmap_buffer(aidlHandle, min_size_frames, &aidlBuffer));
|
||||
}
|
||||
|
||||
int32_t pal_stream_get_mmap_position(pal_stream_handle_t *stream_handle,
|
||||
struct pal_mmap_position *position) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
int64_t aidlHandle = convertLegacyHandleToAidlHandle(stream_handle);
|
||||
|
||||
PalMmapPosition aidlPosition = LegacyToAidl::convertPalMmapPositionToAidl(position);
|
||||
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_stream_get_mmap_position(aidlHandle, &aidlPosition));
|
||||
}
|
||||
|
||||
int32_t pal_register_global_callback(pal_global_callback cb, uint64_t cookie) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
std::shared_ptr<IPALCallback> aidlPalCallback;
|
||||
auto aidlCookie = static_cast<int64_t>(cookie);
|
||||
|
||||
return statusTFromBinderStatus(
|
||||
client->ipc_pal_register_global_callback(aidlPalCallback, aidlCookie));
|
||||
}
|
||||
|
||||
int32_t pal_gef_rw_param(uint32_t param_id, void *param_payload, size_t payload_size,
|
||||
pal_device_id_t pal_device_id, pal_stream_type_t pal_stream_type,
|
||||
unsigned int dir) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
|
||||
auto aidlParamId = static_cast<int32_t>(param_id);
|
||||
std::vector<uint8_t> aidlPayload(payload_size, 0);
|
||||
auto aidlPalDeviceId = static_cast<PalDeviceId>(pal_device_id);
|
||||
auto aidlPalStreamType = static_cast<PalStreamType>(pal_stream_type);
|
||||
auto aidlDir = static_cast<int8_t>(dir);
|
||||
std::vector<uint8_t> aidlReturn;
|
||||
|
||||
return statusTFromBinderStatus(client->ipc_pal_gef_rw_param(
|
||||
aidlParamId, aidlPayload, aidlPalDeviceId, aidlPalStreamType, aidlDir, &aidlReturn));
|
||||
}
|
||||
|
||||
int32_t pal_gef_rw_param_acdb(uint32_t param_id, void *param_payload, size_t payload_size,
|
||||
pal_device_id_t pal_device_id, pal_stream_type_t pal_stream_type,
|
||||
uint32_t sample_rate, uint32_t instance_id, uint32_t dir,
|
||||
bool is_play) {
|
||||
auto client = getPal();
|
||||
RETURN_IF_PAL_SERVICE_NOT_REGISTERED(client);
|
||||
auto aidlParamId = static_cast<int32_t>(param_id);
|
||||
std::vector<uint8_t> aidlPayload(payload_size, 0);
|
||||
auto aidlPayloadSize = static_cast<int32_t>(payload_size);
|
||||
auto aidlPalDeviceId = static_cast<PalDeviceId>(pal_device_id);
|
||||
auto aidlPalStreamType = static_cast<PalStreamType>(pal_stream_type);
|
||||
auto aidlSampleRate = static_cast<int32_t>(sample_rate);
|
||||
|
||||
return 0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user