Lines Matching refs:snd_device
390 const char *get_snd_device_name(snd_device_t snd_device)
394 if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)
395 name = device_table[snd_device];
397 ALOGE_IF(name == NULL, "%s: invalid snd device %d", __func__, snd_device);
402 const char *get_snd_device_display_name(snd_device_t snd_device)
404 const char *name = get_snd_device_name(snd_device);
470 snd_device_t snd_device = SND_DEVICE_NONE;
483 snd_device = SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES;
485 snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES;
487 snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET;
489 snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES;
491 snd_device = SND_DEVICE_OUT_BT_SCO;
493 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
495 snd_device = SND_DEVICE_OUT_HANDSET;
497 if (snd_device != SND_DEVICE_NONE) {
505 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
508 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
513 if (snd_device != SND_DEVICE_NONE) {
525 snd_device = SND_DEVICE_OUT_HEADPHONES;
527 snd_device = SND_DEVICE_OUT_SPEAKER;
529 snd_device = SND_DEVICE_OUT_BT_SCO;
531 snd_device = SND_DEVICE_OUT_HANDSET;
536 ALOGV("%s: exit: snd_device(%s)", __func__, device_table[snd_device]);
537 return snd_device;
546 snd_device_t snd_device = SND_DEVICE_NONE;
575 snd_device = SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC;
578 snd_device = SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC;
581 snd_device = SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC;
591 snd_device = SND_DEVICE_IN_HANDSET_MIC;
593 snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC;
595 snd_device = SND_DEVICE_IN_BT_SCO_MIC ;
597 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
602 snd_device = SND_DEVICE_IN_CAMCORDER_MIC;
608 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_1;
610 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_NS_1;
613 if (snd_device == SND_DEVICE_NONE) {
614 snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
617 snd_device = SND_DEVICE_IN_VOICE_REC_HEADSET_MIC;
625 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
628 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
630 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC;
633 snd_device = SND_DEVICE_IN_HEADSET_MIC_AEC;
643 if (snd_device != SND_DEVICE_NONE) {
651 snd_device = SND_DEVICE_IN_HANDSET_MIC;
653 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
655 snd_device = SND_DEVICE_IN_HEADSET_MIC;
657 snd_device = SND_DEVICE_IN_BT_SCO_MIC ;
659 snd_device = SND_DEVICE_IN_HDMI_MIC;
663 snd_device = SND_DEVICE_IN_HANDSET_MIC;
667 snd_device = SND_DEVICE_IN_HANDSET_MIC;
669 snd_device = SND_DEVICE_IN_HEADSET_MIC;
671 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
673 snd_device = SND_DEVICE_IN_HANDSET_MIC;
675 snd_device = SND_DEVICE_IN_BT_SCO_MIC;
679 snd_device = SND_DEVICE_IN_HANDSET_MIC;
683 ALOGV("%s: exit: in_snd_device(%s)", __func__, device_table[snd_device]);
684 return snd_device;
718 snd_device_t snd_device,
723 const char *snd_device_name = get_snd_device_name(snd_device);
728 adev->snd_dev_ref_cnt[snd_device]++;
729 if (adev->snd_dev_ref_cnt[snd_device] > 1) {
730 ALOGV("%s: snd_device(%d: %s) is already active",
731 __func__, snd_device, snd_device_name);
735 ALOGV("%s: snd_device(%d: %s)", __func__,
736 snd_device, snd_device_name);
750 snd_device_t snd_device,
755 const char *snd_device_name = get_snd_device_name(snd_device);
760 if (adev->snd_dev_ref_cnt[snd_device] <= 0) {
764 adev->snd_dev_ref_cnt[snd_device]--;
765 if (adev->snd_dev_ref_cnt[snd_device] == 0) {
766 ALOGV("%s: snd_device(%d: %s)", __func__,
767 snd_device, snd_device_name);