Home | History | Annotate | Download | only in include

Lines Matching refs:device

53      * device categories used for volume curve management.
64 * extract one device relevant for volume control from multiple device selection
66 * @param[in] device for which the volume category is associated
68 * @return subset of device required to limit the number of volume category per device
70 static audio_devices_t getDeviceForVolume(audio_devices_t device)
72 if (device == AUDIO_DEVICE_NONE) {
75 device = AUDIO_DEVICE_OUT_SPEAKER;
76 } else if (popcount(device) > 1) {
77 // Multiple device selection is either:
78 // - speaker + one other device: give priority to speaker in this case.
79 // - one A2DP device + another device: happens with duplicated output. In this case
80 // retain the device on the A2DP output as the other must not correspond to an active
83 if (device & AUDIO_DEVICE_OUT_SPEAKER) {
84 device = AUDIO_DEVICE_OUT_SPEAKER;
85 } else if (device & AUDIO_DEVICE_OUT_SPEAKER_SAFE) {
86 device = AUDIO_DEVICE_OUT_SPEAKER_SAFE;
87 } else if (device & AUDIO_DEVICE_OUT_HDMI_ARC) {
88 device = AUDIO_DEVICE_OUT_HDMI_ARC;
89 } else if (device & AUDIO_DEVICE_OUT_AUX_LINE) {
90 device = AUDIO_DEVICE_OUT_AUX_LINE;
91 } else if (device & AUDIO_DEVICE_OUT_SPDIF) {
92 device = AUDIO_DEVICE_OUT_SPDIF;
94 device = (audio_devices_t)(device & AUDIO_DEVICE_OUT_ALL_A2DP);
99 if (device == AUDIO_DEVICE_OUT_SPEAKER_SAFE)
100 device = AUDIO_DEVICE_OUT_SPEAKER;
102 ALOGW_IF(popcount(device) != 1,
103 "getDeviceForVolume() invalid device combination: %08x",
104 device);
106 return device;
110 * returns the category the device belongs to with regard to volume curve management
112 * @param[in] device to check upon the category to whom it belongs to.
114 * @return device category.
116 static device_category getDeviceCategory(audio_devices_t device)
118 switch(getDeviceForVolume(device)) {