OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 type == AUDIO_TYPE_FRONT_MIC || | 56 type == AUDIO_TYPE_FRONT_MIC || |
57 type == AUDIO_TYPE_REAR_MIC || | 57 type == AUDIO_TYPE_REAR_MIC || |
58 type == AUDIO_TYPE_MIC || | 58 type == AUDIO_TYPE_MIC || |
59 type == AUDIO_TYPE_USB || | 59 type == AUDIO_TYPE_USB || |
60 type == AUDIO_TYPE_BLUETOOTH || | 60 type == AUDIO_TYPE_BLUETOOTH || |
61 type == AUDIO_TYPE_HDMI || | 61 type == AUDIO_TYPE_HDMI || |
62 type == AUDIO_TYPE_INTERNAL_SPEAKER || | 62 type == AUDIO_TYPE_INTERNAL_SPEAKER || |
63 type == AUDIO_TYPE_LINEOUT); | 63 type == AUDIO_TYPE_LINEOUT); |
64 } | 64 } |
65 | 65 |
| 66 bool IsExternalDevice() const; |
| 67 |
66 bool is_input = false; | 68 bool is_input = false; |
67 | 69 |
68 // Id of this audio device. The legacy |id| is assigned to be unique everytime | 70 // Id of this audio device. The legacy |id| is assigned to be unique everytime |
69 // when each device got plugged, so that the same physical device will have | 71 // when each device got plugged, so that the same physical device will have |
70 // a different id after unplug then re-plug. | 72 // a different id after unplug then re-plug. |
71 // The |stable_device_id| is designed to be persistent across system reboot | 73 // The |stable_device_id| is designed to be persistent across system reboot |
72 // and plug/unplug for the same physical device. It is guaranteed that | 74 // and plug/unplug for the same physical device. It is guaranteed that |
73 // different type of hardware has different |stable_device_id|, but not | 75 // different type of hardware has different |stable_device_id|, but not |
74 // guaranteed to be different between the same kind of audio device, e.g | 76 // guaranteed to be different between the same kind of audio device, e.g |
75 // USB headset. |id| and |stable_device_id| can be used together to achieve | 77 // USB headset. |id| and |stable_device_id| can be used together to achieve |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 return true; | 116 return true; |
115 } else { | 117 } else { |
116 return false; | 118 return false; |
117 } | 119 } |
118 } | 120 } |
119 }; | 121 }; |
120 | 122 |
121 } // namespace chromeos | 123 } // namespace chromeos |
122 | 124 |
123 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 125 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
OLD | NEW |