Home | History | Annotate | Download | only in include

Lines Matching refs:device

34  * device categories used for volume curve management.
65 * extract one device relevant for volume control from multiple device selection
67 * @param[in] device for which the volume category is associated
69 * @return subset of device required to limit the number of volume category per device
71 static audio_devices_t getDeviceForVolume(audio_devices_t device)
73 if (device == AUDIO_DEVICE_NONE) {
76 device = AUDIO_DEVICE_OUT_SPEAKER;
77 } else if (popcount(device) > 1) {
78 // Multiple device selection is either:
79 // - speaker + one other device: give priority to speaker in this case.
80 // - one A2DP device + another device: happens with duplicated output. In this case
81 // retain the device on the A2DP output as the other must not correspond to an active
84 if (device & AUDIO_DEVICE_OUT_SPEAKER) {
85 device = AUDIO_DEVICE_OUT_SPEAKER;
86 } else if (device & AUDIO_DEVICE_OUT_SPEAKER_SAFE) {
87 device = AUDIO_DEVICE_OUT_SPEAKER_SAFE;
88 } else if (device & AUDIO_DEVICE_OUT_HDMI_ARC) {
89 device = AUDIO_DEVICE_OUT_HDMI_ARC;
90 } else if (device & AUDIO_DEVICE_OUT_AUX_LINE) {
91 device = AUDIO_DEVICE_OUT_AUX_LINE;
92 } else if (device & AUDIO_DEVICE_OUT_SPDIF) {
93 device = AUDIO_DEVICE_OUT_SPDIF;
95 device = (audio_devices_t)(device & AUDIO_DEVICE_OUT_ALL_A2DP);
100 if (device == AUDIO_DEVICE_OUT_SPEAKER_SAFE)
101 device = AUDIO_DEVICE_OUT_SPEAKER;
103 ALOGW_IF(popcount(device) != 1,
104 "getDeviceForVolume() invalid device combination: %08x",
105 device);
107 return device;
111 * returns the category the device belongs to with regard to volume curve management
113 * @param[in] device to check upon the category to whom it belongs to.
115 * @return device category.
117 static device_category getDeviceCategory(audio_devices_t device)
119 switch(getDeviceForVolume(device)) {