<commit_before>#       modified:   audio/AudioPolicyCompatClient.cpp
#       modified:   audio/AudioPolicyCompatClient.h
#       modified:   audio/AudioPolicyManagerBase.cpp
#       modified:   audio/audio_policy_hal.cpp
#       modified:   include/hardware_legacy/AudioPolicyInterface.h
#       modified:   include/hardware_legacy/AudioPolicyManagerBase.h
#       modified:   include/hardware_legacy/AudioSystemLegacy.h
diff --git a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp
index bb0059c..8db9d5d 100644
--- a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp
+++ b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp
@@ -74,6 +74,21 @@ audio_io_handle_t AudioPolicyCompatClient::openInput(audio_module_handle_t modul
                                                      audio_devices_t *pDevices,
                                                      uint32_t *pSamplingRate,
                                                      audio_format_t *pFormat,
+#ifdef STE_AUDIO
+                                                     audio_channel_mask_t *pChannelMask,
+                                                     audio_input_clients *pInputClientId)
+{
+    return mServiceOps->open_input_on_module(mService, module, pDevices,
+                                             pSamplingRate, pFormat, pChannelMask, pInputClientId);
+}
+
+status_t AudioPolicyCompatClient::closeInput(audio_io_handle_t input,
+                                            audio_input_clients *inputClientId)
+{
+    return mServiceOps->close_input(mService, input, inputClientId);
+}
+
+#else
                                                      audio_channel_mask_t *pChannelMask)
 {
     return mServiceOps->open_input_on_module(mService, module, pDevices,
@@ -84,6 +99,7 @@ status_t AudioPolicyCompatClient::closeInput(audio_io_handle_t input)
 {
     return mServiceOps->close_input(mService, input);
 }
+#endif
 
 status_t AudioPolicyCompatClient::setStreamOutput(AudioSystem::stream_type stream,
                                              audio_io_handle_t output)
diff --git a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h
index d468126..6647782 100644
--- a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h
+++ b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h
@@ -54,8 +54,15 @@ public:
                                         audio_devices_t *pDevices,
                                         uint32_t *pSamplingRate,
                                         audio_format_t *pFormat,
+#ifdef STE_AUDIO
+                                        audio_channel_mask_t *pChannelMask,
+                                        audio_input_clients *pInputClientId = NULL);
+    virtual status_t closeInput(audio_io_handle_t input,
+                                audio_input_clients *inputClientId = NULL);
+#else
                                         audio_channel_mask_t *pChannelMask);
     virtual status_t closeInput(audio_io_handle_t input);
+#endif
     virtual status_t setStreamOutput(AudioSystem::stream_type stream, audio_io_handle_t output);
     virtual status_t moveEffects(int session,
                                  audio_io_handle_t srcOutput,
diff --git a/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp b/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp
index 434e12f..55151de 100644
--- a/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp
+++ b/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp
@@ -871,7 +871,12 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource,
                                     uint32_t samplingRate,
                                     uint32_t format,
                                     uint32_t channelMask,
+#ifdef STE_AUDIO
+                                    AudioSystem::audio_in_acoustics acoustics,
+                                    audio_input_clients *inputClientId)
+#else
                                     AudioSystem::audio_in_acoustics acoustics)
+#endif
 {
     audio_io_handle_t input = 0;
     audio_devices_t device = getDeviceForInputSource(inputSource);
@@ -927,7 +932,12 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource,
                                     &inputDesc->mDevice,
                                     &inputDesc->mSamplingRate,
                                     &inputDesc->mFormat,
+#ifdef STE_AUDIO
+                                    &inputDesc->mChannelMask,
+                                    inputClientId);
+#else
                                     &inputDesc->mChannelMask);
+#endif
 
     // only accept input with the exact requested set of parameters
     if (input == 0 ||
diff --git a/hardware/libhardware_legacy/audio/audio_policy_hal.cpp b/hardware/libhardware_legacy/audio/audio_policy_hal.cpp
index 0e7f66a..f6c1d61 100644
--- a/hardware/libhardware_legacy/audio/audio_policy_hal.cpp
+++ b/hardware/libhardware_legacy/audio/audio_policy_hal.cpp
@@ -175,11 +175,20 @@ static audio_io_handle_t ap_get_input(struct audio_policy *pol, audio_source_t i
                                       uint32_t sampling_rate,
                                       audio_format_t format,
                                       audio_channel_mask_t channelMask,
+#ifdef STE_AUDIO
+                                      audio_in_acoustics_t acoustics,
+                                      audio_input_clients *inputClientId)
+#else
                                       audio_in_acoustics_t acoustics)
