Lines Matching defs:snd_device
567 static struct operator_specific_device *get_operator_specific_device(snd_device_t snd_device)
578 list_for_each(node, operator_specific_device_table[snd_device]) {
588 static int get_operator_specific_device_acdb_id(snd_device_t snd_device)
591 int ret = acdb_device_table[snd_device];
593 device = get_operator_specific_device(snd_device);
600 static const char *get_operator_specific_device_mixer_path(snd_device_t snd_device)
603 const char *ret = device_table[snd_device];
605 device = get_operator_specific_device(snd_device);
621 snd_device_t snd_device = SND_DEVICE_NONE;
631 snd_device = platform_get_output_snd_device(adev->platform, out_device);
632 platform_add_backend_name(adev->platform, my_data->ec_ref_mixer_path, snd_device);
1061 const char *platform_get_snd_device_name(snd_device_t snd_device)
1063 if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX) {
1064 if (operator_specific_device_table[snd_device] != NULL) {
1065 return get_operator_specific_device_mixer_path(snd_device);
1067 return device_table[snd_device];
1072 int platform_get_snd_device_name_extn(void *platform, snd_device_t snd_device,
1079 strlcpy(device_name, platform_get_snd_device_name(snd_device),
1081 } else if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX) {
1082 if (operator_specific_device_table[snd_device] != NULL) {
1083 strlcpy(device_name, get_operator_specific_device_mixer_path(snd_device),
1086 strlcpy(device_name, device_table[snd_device], DEVICE_NAME_MAX_SIZE);
1088 hw_info_append_hw_type(my_data->hw_info, snd_device, device_name);
1099 snd_device_t snd_device __unused)
1106 snd_device_t snd_device __unused)
1123 snd_device_t snd_device)
1128 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) {
1129 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device);
1133 const char * suffix = backend_table[snd_device];
1150 ALOGE("%s: Invalid snd_device = %s", __func__,
1155 ALOGE("%s: Invalid snd_device = %s", __func__,
1227 void platform_add_operator_specific_device(snd_device_t snd_device,
1234 if (operator_specific_device_table[snd_device] == NULL) {
1235 operator_specific_device_table[snd_device] =
1237 list_init(operator_specific_device_table[snd_device]);
1246 list_add_tail(operator_specific_device_table[snd_device], &device->list);
1249 platform_get_snd_device_name(snd_device), operator, mixer_path, acdb_id);
1253 int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id)
1257 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) {
1258 ALOGE("%s: Invalid snd_device = %d",
1259 __func__, snd_device);
1264 platform_get_snd_device_name(snd_device), acdb_device_table[snd_device], acdb_id);
1265 acdb_device_table[snd_device] = acdb_id;
1284 int platform_get_snd_device_acdb_id(snd_device_t snd_device)
1286 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) {
1287 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device);
1291 if (operator_specific_device_table[snd_device] != NULL)
1292 return get_operator_specific_device_acdb_id(snd_device);
1294 return acdb_device_table[snd_device];
1297 int platform_send_audio_calibration(void *platform, snd_device_t snd_device)
1303 acdb_dev_id = acdb_device_table[audio_extn_get_spkr_prot_snd_device(snd_device)];
1306 __func__, snd_device);
1309 ALOGV("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
1310 __func__, snd_device, acdb_dev_id);
1311 if (snd_device >= SND_DEVICE_OUT_BEGIN && snd_device < SND_DEVICE_OUT_END)
1317 (snd_device == SND_DEVICE_IN_VOICE_SPEAKER_MIC_HFP) &&
1325 (snd_device == SND_DEVICE_OUT_VOICE_SPEAKER_HFP) &&
1328 ALOGV("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
1329 __func__, snd_device, acdb_dev_id);
1402 snd_device_t snd_device __unused,
1505 int platform_can_split_snd_device(snd_device_t snd_device,
1520 if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES &&
1526 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_LINE &&
1541 snd_device_t snd_device = SND_DEVICE_NONE;
1557 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
1560 snd_device = SND_DEVICE_OUT_SPEAKER_AND_LINE;
1563 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
1566 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HDMI;
1569 snd_device = SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET;
1574 if (snd_device != SND_DEVICE_NONE) {
1591 snd_device = SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES;
1594 snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES;
1597 snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET;
1604 snd_device = SND_DEVICE_OUT_VOICE_LINE;
1606 snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES;
1610 snd_device = SND_DEVICE_OUT_BT_SCO_WB;
1612 snd_device = SND_DEVICE_OUT_BT_SCO;
1615 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_HFP;
1617 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
1620 snd_device = SND_DEVICE_OUT_USB_HEADSET;
1622 snd_device = SND_DEVICE_OUT_VOICE_HANDSET;
1624 snd_device = SND_DEVICE_OUT_VOICE_TX;
1626 if (snd_device != SND_DEVICE_NONE) {
1633 snd_device = SND_DEVICE_OUT_HEADPHONES;
1635 snd_device = SND_DEVICE_OUT_LINE;
1638 snd_device = SND_DEVICE_OUT_SPEAKER_REVERSE;
1640 snd_device = SND_DEVICE_OUT_SPEAKER;
1643 snd_device = SND_DEVICE_OUT_BT_SCO_WB;
1645 snd_device = SND_DEVICE_OUT_BT_SCO;
1647 snd_device = SND_DEVICE_OUT_HDMI ;
1650 snd_device = SND_DEVICE_OUT_USB_HEADSET;
1652 snd_device = SND_DEVICE_OUT_HANDSET;
1657 ALOGV("%s: exit: snd_device(%s)", __func__, device_table[snd_device]);
1658 return snd_device;
1674 snd_device_t snd_device = SND_DEVICE_NONE;
1688 snd_device = SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC;
1691 snd_device = SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC;
1694 snd_device = SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC;
1708 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1712 snd_device = SND_DEVICE_IN_VOICE_DMIC;
1716 snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC;
1722 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC;
1724 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
1727 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC;
1729 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
1737 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_QMIC;
1741 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE;
1743 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC;
1746 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
1748 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC_HFP;
1751 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
1755 snd_device = SND_DEVICE_IN_VOICE_RX;
1761 snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
1763 snd_device = SND_DEVICE_IN_CAMCORDER_MIC;
1768 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_STEREO;
1771 snd_device = SND_DEVICE_IN_VOICE_REC_MIC_NS;
1774 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE;
1777 snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
1791 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS;
1794 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE;
1796 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS;
1800 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC_NS;
1803 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC_NS;
1806 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC_NS;
1808 snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
1816 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_AEC;
1819 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE;
1821 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC;
1825 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
1828 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC;
1831 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC;
1833 snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
1841 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_NS;
1844 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE;
1846 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS;
1850 snd_device = SND_DEVICE_IN_SPEAKER_MIC_NS;
1853 snd_device = SND_DEVICE_IN_HANDSET_DMIC_NS;
1856 snd_device = SND_DEVICE_IN_HANDSET_MIC_NS;
1858 snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
1865 snd_device = SND_DEVICE_IN_CAPTURE_FM;
1871 if (snd_device != SND_DEVICE_NONE) {
1881 snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
1883 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1885 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
1887 snd_device = SND_DEVICE_IN_HEADSET_MIC;
1891 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC;
1893 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
1896 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC;
1898 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
1901 snd_device = SND_DEVICE_IN_HDMI_MIC;
1904 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC;
1906 snd_device = SND_DEVICE_IN_CAPTURE_FM;
1910 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1914 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1916 snd_device = SND_DEVICE_IN_HEADSET_MIC;
1919 snd_device = SND_DEVICE_IN_SPEAKER_STEREO_DMIC;
1921 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
1924 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1928 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC;
1930 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
1933 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC;
1935 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
1938 snd_device = SND_DEVICE_IN_HDMI_MIC;
1941 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC;
1945 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1949 ALOGV("%s: exit: in_snd_device(%s)", __func__, device_table[snd_device]);
1950 return snd_device;
2146 ALOGE("%s: Invalid snd_device = %d",