Lines Matching refs:snd_device
364 const char *get_snd_device_name(snd_device_t snd_device)
368 if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)
369 name = device_table[snd_device];
371 ALOGE_IF(name == NULL, "%s: invalid snd device %d", __func__, snd_device);
376 const char *get_snd_device_display_name(snd_device_t snd_device)
378 const char *name = get_snd_device_name(snd_device);
449 snd_device_t snd_device = SND_DEVICE_NONE;
462 snd_device = SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES;
464 snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES;
466 snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET;
468 snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES;
470 snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
472 snd_device = SND_DEVICE_OUT_HANDSET;
474 if (snd_device != SND_DEVICE_NONE) {
482 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
485 snd_device = SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES;
490 if (snd_device != SND_DEVICE_NONE) {
502 snd_device = SND_DEVICE_OUT_HEADPHONES;
504 snd_device = SND_DEVICE_OUT_SPEAKER;
506 snd_device = SND_DEVICE_OUT_HANDSET;
511 ALOGV("%s: exit: snd_device(%s)", __func__, device_table[snd_device]);
512 snd_device;
521 snd_device_t snd_device = SND_DEVICE_NONE;
550 snd_device = SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC;
553 snd_device = SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC;
556 snd_device = SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC;
566 snd_device = SND_DEVICE_IN_HANDSET_MIC;
568 snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC;
570 snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
575 snd_device = SND_DEVICE_IN_CAMCORDER_MIC;
581 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_1;
583 snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_NS_1;
586 if (snd_device == SND_DEVICE_NONE) {
587 snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
590 snd_device = SND_DEVICE_IN_VOICE_REC_HEADSET_MIC;
598 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
601 snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
603 snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC;
606 snd_device = SND_DEVICE_IN_HEADSET_MIC_AEC;
616 if (snd_device != SND_DEVICE_NONE) {
624 snd_device = SND_DEVICE_IN_HANDSET_MIC;
626 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
628 snd_device = SND_DEVICE_IN_HEADSET_MIC;
630 snd_device = SND_DEVICE_IN_HDMI_MIC;
634 snd_device = SND_DEVICE_IN_HANDSET_MIC;
638 snd_device = SND_DEVICE_IN_HANDSET_MIC;
640 snd_device = SND_DEVICE_IN_HEADSET_MIC;
642 snd_device = SND_DEVICE_IN_SPEAKER_MIC;
644 snd_device = SND_DEVICE_IN_HANDSET_MIC;
648 snd_device = SND_DEVICE_IN_HANDSET_MIC;
652 ALOGV("%s: exit: in_snd_device(%s)", __func__, device_table[snd_device]);
653 return snd_device;
687 snd_device_t snd_device,
692 const char *snd_device_name = get_snd_device_name(snd_device);
697 adev->snd_dev_ref_cnt[snd_device]++;
698 if (adev->snd_dev_ref_cnt[snd_device] > 1) {
699 ALOGV("%s: snd_device(%d: %s) is already active",
700 __func__, snd_device, snd_device_name);
704 ALOGV("%s: snd_device(%d: %s)", __func__,
705 snd_device, snd_device_name);
719 snd_device_t snd_device,
724 const char *snd_device_name = get_snd_device_name(snd_device);
729 if (adev->snd_dev_ref_cnt[snd_device] <= 0) {
733 adev->snd_dev_ref_cnt[snd_device]--;
734 if (adev->snd_dev_ref_cnt[snd_device] == 0) {
735 ALOGV("%s: snd_device(%d: %s)", __func__,
736 snd_device, snd_device_name);