Lines Matching refs:snd_device

768 static bool is_usb_snd_dev(snd_device_t snd_device)  in is_usb_snd_dev()  argument
770 if (snd_device < SND_DEVICE_IN_BEGIN) { in is_usb_snd_dev()
771 if (snd_device == SND_DEVICE_OUT_USB_HEADSET ||\ in is_usb_snd_dev()
772 snd_device == SND_DEVICE_OUT_USB_HEADPHONES ||\ in is_usb_snd_dev()
773 snd_device == SND_DEVICE_OUT_VOICE_USB_HEADPHONES ||\ in is_usb_snd_dev()
774 snd_device == SND_DEVICE_OUT_VOICE_USB_HEADSET ||\ in is_usb_snd_dev()
775 snd_device == SND_DEVICE_OUT_VOICE_TTY_FULL_USB ||\ in is_usb_snd_dev()
776 snd_device == SND_DEVICE_OUT_VOICE_TTY_VCO_USB) in is_usb_snd_dev()
779 if (snd_device == SND_DEVICE_IN_USB_HEADSET_MIC ||\ in is_usb_snd_dev()
780 snd_device == SND_DEVICE_IN_USB_HEADSET_MIC_AEC ||\ in is_usb_snd_dev()
781 snd_device == SND_DEVICE_IN_VOICE_USB_HEADSET_MIC ||\ in is_usb_snd_dev()
782 snd_device == SND_DEVICE_IN_UNPROCESSED_USB_HEADSET_MIC ||\ in is_usb_snd_dev()
783 snd_device == SND_DEVICE_IN_VOICE_RECOG_USB_HEADSET_MIC) in is_usb_snd_dev()
844 static struct operator_specific_device *get_operator_specific_device(snd_device_t snd_device) in get_operator_specific_device() argument
855 list_for_each(node, operator_specific_device_table[snd_device]) { in get_operator_specific_device()
866 static int get_operator_specific_device_acdb_id(snd_device_t snd_device) in get_operator_specific_device_acdb_id() argument
869 int ret = acdb_device_table[snd_device]; in get_operator_specific_device_acdb_id()
871 device = get_operator_specific_device(snd_device); in get_operator_specific_device_acdb_id()
878 static int get_external_specific_device_acdb_id(snd_device_t snd_device) in get_external_specific_device_acdb_id() argument
881 int ret = acdb_device_table[snd_device]; in get_external_specific_device_acdb_id()
885 if (is_usb_snd_dev(snd_device)) in get_external_specific_device_acdb_id()
889 list_for_each(node, external_specific_device_table[snd_device]) { in get_external_specific_device_acdb_id()
902 static const char *get_operator_specific_device_mixer_path(snd_device_t snd_device) in get_operator_specific_device_mixer_path() argument
905 const char *ret = device_table[snd_device]; in get_operator_specific_device_mixer_path()
907 device = get_operator_specific_device(snd_device); in get_operator_specific_device_mixer_path()
1133 snd_device_t snd_device = SND_DEVICE_NONE; in platform_set_echo_reference() local
1143 snd_device = platform_get_output_snd_device(adev->platform, out_device); in platform_set_echo_reference()
1144 platform_add_backend_name(adev->platform, my_data->ec_ref_mixer_path, snd_device); in platform_set_echo_reference()
2079 const char *platform_get_snd_device_name(snd_device_t snd_device) in platform_get_snd_device_name() argument
2081 if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX) { in platform_get_snd_device_name()
2082 if (operator_specific_device_table[snd_device] != NULL) { in platform_get_snd_device_name()
2083 return get_operator_specific_device_mixer_path(snd_device); in platform_get_snd_device_name()
2085 return device_table[snd_device]; in platform_get_snd_device_name()
2090 int platform_get_snd_device_name_extn(void *platform, snd_device_t snd_device, in platform_get_snd_device_name_extn() argument
2097 strlcpy(device_name, platform_get_snd_device_name(snd_device), in platform_get_snd_device_name_extn()
2099 } else if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX) { in platform_get_snd_device_name_extn()
2100 if (operator_specific_device_table[snd_device] != NULL) { in platform_get_snd_device_name_extn()
2101 strlcpy(device_name, get_operator_specific_device_mixer_path(snd_device), in platform_get_snd_device_name_extn()
2104 strlcpy(device_name, device_table[snd_device], DEVICE_NAME_MAX_SIZE); in platform_get_snd_device_name_extn()
2106 hw_info_append_hw_type(my_data->hw_info, snd_device, device_name); in platform_get_snd_device_name_extn()
2116 snd_device_t snd_device) in platform_add_backend_name() argument
2120 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) { in platform_add_backend_name()
2121 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device); in platform_add_backend_name()
2125 const char * suffix = backend_tag_table[snd_device]; in platform_add_backend_name()
2225 int platform_get_effect_config_data(snd_device_t snd_device, in platform_get_effect_config_data() argument
2231 if ((snd_device < SND_DEVICE_IN_BEGIN) || (snd_device >= SND_DEVICE_MAX) || in platform_get_effect_config_data()
2234 __func__, snd_device, effect_type); in platform_get_effect_config_data()
2246 …__func__, snd_device, effect_config_table[GET_IN_DEVICE_INDEX(snd_device)][effect_type].module_id); in platform_get_effect_config_data()
2247 *effect_config = effect_config_table[GET_IN_DEVICE_INDEX(snd_device)][effect_type]; in platform_get_effect_config_data()
2253 int platform_set_effect_config_data(snd_device_t snd_device, in platform_set_effect_config_data() argument
2259 if ((snd_device < SND_DEVICE_IN_BEGIN) || (snd_device >= SND_DEVICE_MAX) || in platform_set_effect_config_data()
2262 __func__, snd_device, effect_type); in platform_set_effect_config_data()
2270 effect_config_table[GET_IN_DEVICE_INDEX(snd_device)][effect_type] = effect_config; in platform_set_effect_config_data()
2281 void platform_add_operator_specific_device(snd_device_t snd_device, in platform_add_operator_specific_device() argument
2288 if (operator_specific_device_table[snd_device] == NULL) { in platform_add_operator_specific_device()
2289 operator_specific_device_table[snd_device] = in platform_add_operator_specific_device()
2291 list_init(operator_specific_device_table[snd_device]); in platform_add_operator_specific_device()
2300 list_add_tail(operator_specific_device_table[snd_device], &device->list); in platform_add_operator_specific_device()
2303 platform_get_snd_device_name(snd_device), operator, mixer_path, acdb_id); in platform_add_operator_specific_device()
2307 void platform_add_external_specific_device(snd_device_t snd_device, in platform_add_external_specific_device() argument
2313 if (external_specific_device_table[snd_device] == NULL) { in platform_add_external_specific_device()
2314 external_specific_device_table[snd_device] = in platform_add_external_specific_device()
2316 list_init(external_specific_device_table[snd_device]); in platform_add_external_specific_device()
2324 list_add_tail(external_specific_device_table[snd_device], &device->list); in platform_add_external_specific_device()
2327 platform_get_snd_device_name(snd_device), usbid, acdb_id); in platform_add_external_specific_device()
2331 int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id) in platform_set_snd_device_acdb_id() argument
2335 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) { in platform_set_snd_device_acdb_id()
2337 __func__, snd_device); in platform_set_snd_device_acdb_id()
2343 platform_get_snd_device_name(snd_device), acdb_device_table[snd_device], acdb_id); in platform_set_snd_device_acdb_id()
2344 acdb_device_table[snd_device] = acdb_id; in platform_set_snd_device_acdb_id()
2349 int platform_get_snd_device_acdb_id(snd_device_t snd_device) in platform_get_snd_device_acdb_id() argument
2351 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) { in platform_get_snd_device_acdb_id()
2352 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device); in platform_get_snd_device_acdb_id()
2360 snd_device = audio_extn_get_spkr_prot_snd_device(snd_device); in platform_get_snd_device_acdb_id()
2362 if (operator_specific_device_table[snd_device] != NULL) in platform_get_snd_device_acdb_id()
2363 return get_operator_specific_device_acdb_id(snd_device); in platform_get_snd_device_acdb_id()
2364 else if (external_specific_device_table[snd_device] != NULL) in platform_get_snd_device_acdb_id()
2365 return get_external_specific_device_acdb_id(snd_device); in platform_get_snd_device_acdb_id()
2367 return acdb_device_table[snd_device]; in platform_get_snd_device_acdb_id()
2370 static int platform_get_backend_index(snd_device_t snd_device) in platform_get_backend_index() argument
2374 if (snd_device >= SND_DEVICE_OUT_BEGIN && snd_device < SND_DEVICE_OUT_END) { in platform_get_backend_index()
2375 if (backend_tag_table[snd_device] != NULL) { in platform_get_backend_index()
2376 if (strncmp(backend_tag_table[snd_device], "headphones", in platform_get_backend_index()
2379 else if (strcmp(backend_tag_table[snd_device], "hdmi") == 0) in platform_get_backend_index()
2381 else if ((strcmp(backend_tag_table[snd_device], "usb-headphones") == 0) || in platform_get_backend_index()
2382 (strcmp(backend_tag_table[snd_device], "usb-headset") == 0)) in platform_get_backend_index()
2385 } else if (snd_device >= SND_DEVICE_IN_BEGIN && snd_device < SND_DEVICE_IN_END) { in platform_get_backend_index()
2387 if (backend_tag_table[snd_device] != NULL) { in platform_get_backend_index()
2388 if (strcmp(backend_tag_table[snd_device], "usb-headset-mic") == 0) in platform_get_backend_index()
2390 else if (strstr(backend_tag_table[snd_device], "bt-sco") != NULL) in platform_get_backend_index()
2394 ALOGW("%s:napb: Invalid device - %d ", __func__, snd_device); in platform_get_backend_index()
2397 ALOGV("%s:napb: backend port - %d device - %d ", __func__, port, snd_device); in platform_get_backend_index()
2402 int platform_send_audio_calibration(void *platform, snd_device_t snd_device) in platform_send_audio_calibration() argument
2410 acdb_dev_id = platform_get_snd_device_acdb_id(snd_device); in platform_send_audio_calibration()
2413 __func__, snd_device); in platform_send_audio_calibration()
2418 __func__, snd_device, acdb_dev_id); in platform_send_audio_calibration()
2419 if (snd_device >= SND_DEVICE_OUT_BEGIN && in platform_send_audio_calibration()
2420 snd_device < SND_DEVICE_OUT_END) in platform_send_audio_calibration()
2434 int snd_device = usecase->out_snd_device; in platform_send_audio_calibration_v2() local
2442 snd_device = usecase->in_snd_device; in platform_send_audio_calibration_v2()
2445 acdb_dev_id = platform_get_snd_device_acdb_id(snd_device); in platform_send_audio_calibration_v2()
2448 __func__, snd_device); in platform_send_audio_calibration_v2()
2452 if (platform_can_split_snd_device(snd_device, in platform_send_audio_calibration_v2()
2454 new_snd_device[0] = snd_device; in platform_send_audio_calibration_v2()
2643 snd_device_t snd_device, in platform_set_speaker_gain_in_combo() argument
2647 switch (snd_device) { in platform_set_speaker_gain_in_combo()
2810 int platform_can_split_snd_device(snd_device_t snd_device, in platform_can_split_snd_device() argument
2824 if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES && in platform_can_split_snd_device()
2830 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_LINE && in platform_can_split_snd_device()
2836 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_SAFE_AND_HEADPHONES && in platform_can_split_snd_device()
2842 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_SAFE_AND_LINE && in platform_can_split_snd_device()
2848 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_BT_SCO && in platform_can_split_snd_device()
2855 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_SAFE_AND_BT_SCO && in platform_can_split_snd_device()
2862 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_BT_SCO_WB && in platform_can_split_snd_device()
2869 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_SAFE_AND_BT_SCO_WB && in platform_can_split_snd_device()
2876 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET && in platform_can_split_snd_device()
2882 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_SAFE_AND_USB_HEADSET && in platform_can_split_snd_device()
2888 } else if (SND_DEVICE_OUT_SPEAKER_AND_BT_A2DP == snd_device && in platform_can_split_snd_device()
2895 } else if (SND_DEVICE_OUT_SPEAKER_SAFE_AND_BT_A2DP == snd_device && in platform_can_split_snd_device()
2912 snd_device_t snd_device = SND_DEVICE_NONE; in platform_get_output_snd_device() local
2926 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES; in platform_get_output_snd_device()
2929 snd_device = SND_DEVICE_OUT_SPEAKER_AND_LINE; in platform_get_output_snd_device()
2934 snd_device = SND_DEVICE_OUT_SPEAKER_SAFE_AND_HEADPHONES; in platform_get_output_snd_device()
2937 snd_device = SND_DEVICE_OUT_SPEAKER_SAFE_AND_LINE; in platform_get_output_snd_device()
2940 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HDMI; in platform_get_output_snd_device()
2943 snd_device = adev->bt_wb_speech_enabled ? in platform_get_output_snd_device()
2948 snd_device = adev->bt_wb_speech_enabled ? in platform_get_output_snd_device()
2955 snd_device = SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET; in platform_get_output_snd_device()
2960 snd_device = SND_DEVICE_OUT_SPEAKER_SAFE_AND_USB_HEADSET; in platform_get_output_snd_device()
2963 snd_device = SND_DEVICE_OUT_SPEAKER_AND_BT_A2DP; in platform_get_output_snd_device()
2966 snd_device = SND_DEVICE_OUT_SPEAKER_SAFE_AND_BT_A2DP; in platform_get_output_snd_device()
2971 if (snd_device != SND_DEVICE_NONE) { in platform_get_output_snd_device()
2987 snd_device = SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES; in platform_get_output_snd_device()
2990 snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES; in platform_get_output_snd_device()
2993 snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET; in platform_get_output_snd_device()
2996 snd_device = SND_DEVICE_OUT_VOICE_LINE; in platform_get_output_snd_device()
2998 snd_device = SND_DEVICE_OUT_VOICE_HEADSET; in platform_get_output_snd_device()
3000 snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES; in platform_get_output_snd_device()
3006 snd_device = SND_DEVICE_OUT_VOICE_TTY_FULL_USB; in platform_get_output_snd_device()
3009 snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_USB; in platform_get_output_snd_device()
3013 snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET; in platform_get_output_snd_device()
3022 if (snd_device == SND_DEVICE_NONE) { in platform_get_output_snd_device()
3023 snd_device = audio_extn_usb_is_capture_supported() ? in platform_get_output_snd_device()
3029 snd_device = SND_DEVICE_OUT_BT_SCO_WB; in platform_get_output_snd_device()
3031 snd_device = SND_DEVICE_OUT_BT_SCO; in platform_get_output_snd_device()
3034 snd_device = SND_DEVICE_OUT_BT_A2DP; in platform_get_output_snd_device()
3037 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER; in platform_get_output_snd_device()
3039 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_HFP; in platform_get_output_snd_device()
3043 snd_device = SND_DEVICE_OUT_VOICE_HAC_HANDSET; in platform_get_output_snd_device()
3045 snd_device = SND_DEVICE_OUT_VOICE_HANDSET_TMUS; in platform_get_output_snd_device()
3047 snd_device = SND_DEVICE_OUT_VOICE_HANDSET; in platform_get_output_snd_device()
3049 snd_device = SND_DEVICE_OUT_VOICE_TX; in platform_get_output_snd_device()
3051 snd_device = SND_DEVICE_OUT_VOICE_HEARING_AID; in platform_get_output_snd_device()
3054 if (snd_device != SND_DEVICE_NONE) { in platform_get_output_snd_device()
3061 snd_device = SND_DEVICE_OUT_HEADPHONES; in platform_get_output_snd_device()
3063 snd_device = SND_DEVICE_OUT_LINE; in platform_get_output_snd_device()
3065 snd_device = SND_DEVICE_OUT_SPEAKER_SAFE; in platform_get_output_snd_device()
3074 snd_device = SND_DEVICE_OUT_SPEAKER_REVERSE; in platform_get_output_snd_device()
3076 snd_device = SND_DEVICE_OUT_SPEAKER; in platform_get_output_snd_device()
3079 snd_device = SND_DEVICE_OUT_BT_SCO_WB; in platform_get_output_snd_device()
3081 snd_device = SND_DEVICE_OUT_BT_SCO; in platform_get_output_snd_device()
3084 snd_device = SND_DEVICE_OUT_BT_A2DP; in platform_get_output_snd_device()
3086 snd_device = SND_DEVICE_OUT_HDMI ; in platform_get_output_snd_device()
3089 snd_device = SND_DEVICE_OUT_USB_HEADSET_SPEC; in platform_get_output_snd_device()
3091 snd_device = SND_DEVICE_OUT_USB_HEADSET; in platform_get_output_snd_device()
3093 snd_device = SND_DEVICE_OUT_USB_HEADPHONES; in platform_get_output_snd_device()
3097 snd_device = SND_DEVICE_OUT_VOICE_HAC_HANDSET; in platform_get_output_snd_device()
3099 snd_device = SND_DEVICE_OUT_HANDSET; in platform_get_output_snd_device()
3104 ALOGV("%s: exit: snd_device(%s)", __func__, device_table[snd_device]); in platform_get_output_snd_device()
3105 return snd_device; in platform_get_output_snd_device()
3115 snd_device_t snd_device = SND_DEVICE_NONE; in get_snd_device_for_voice_comm() local
3123 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS; in get_snd_device_for_voice_comm()
3127 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS; in get_snd_device_for_voice_comm()
3131 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC_NS; in get_snd_device_for_voice_comm()
3137 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC_NS; in get_snd_device_for_voice_comm()
3140 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC_NS; in get_snd_device_for_voice_comm()
3149 return snd_device; in get_snd_device_for_voice_comm()
3158 snd_device_t snd_device = SND_DEVICE_NONE; in get_snd_device_for_voice_comm() local
3166 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS; in get_snd_device_for_voice_comm()
3168 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC_NS; in get_snd_device_for_voice_comm()
3173 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC_NS; in get_snd_device_for_voice_comm()
3175 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC_NS; in get_snd_device_for_voice_comm()
3178 snd_device = SND_DEVICE_IN_HEADSET_MIC_AEC; in get_snd_device_for_voice_comm()
3180 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC_AEC; in get_snd_device_for_voice_comm()
3187 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC; in get_snd_device_for_voice_comm()
3189 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC; in get_snd_device_for_voice_comm()
3194 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC; in get_snd_device_for_voice_comm()
3196 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC; in get_snd_device_for_voice_comm()
3199 snd_device = SND_DEVICE_IN_HEADSET_MIC_AEC; in get_snd_device_for_voice_comm()
3201 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC_AEC; in get_snd_device_for_voice_comm()
3208 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS; in get_snd_device_for_voice_comm()
3210 snd_device = SND_DEVICE_IN_SPEAKER_MIC_NS; in get_snd_device_for_voice_comm()
3215 snd_device = SND_DEVICE_IN_HANDSET_DMIC_NS; in get_snd_device_for_voice_comm()
3217 snd_device = SND_DEVICE_IN_HANDSET_MIC_NS; in get_snd_device_for_voice_comm()
3222 return snd_device; in get_snd_device_for_voice_comm()
3233 snd_device_t snd_device = SND_DEVICE_NONE; in platform_get_input_snd_device() local
3256 snd_device = SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC; in platform_get_input_snd_device()
3259 snd_device = SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC; in platform_get_input_snd_device()
3262 snd_device = SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC; in platform_get_input_snd_device()
3271 snd_device = SND_DEVICE_IN_VOICE_TTY_FULL_USB_MIC; in platform_get_input_snd_device()
3275 snd_device = SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC; in platform_get_input_snd_device()
3278 snd_device = SND_DEVICE_IN_VOICE_TTY_HCO_USB_MIC; in platform_get_input_snd_device()
3288 snd_device = SND_DEVICE_IN_HANDSET_MIC; in platform_get_input_snd_device()
3291 snd_device = SND_DEVICE_IN_VOICE_DMIC_TMUS; in platform_get_input_snd_device()
3293 snd_device = SND_DEVICE_IN_VOICE_DMIC; in platform_get_input_snd_device()
3296 snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC; in platform_get_input_snd_device()
3300 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC; in platform_get_input_snd_device()
3302 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB; in platform_get_input_snd_device()
3305 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC; in platform_get_input_snd_device()
3307 snd_device = SND_DEVICE_IN_BT_SCO_MIC; in platform_get_input_snd_device()
3315 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC; in platform_get_input_snd_device()
3317 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC; in platform_get_input_snd_device()
3322 if (snd_device == SND_DEVICE_NONE) { in platform_get_input_snd_device()
3324 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC; in platform_get_input_snd_device()
3326 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC_HFP; in platform_get_input_snd_device()
3331 snd_device = SND_DEVICE_IN_VOICE_RX; in platform_get_input_snd_device()
3334 snd_device = SND_DEVICE_IN_VOICE_USB_HEADSET_MIC; in platform_get_input_snd_device()
3337 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC; in platform_get_input_snd_device()
3339 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC; in platform_get_input_snd_device()
3343 snd_device = SND_DEVICE_IN_VOICE_HEARING_AID; in platform_get_input_snd_device()
3350 snd_device = SND_DEVICE_IN_CAMCORDER_LANDSCAPE; in platform_get_input_snd_device()
3353 snd_device = SND_DEVICE_IN_CAMCORDER_INVERT_LANDSCAPE; in platform_get_input_snd_device()
3356 snd_device = SND_DEVICE_IN_CAMCORDER_PORTRAIT; in platform_get_input_snd_device()
3359 snd_device = SND_DEVICE_IN_CAMCORDER_SELFIE_LANDSCAPE; in platform_get_input_snd_device()
3362 snd_device = SND_DEVICE_IN_CAMCORDER_SELFIE_INVERT_LANDSCAPE; in platform_get_input_snd_device()
3365 snd_device = SND_DEVICE_IN_CAMCORDER_SELFIE_PORTRAIT; in platform_get_input_snd_device()
3369 snd_device = SND_DEVICE_IN_CAMCORDER_LANDSCAPE; in platform_get_input_snd_device()
3379 snd_device = SND_DEVICE_IN_HANDSET_QMIC_AEC; in platform_get_input_snd_device()
3381 snd_device = SND_DEVICE_IN_HANDSET_QMIC; in platform_get_input_snd_device()
3385 snd_device = SND_DEVICE_IN_HANDSET_TMIC_AEC; in platform_get_input_snd_device()
3387 snd_device = SND_DEVICE_IN_HANDSET_TMIC; in platform_get_input_snd_device()
3392 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC; in platform_get_input_snd_device()
3394 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE; in platform_get_input_snd_device()
3401 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_STEREO; in platform_get_input_snd_device()
3404 snd_device = SND_DEVICE_IN_THREE_MIC; in platform_get_input_snd_device()
3407 snd_device = SND_DEVICE_IN_QUAD_MIC; in platform_get_input_snd_device()
3409 if (snd_device == SND_DEVICE_NONE) { in platform_get_input_snd_device()
3412 snd_device = SND_DEVICE_IN_VOICE_REC_MIC_AEC_NS; in platform_get_input_snd_device()
3414 snd_device = SND_DEVICE_IN_VOICE_REC_MIC_AEC; in platform_get_input_snd_device()
3417 snd_device = SND_DEVICE_IN_VOICE_REC_MIC_NS; in platform_get_input_snd_device()
3419 snd_device = SND_DEVICE_IN_VOICE_REC_MIC; in platform_get_input_snd_device()
3423 snd_device = SND_DEVICE_IN_VOICE_REC_HEADSET_MIC; in platform_get_input_snd_device()
3425 snd_device = SND_DEVICE_IN_VOICE_RECOG_USB_HEADSET_MIC; in platform_get_input_snd_device()
3433 snd_device = SND_DEVICE_IN_UNPROCESSED_STEREO_MIC; in platform_get_input_snd_device()
3436 snd_device = SND_DEVICE_IN_UNPROCESSED_THREE_MIC; in platform_get_input_snd_device()
3439 snd_device = SND_DEVICE_IN_UNPROCESSED_QUAD_MIC; in platform_get_input_snd_device()
3441 snd_device = SND_DEVICE_IN_UNPROCESSED_MIC; in platform_get_input_snd_device()
3444 snd_device = SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC; in platform_get_input_snd_device()
3446 snd_device = SND_DEVICE_IN_UNPROCESSED_USB_HEADSET_MIC; in platform_get_input_snd_device()
3458 snd_device = get_snd_device_for_voice_comm(my_data, in, out_device, in_device); in platform_get_input_snd_device()
3465 if (snd_device != SND_DEVICE_NONE) { in platform_get_input_snd_device()
3475 snd_device = SND_DEVICE_IN_QUAD_MIC; in platform_get_input_snd_device()
3478 snd_device = SND_DEVICE_IN_THREE_MIC; in platform_get_input_snd_device()
3481 snd_device = SND_DEVICE_IN_HANDSET_DMIC_STEREO; in platform_get_input_snd_device()
3484 snd_device = SND_DEVICE_IN_HANDSET_MIC; in platform_get_input_snd_device()
3489 snd_device = SND_DEVICE_IN_HANDSET_MIC; in platform_get_input_snd_device()
3494 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_STEREO; in platform_get_input_snd_device()
3497 snd_device = SND_DEVICE_IN_SPEAKER_MIC; in platform_get_input_snd_device()
3502 snd_device = SND_DEVICE_IN_SPEAKER_MIC; in platform_get_input_snd_device()
3505 snd_device = SND_DEVICE_IN_HEADSET_MIC; in platform_get_input_snd_device()
3509 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC; in platform_get_input_snd_device()
3511 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB; in platform_get_input_snd_device()
3514 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC; in platform_get_input_snd_device()
3516 snd_device = SND_DEVICE_IN_BT_SCO_MIC; in platform_get_input_snd_device()
3519 snd_device = SND_DEVICE_IN_HDMI_MIC; in platform_get_input_snd_device()
3521 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC; in platform_get_input_snd_device()
3525 snd_device = SND_DEVICE_IN_HANDSET_MIC; in platform_get_input_snd_device()
3529 snd_device = SND_DEVICE_IN_HANDSET_MIC; in platform_get_input_snd_device()
3531 snd_device = SND_DEVICE_IN_HEADSET_MIC; in platform_get_input_snd_device()
3538 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_STEREO; in platform_get_input_snd_device()
3541 snd_device = SND_DEVICE_IN_SPEAKER_MIC; in platform_get_input_snd_device()
3546 snd_device = SND_DEVICE_IN_SPEAKER_MIC; in platform_get_input_snd_device()
3551 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC; in platform_get_input_snd_device()
3553 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB; in platform_get_input_snd_device()
3556 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC; in platform_get_input_snd_device()
3558 snd_device = SND_DEVICE_IN_BT_SCO_MIC; in platform_get_input_snd_device()
3561 snd_device = SND_DEVICE_IN_HDMI_MIC; in platform_get_input_snd_device()
3564 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC; in platform_get_input_snd_device()
3566 snd_device = SND_DEVICE_IN_SPEAKER_MIC; in platform_get_input_snd_device()
3570 snd_device = SND_DEVICE_IN_HANDSET_MIC; in platform_get_input_snd_device()
3574 ALOGV("%s: exit: in_snd_device(%s)", __func__, device_table[snd_device]); in platform_get_input_snd_device()
3575 return snd_device; in platform_get_input_snd_device()
4211 snd_device_t snd_device, in platform_set_backend_cfg() argument
4216 const int backend_idx = platform_get_backend_index(snd_device); in platform_set_backend_cfg()
4228 platform_get_snd_device_name(snd_device)); in platform_set_backend_cfg()
4376 static int platform_get_snd_device_bit_width(snd_device_t snd_device) in platform_get_snd_device_bit_width() argument
4378 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) { in platform_get_snd_device_bit_width()
4379 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device); in platform_get_snd_device_bit_width()
4383 return backend_bit_width_table[snd_device]; in platform_get_snd_device_bit_width()
4472 snd_device_t snd_device, in pick_playback_cfg_for_uc() argument
4491 if (platform_check_backends_match(snd_device, uc->out_snd_device)) { in pick_playback_cfg_for_uc()
4529 snd_device_t snd_device, in platform_check_playback_backend_cfg() argument
4540 if (snd_device == SND_DEVICE_OUT_BT_SCO || in platform_check_playback_backend_cfg()
4541 snd_device == SND_DEVICE_OUT_BT_SCO_WB) { in platform_check_playback_backend_cfg()
4546 backend_idx = platform_get_backend_index(snd_device); in platform_check_playback_backend_cfg()
4554 platform_get_snd_device_name(snd_device)); in platform_check_playback_backend_cfg()
4572 pick_playback_cfg_for_uc(adev, usecase, snd_device, in platform_check_playback_backend_cfg()
4605 bit_width = platform_get_snd_device_bit_width(snd_device); in platform_check_playback_backend_cfg()
4634 struct audio_usecase *usecase, snd_device_t snd_device) in platform_check_and_set_playback_backend_cfg() argument
4643 backend_idx = platform_get_backend_index(snd_device); in platform_check_and_set_playback_backend_cfg()
4655 platform_get_snd_device_name(snd_device)); in platform_check_and_set_playback_backend_cfg()
4657 if (platform_can_split_snd_device(snd_device, &num_devices, new_snd_devices) < 0) in platform_check_and_set_playback_backend_cfg()
4658 new_snd_devices[0] = snd_device; in platform_check_and_set_playback_backend_cfg()
4673 struct audio_usecase *usecase, snd_device_t snd_device) in platform_check_and_set_capture_backend_cfg() argument
4675 int backend_idx = platform_get_backend_index(snd_device); in platform_check_and_set_capture_backend_cfg()
4696 platform_get_snd_device_name(snd_device)); in platform_check_and_set_capture_backend_cfg()
4699 ret = platform_set_backend_cfg(adev, snd_device, in platform_check_and_set_capture_backend_cfg()
4852 void platform_check_and_update_copp_sample_rate(void* platform, snd_device_t snd_device, in platform_check_and_update_copp_sample_rate() argument
4856 int backend_idx = platform_get_backend_index(snd_device); in platform_check_and_update_copp_sample_rate()
4873 ALOGI("sn_device %d device sr %d stream sr %d copp sr %d", snd_device, device_sr, stream_sr in platform_check_and_update_copp_sample_rate()