+#endif
 {
     struct legacy_audio_policy *lap = to_lap(pol);
     return lap->apm->getInput((int) inputSource, sampling_rate, (int) format, channelMask,
+#ifdef STE_AUDIO
+                              (AudioSystem::audio_in_acoustics)acoustics, inputClientId);
+#else
                               (AudioSystem::audio_in_acoustics)acoustics);
+#endif
 }
 
 static int ap_start_input(struct audio_policy *pol, audio_io_handle_t input)
diff --git a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h
index d58864b..4ec2ac6 100644
--- a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h
+++ b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h
@@ -110,7 +110,12 @@ public:
                                     uint32_t samplingRate = 0,
                                     uint32_t Format = AudioSystem::FORMAT_DEFAULT,
                                     uint32_t channels = 0,
+#ifdef STE_AUDIO
+                                    AudioSystem::audio_in_acoustics acoustics = (AudioSystem::audio_in_acoustics)0,
+                                    audio_input_clients *inputClientId = NULL) = 0;
+#else
                                     AudioSystem::audio_in_acoustics acoustics = (AudioSystem::audio_in_acoustics)0) = 0;
+#endif
     // indicates to the audio policy manager that the input starts being used.
     virtual status_t startInput(audio_io_handle_t input) = 0;
     // indicates to the audio policy manager that the input stops being used.
@@ -214,9 +219,16 @@ public:
                                         audio_devices_t *pDevices,
                                         uint32_t *pSamplingRate,
                                         audio_format_t *pFormat,
+#ifdef STE_AUDIO
+                                        audio_channel_mask_t *pChannelMask,
+                                        audio_input_clients *pInputClientId = NULL) = 0;
+    // closes an audio input
+    virtual status_t closeInput(audio_io_handle_t input, audio_input_clients *pInputClientId = NULL) = 0;
+#else
                                         audio_channel_mask_t *pChannelMask) = 0;
     // closes an audio input
     virtual status_t closeInput(audio_io_handle_t input) = 0;
+#endif
     //
     // misc control functions
     //
diff --git a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h
index 1223435..47fe462 100644
--- a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h
+++ b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h
@@ -120,7 +120,12 @@ public:
                                             uint32_t samplingRate,
                                             uint32_t format,
                                             uint32_t channels,
+#ifdef STE_AUDIO
+                                            AudioSystem::audio_in_acoustics acoustics,
+                                            audio_input_clients *inputClientId = NULL);
+#else
                                             AudioSystem::audio_in_acoustics acoustics);
+#endif
 
         // indicates to the audio policy manager that the input starts being used.
         virtual status_t startInput(audio_io_handle_t input);
diff --git a/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h b/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h
index 5904af2..fe40839 100644
--- a/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h
+++ b/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h
@@ -377,6 +377,20 @@ public:
         NUM_FORCE_USE
     };
 
+#ifdef STE_AUDIO
+// AUDIO_INPUT_CLIENT_ID_BASE provide a means to refer to client Ids not explicitly defined in the enum audio_input_clients
+#define AUDIO_INPUT_CLIENT_ID_BASE AUDIO_INPUT_CLIENT_ID1
+
+    enum audio_input_clients {
+        AUDIO_INPUT_CLIENT_ID1 = 0x1,
+        AUDIO_INPUT_CLIENT_ID2 = 0x2,
+        AUDIO_INPUT_CLIENT_ID3 = 0x3,
+        AUDIO_INPUT_CLIENT_ID4 = 0x4,
+        AUDIO_INPUT_CLIENT_PLAYBACK = 0x80000000, // request client of playback type
+        AUDIO_INPUT_CLIENT_RECORD = 0x80000001   // request client of recording type
+    };
+#endif
+
     //
     // AudioPolicyService interface
     //<commit_msg>Update hardware_libhardware_legacy.patch<commit_after>#       modified:   audio/AudioPolicyCompatClient.cpp
