blob: 2f26e393a95ac7603b08a15c504c647182533a54
1 | /* |
2 | * Copyright (C) 2014 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 | |
17 | |
18 | #include <stdint.h> |
19 | #include <sys/types.h> |
20 | #include <utils/Timers.h> |
21 | #include <utils/Errors.h> |
22 | #include <utils/KeyedVector.h> |
23 | #include <AudioPolicyManager.h> |
24 | |
25 | #ifndef ANDROID_DLG_AUDIO_POLICY_MANAGER_H |
26 | #define ANDROID_DLG_AUDIO_POLICY_MANAGER_H |
27 | |
28 | namespace android { |
29 | |
30 | class DLGAudioPolicyManager: public AudioPolicyManager |
31 | { |
32 | public: |
33 | DLGAudioPolicyManager(AudioPolicyClientInterface *clientInterface); |
34 | virtual ~DLGAudioPolicyManager() {} |
35 | |
36 | virtual status_t setDeviceConnectionState(audio_devices_t device, |
37 | audio_policy_dev_state_t state, |
38 | const char *device_address, |
39 | const char *device_name); |
40 | |
41 | virtual audio_devices_t getDeviceForInputSource(audio_source_t inputSource); |
42 | |
43 | protected: |
44 | virtual float computeVolume(audio_stream_type_t stream, |
45 | int index, |
46 | audio_devices_t device); |
47 | |
48 | private: |
49 | // Flag which indicates whether to record from the submix device. |
50 | bool mForceSubmixInputSelection; |
51 | }; |
52 | |
53 | } // namespace android |
54 | #endif // DLG_ANDROID_AUDIO_POLICY_MANAGER_H |
55 |