Lines Matching refs:snd_device
577 static struct operator_specific_device *get_operator_specific_device(snd_device_t snd_device)
588 list_for_each(node, operator_specific_device_table[snd_device]) {
598 static int get_operator_specific_device_acdb_id(snd_device_t snd_device)
601 int ret = acdb_device_table[snd_device];
603 device = get_operator_specific_device(snd_device);
610 static const char *get_operator_specific_device_mixer_path(snd_device_t snd_device)
613 const char *ret = device_table[snd_device];
615 device = get_operator_specific_device(snd_device);
631 snd_device_t snd_device = SND_DEVICE_NONE;
641 snd_device = platform_get_output_snd_device(adev->platform, out_device);
642 platform_add_backend_name(adev->platform, my_data->ec_ref_mixer_path, snd_device);
1074 const char *platform_get_snd_device_name(snd_device_t snd_device)
1076 if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX) {
1077 if (operator_specific_device_table[snd_device] != NULL) {
1078 return get_operator_specific_device_mixer_path(snd_device);
1080 return device_table[snd_device];
1085 int platform_get_snd_device_name_extn(void *platform, snd_device_t snd_device,
1092 strlcpy(device_name, platform_get_snd_device_name(snd_device),
1094 } else if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX) {
1095 if (operator_specific_device_table[snd_device] != NULL) {
1096 strlcpy(device_name, get_operator_specific_device_mixer_path(snd_device),
1099 strlcpy(device_name, device_table[snd_device], DEVICE_NAME_MAX_SIZE);
1101 hw_info_append_hw_type(my_data->hw_info, snd_device, device_name);
1112 snd_device_t snd_device __unused)
1119 snd_device_t snd_device __unused)
1136 snd_device_t snd_device)
1141 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) {
1142 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device);
1146 const char * suffix = backend_table[snd_device];
1163 ALOGE("%s: Invalid snd_device = %s", __func__,
1168 ALOGE("%s: Invalid snd_device = %s", __func__,
1244 void platform_add_operator_specific_device(snd_device_t snd_device,
1251 if (operator_specific_device_table[snd_device] == NULL) {
1252 operator_specific_device_table[snd_device] =
1254 list_init(operator_specific_device_table[snd_device]);
1263 list_add_tail(operator_specific_device_table[snd_device], &device->list);
1266 platform_get_snd_device_name(snd_device), operator, mixer_path, acdb_id);
1270 int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id)
1274 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) {
1275 ALOGE("%s: Invalid snd_device = %d",
1276 __func__, snd_device);
1281 platform_get_snd_device_name(snd_device), acdb_device_table[snd_device], acdb_id);
1282 acdb_device_table[snd_device] = acdb_id;
1301 int platform_get_snd_device_acdb_id(snd_device_t snd_device)
1303 if ((snd_device < SND_DEVICE_MIN) || (snd_device >= SND_DEVICE_MAX)) {
1304 ALOGE("%s: Invalid snd_device = %d", __func__, snd_device);
1308 if (operator_specific_device_table[snd_device] != NULL)
1309 return get_operator_specific_device_acdb_id(snd_device);
1311 return acdb_device_table[snd_device];
1314 int platform_send_audio_calibration(void *platform, snd_device_t snd_device)
1320 acdb_dev_id = acdb_device_table[audio_extn_get_spkr_prot_snd_device(snd_device)];
1323 __func__, snd_device);
1326 ALOGV("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
1327 __func__, snd_device, acdb_dev_id);
1328 if (snd_device >= SND_DEVICE_OUT_BEGIN && snd_device < SND_DEVICE_OUT_END)
1334 (snd_device == SND_DEVICE_IN_VOICE_SPEAKER_MIC_HFP) &&
1342 (snd_device == SND_DEVICE_OUT_VOICE_SPEAKER_HFP) &&
1345 ALOGV("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
1346 __func__, snd_device, acdb_dev_id);
1419 snd_device_t snd_device __unused,
1522 int platform_can_split_snd_device(snd_device_t snd_device,
1537 if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES &&
1543 } else if (snd_device == SND_DEVICE_OUT_SPEAKER_AND_LINE &&
1558 snd_device_t snd_device = SND_DEVICE_NONE;
1574 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
1577 snd_device = SND_DEVICE_OUT_SPEAKER_AND_LINE;
1580 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
1583 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HDMI;
1586 snd_device = SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET;
1591 if (snd_device != SND_DEVICE_NONE) {
1608 snd_device = SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES;
1611 snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES;
1614 snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET;
1621 snd_device = SND_DEVICE_OUT_VOICE_LINE;
1623 snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES;
1627 snd_device = SND_DEVICE_OUT_BT_SCO_WB;
1629 snd_device = SND_DEVICE_OUT_BT_SCO;
1632 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_HFP;
1634 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
1637 snd_device = SND_DEVICE_OUT_USB_HEADSET;
1639 snd_device = SND_DEVICE_OUT_VOICE_HANDSET;
1641 snd_device = SND_DEVICE_OUT_VOICE_TX;
1643 if (snd_device != SND_DEVICE_NONE) {
1650 snd_device = SND_DEVICE_OUT_HEADPHONES;
1652 snd_device = SND_DEVICE_OUT_LINE;
1655 snd_device = SND_DEVICE_OUT_SPEAKER_REVERSE;
1657 snd_device = SND_DEVICE_OUT_SPEAKER;
1660 snd_device = SND_DEVICE_OUT_BT_SCO_WB;
1662 snd_device = SND_DEVICE_OUT_BT_SCO;
1664 snd_device = SND_DEVICE_OUT_HDMI ;
1667 snd_device = SND_DEVICE_OUT_USB_HEADSET;
1669 snd_device = SND_DEVICE_OUT_HANDSET;
1674 ALOGV("%s: exit: snd_device(%s)", __func__, device_table[snd_device]);
1675 return snd_device;
1691 snd_device_t snd_device = SND_DEVICE_NONE;
1705 snd_device = SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC;
1708 snd_device = SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC;
1711 snd_device = SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC;
1725 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1729 snd_device
1733 snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC;
1739 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC;
1741 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
1744 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC;
1746 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
1754 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_QMIC;
1758 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE;
1760 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC;
1763 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
1765 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC_HFP;
1768 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
1772 snd_device = SND_DEVICE_IN_VOICE_RX;
1778 snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
1780 snd_device = SND_DEVICE_IN_CAMCORDER_MIC;
1785 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_STEREO;
1788 snd_device = SND_DEVICE_IN_VOICE_REC_MIC_NS;
1791 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE;
1794 snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
1808 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS;
1811 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE;
1813 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS;
1817 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC_NS;
1820 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC_NS;
1823 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC_NS;
1825 snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
1833 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_AEC;
1836 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE;
1838 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC;
1842 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
1845 snd_device = SND_DEVICE_IN_HANDSET_DMIC_AEC;
1848 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC;
1850 snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
1858 snd_device = SND_DEVICE_IN_SPEAKER_QMIC_NS;
1861 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE;
1863 snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS;
1867 snd_device = SND_DEVICE_IN_SPEAKER_MIC_NS;
1870 snd_device = SND_DEVICE_IN_HANDSET_DMIC_NS;
1873 snd_device = SND_DEVICE_IN_HANDSET_MIC_NS;
1875 snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
1882 snd_device = SND_DEVICE_IN_CAPTURE_FM;
1888 if (snd_device != SND_DEVICE_NONE) {
1898 snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
1900 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1902 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
1904 snd_device = SND_DEVICE_IN_HEADSET_MIC;
1908 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC;
1910 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
1913 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC;
1915 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
1918 snd_device = SND_DEVICE_IN_HDMI_MIC;
1921 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC;
1923 snd_device = SND_DEVICE_IN_CAPTURE_FM;
1927 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1931 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1933 snd_device = SND_DEVICE_IN_HEADSET_MIC;
1936 snd_device = SND_DEVICE_IN_SPEAKER_STEREO_DMIC;
1938 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
1941 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1945 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB_NREC;
1947 snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
1950 snd_device = SND_DEVICE_IN_BT_SCO_MIC_NREC;
1952 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
1955 snd_device = SND_DEVICE_IN_HDMI_MIC;
1958 snd_device = SND_DEVICE_IN_USB_HEADSET_MIC;
1962 snd_device = SND_DEVICE_IN_HANDSET_MIC;
1966 ALOGV("%s: exit: in_snd_device(%s)", __func__, device_table[snd_device]);
1967 return snd_device;
2163 ALOGE("%s: Invalid snd_device = %d",
2371 snd_device_t snd_device __unused,
2378 int platform_get_snd_device_backend_index(snd_device_t snd_device __unused)