#       modified:   audio/AudioPolicyCompatClient.h
#       modified:   audio/AudioPolicyManagerBase.cpp
#       modified:   audio/audio_policy_hal.cpp
#       modified:   include/hardware_legacy/AudioPolicyInterface.h
#       modified:   include/hardware_legacy/AudioPolicyManagerBase.h
#       modified:   include/hardware_legacy/AudioSystemLegacy.h
diff --git a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp
index bb0059c..8db9d5d 100644
--- a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp
+++ b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.cpp
@@ -74,6 +74,21 @@ audio_io_handle_t AudioPolicyCompatClient::openInput(audio_module_handle_t modul
                                                      audio_devices_t *pDevices,
                                                      uint32_t *pSamplingRate,
                                                      audio_format_t *pFormat,
+#ifdef STE_AUDIO
+                                                     audio_channel_mask_t *pChannelMask,
+                                                     audio_input_clients *pInputClientId)
+{
+    return mServiceOps->open_input_on_module(mService, module, pDevices,
+                                             pSamplingRate, pFormat, pChannelMask, pInputClientId);
+}
+
+status_t AudioPolicyCompatClient::closeInput(audio_io_handle_t input,
+                                            audio_input_clients *inputClientId)
+{
+    return mServiceOps->close_input(mService, input, inputClientId);
+}
+
+#else
                                                      audio_channel_mask_t *pChannelMask)
 {
     return mServiceOps->open_input_on_module(mService, module, pDevices,
@@ -84,6 +99,7 @@ status_t AudioPolicyCompatClient::closeInput(audio_io_handle_t input)
 {
     return mServiceOps->close_input(mService, input);
 }
+#endif
 
 status_t AudioPolicyCompatClient::setStreamOutput(AudioSystem::stream_type stream,
                                              audio_io_handle_t output)
diff --git a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h
index d468126..6647782 100644
--- a/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h
+++ b/hardware/libhardware_legacy/audio/AudioPolicyCompatClient.h
@@ -54,8 +54,15 @@ public:
                                         audio_devices_t *pDevices,
                                         uint32_t *pSamplingRate,
                                         audio_format_t *pFormat,
+#ifdef STE_AUDIO
+                                        audio_channel_mask_t *pChannelMask,
+                                        audio_input_clients *pInputClientId = NULL);
+    virtual status_t closeInput(audio_io_handle_t input,
+                                audio_input_clients *inputClientId = NULL);
+#else
                                         audio_channel_mask_t *pChannelMask);
     virtual status_t closeInput(audio_io_handle_t input);
+#endif
     virtual status_t setStreamOutput(AudioSystem::stream_type stream, audio_io_handle_t output);
     virtual status_t moveEffects(int session,
                                  audio_io_handle_t srcOutput,
diff --git a/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp b/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp
index 434e12f..55151de 100644
--- a/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp
+++ b/hardware/libhardware_legacy/audio/AudioPolicyManagerBase.cpp
@@ -871,7 +871,12 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource,
                                     uint32_t samplingRate,
                                     uint32_t format,
                                     uint32_t channelMask,
+#ifdef STE_AUDIO
+                                    AudioSystem::audio_in_acoustics acoustics,
+                                    audio_input_clients *inputClientId)
+#else
                                     AudioSystem::audio_in_acoustics acoustics)
+#endif
 {
     audio_io_handle_t input = 0;
     audio_devices_t device = getDeviceForInputSource(inputSource);
@@ -927,7 +932,12 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource,
                                     &inputDesc->mDevice,
                                     &inputDesc->mSamplingRate,
                                     &inputDesc->mFormat,
+#ifdef STE_AUDIO
+                                    &inputDesc->mChannelMask,
+                                    inputClientId);
+#else
                                     &inputDesc->mChannelMask);
+#endif
 
     // only accept input with the exact requested set of parameters
     if (input == 0 ||
diff --git a/hardware/libhardware_legacy/audio/audio_policy_hal.cpp b/hardware/libhardware_legacy/audio/audio_policy_hal.cpp
index 52c0a24..3181aa4 100644
--- a/hardware/libhardware_legacy/audio/audio_policy_hal.cpp
+++ b/hardware/libhardware_legacy/audio/audio_policy_hal.cpp
@@ -175,11 +175,20 @@ static audio_io_handle_t ap_get_input(struct audio_policy *pol, audio_source_t i
                                       uint32_t sampling_rate,
                                       audio_format_t format,
                                       audio_channel_mask_t channelMask,
+#ifdef STE_AUDIO
+                                      audio_in_acoustics_t acoustics,
+                                      audio_input_clients *inputClientId)
+#else
                                       audio_in_acoustics_t acoustics)
