• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include "AudioPolicyInterface.h"
19 
20 namespace android {
21 
22 class AudioPolicyTestClient : public AudioPolicyClientInterface
23 {
24 public:
25     virtual ~AudioPolicyTestClient() = default;
26 
27     // AudioPolicyClientInterface Implementation
loadHwModule(const char *)28     audio_module_handle_t loadHwModule(const char* /*name*/) override {
29         return AUDIO_MODULE_HANDLE_NONE;
30     }
openOutput(audio_module_handle_t,audio_io_handle_t *,audio_config_t *,audio_devices_t *,const String8 &,uint32_t *,audio_output_flags_t)31     status_t openOutput(audio_module_handle_t /*module*/,
32                         audio_io_handle_t* /*output*/,
33                         audio_config_t* /*config*/,
34                         audio_devices_t* /*devices*/,
35                         const String8& /*address*/,
36                         uint32_t* /*latencyMs*/,
37                         audio_output_flags_t /*flags*/) override { return NO_INIT; }
openDuplicateOutput(audio_io_handle_t,audio_io_handle_t)38     audio_io_handle_t openDuplicateOutput(audio_io_handle_t /*output1*/,
39                                           audio_io_handle_t /*output2*/) override {
40         return AUDIO_IO_HANDLE_NONE;
41     }
closeOutput(audio_io_handle_t)42     status_t closeOutput(audio_io_handle_t /*output*/) override { return NO_INIT; }
suspendOutput(audio_io_handle_t)43     status_t suspendOutput(audio_io_handle_t /*output*/) override { return NO_INIT; }
restoreOutput(audio_io_handle_t)44     status_t restoreOutput(audio_io_handle_t /*output*/) override { return NO_INIT; }
openInput(audio_module_handle_t,audio_io_handle_t *,audio_config_t *,audio_devices_t *,const String8 &,audio_source_t,audio_input_flags_t)45     status_t openInput(audio_module_handle_t /*module*/,
46                        audio_io_handle_t* /*input*/,
47                        audio_config_t* /*config*/,
48                        audio_devices_t* /*device*/,
49                        const String8& /*address*/,
50                        audio_source_t /*source*/,
51                        audio_input_flags_t /*flags*/) override { return NO_INIT; }
closeInput(audio_io_handle_t)52     status_t closeInput(audio_io_handle_t /*input*/) override { return NO_INIT; }
setStreamVolume(audio_stream_type_t,float,audio_io_handle_t,int)53     status_t setStreamVolume(audio_stream_type_t /*stream*/,
54                              float /*volume*/,
55                              audio_io_handle_t /*output*/,
56                              int /*delayMs*/) override { return NO_INIT; }
invalidateStream(audio_stream_type_t)57     status_t invalidateStream(audio_stream_type_t /*stream*/) override { return NO_INIT; }
setParameters(audio_io_handle_t,const String8 &,int)58     void setParameters(audio_io_handle_t /*ioHandle*/,
59                        const String8& /*keyValuePairs*/,
60                        int /*delayMs*/) override { }
getParameters(audio_io_handle_t,const String8 &)61     String8 getParameters(audio_io_handle_t /*ioHandle*/,
62                           const String8& /*keys*/) override { return String8(); }
setVoiceVolume(float,int)63     status_t setVoiceVolume(float /*volume*/, int /*delayMs*/) override { return NO_INIT; }
moveEffects(audio_session_t,audio_io_handle_t,audio_io_handle_t)64     status_t moveEffects(audio_session_t /*session*/,
65                          audio_io_handle_t /*srcOutput*/,
66                          audio_io_handle_t /*dstOutput*/) override { return NO_INIT; }
createAudioPatch(const struct audio_patch *,audio_patch_handle_t *,int)67     status_t createAudioPatch(const struct audio_patch* /*patch*/,
68                               audio_patch_handle_t* /*handle*/,
69                               int /*delayMs*/) override { return NO_INIT; }
releaseAudioPatch(audio_patch_handle_t,int)70     status_t releaseAudioPatch(audio_patch_handle_t /*handle*/,
71                                int /*delayMs*/) override { return NO_INIT; }
setAudioPortConfig(const struct audio_port_config *,int)72     status_t setAudioPortConfig(const struct audio_port_config* /*config*/,
73                                 int /*delayMs*/) override { return NO_INIT; }
onAudioPortListUpdate()74     void onAudioPortListUpdate() override { }
onAudioPatchListUpdate()75     void onAudioPatchListUpdate() override { }
onAudioVolumeGroupChanged(volume_group_t,int)76     void onAudioVolumeGroupChanged(volume_group_t /*group*/, int /*flags*/) override { }
newAudioUniqueId(audio_unique_id_use_t)77     audio_unique_id_t newAudioUniqueId(audio_unique_id_use_t /*use*/) override { return 0; }
onDynamicPolicyMixStateUpdate(String8,int32_t)78     void onDynamicPolicyMixStateUpdate(String8 /*regId*/, int32_t /*state*/) override { }
onRecordingConfigurationUpdate(int event __unused,const record_client_info_t * clientInfo __unused,const audio_config_base_t * clientConfig __unused,std::vector<effect_descriptor_t> clientEffects __unused,const audio_config_base_t * deviceConfig __unused,std::vector<effect_descriptor_t> effects __unused,audio_patch_handle_t patchHandle __unused,audio_source_t source __unused)79     void onRecordingConfigurationUpdate(int event __unused,
80                                         const record_client_info_t *clientInfo __unused,
81                                         const audio_config_base_t *clientConfig __unused,
82                                         std::vector<effect_descriptor_t> clientEffects __unused,
83                                         const audio_config_base_t *deviceConfig __unused,
84                                         std::vector<effect_descriptor_t> effects __unused,
85                                         audio_patch_handle_t patchHandle __unused,
86                                         audio_source_t source __unused) override { }
setEffectSuspended(int effectId __unused,audio_session_t sessionId __unused,bool suspended __unused)87     void setEffectSuspended(int effectId __unused,
88                             audio_session_t sessionId __unused,
89                             bool suspended __unused) {}
90 };
91 
92 } // namespace android
93