+#endif
 {
     struct legacy_audio_policy *lap = to_lap(pol);
     return lap->apm->getInput((int) inputSource, sampling_rate, (int) format, channelMask,
+#ifdef STE_AUDIO
+                              (AudioSystem::audio_in_acoustics)acoustics, inputClientId);
+#else
                               (AudioSystem::audio_in_acoustics)acoustics);
+#endif
 }
 
 static int ap_start_input(struct audio_policy *pol, audio_io_handle_t input)
diff --git a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h
index d58864b..4ec2ac6 100644
--- a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h
+++ b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyInterface.h
@@ -110,7 +110,12 @@ public:
                                     uint32_t samplingRate = 0,
                                     uint32_t Format = AudioSystem::FORMAT_DEFAULT,
                                     uint32_t channels = 0,
+#ifdef STE_AUDIO
+                                    AudioSystem::audio_in_acoustics acoustics = (AudioSystem::audio_in_acoustics)0,
+                                    audio_input_clients *inputClientId = NULL) = 0;
+#else
                                     AudioSystem::audio_in_acoustics acoustics = (AudioSystem::audio_in_acoustics)0) = 0;
+#endif
     // indicates to the audio policy manager that the input starts being used.
     virtual status_t startInput(audio_io_handle_t input) = 0;
     // indicates to the audio policy manager that the input stops being used.
@@ -214,9 +219,16 @@ public:
                                         audio_devices_t *pDevices,
                                         uint32_t *pSamplingRate,
                                         audio_format_t *pFormat,
+#ifdef STE_AUDIO
+                                        audio_channel_mask_t *pChannelMask,
+                                        audio_input_clients *pInputClientId = NULL) = 0;
+    // closes an audio input
+    virtual status_t closeInput(audio_io_handle_t input, audio_input_clients *pInputClientId = NULL) = 0;
+#else
                                         audio_channel_mask_t *pChannelMask) = 0;
     // closes an audio input
     virtual status_t closeInput(audio_io_handle_t input) = 0;
+#endif
     //
     // misc control functions
     //
diff --git a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h
index 1223435..47fe462 100644
--- a/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h
+++ b/hardware/libhardware_legacy/include/hardware_legacy/AudioPolicyManagerBase.h
@@ -120,7 +120,12 @@ public:
                                             uint32_t samplingRate,
                                             uint32_t format,
                                             uint32_t channels,
+#ifdef STE_AUDIO
+                                            AudioSystem::audio_in_acoustics acoustics,
+                                            audio_input_clients *inputClientId = NULL);
+#else
                                             AudioSystem::audio_in_acoustics acoustics);
+#endif
 
         // indicates to the audio policy manager that the input starts being used.
         virtual status_t startInput(audio_io_handle_t input);
diff --git a/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h b/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h
index 5904af2..fe40839 100644
--- a/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h
+++ b/hardware/libhardware_legacy/include/hardware_legacy/AudioSystemLegacy.h
@@ -377,6 +377,20 @@ public:
         NUM_FORCE_USE
     };
 
+#ifdef STE_AUDIO
+// AUDIO_INPUT_CLIENT_ID_BASE provide a means to refer to client Id´s not explicitly defined in the enum audio_input_clients
+#define AUDIO_INPUT_CLIENT_ID_BASE AUDIO_INPUT_CLIENT_ID1
+
+    enum audio_input_clients {
+        AUDIO_INPUT_CLIENT_ID1 = 0x1,
+        AUDIO_INPUT_CLIENT_ID2 = 0x2,
+        AUDIO_INPUT_CLIENT_ID3 = 0x3,
+        AUDIO_INPUT_CLIENT_ID4 = 0x4,
+        AUDIO_INPUT_CLIENT_PLAYBACK = 0x80000000, // request client of playback type
+        AUDIO_INPUT_CLIENT_RECORD = 0x80000001   // request client of recording type
+    };
+#endif
+
     //
     // AudioPolicyService interface
     //
{'fraction_non_alphanumeric': 0.07619141008040792, 'fraction_numerical': 0.025985487350460874, 'mean_word_length': 2.0258121940364933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 150, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1356520', 'n_tokens_mistral': 6027, 'n_tokens_neox': 5630, 'n_words': 943}