audio: Remove unused audio routes

Change-Id: Ia3670f075369eb721e12588c5c6f0b3525a51e67
tirimbino
Andreas Schneider 8 years ago
parent a366011f60
commit 7cc49b4fb2
  1. 12
      audio/audio_hw.c
  2. 8
      audio/audio_hw.h

@ -297,12 +297,8 @@ static const char * const device_table[SND_DEVICE_MAX] = {
[SND_DEVICE_IN_HDMI_MIC] = "hdmi-mic",
[SND_DEVICE_IN_BT_SCO_MIC] = "bt-sco-mic",
[SND_DEVICE_IN_CAMCORDER_MIC] = "camcorder-mic",
[SND_DEVICE_IN_VOICE_DMIC_1] = "voice-dmic-1",
[SND_DEVICE_IN_VOICE_SPEAKER_DMIC_1] = "voice-speaker-dmic-1",
[SND_DEVICE_IN_VOICE_REC_HEADSET_MIC] = "voice-rec-headset-mic",
[SND_DEVICE_IN_VOICE_REC_MIC] = "voice-rec-mic",
[SND_DEVICE_IN_VOICE_REC_DMIC_1] = "voice-rec-dmic-1",
[SND_DEVICE_IN_VOICE_REC_DMIC_NS_1] = "voice-rec-dmic-ns-1",
[SND_DEVICE_IN_LOOPBACK_AEC] = "loopback-aec",
};
@ -595,13 +591,6 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device
}
} else if (source == AUDIO_SOURCE_VOICE_RECOGNITION) {
if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) {
if (adev->dualmic_config == DUALMIC_CONFIG_1) {
if (channel_mask == AUDIO_CHANNEL_IN_FRONT_BACK)
snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_1;
else if (adev->ns_in_voice_rec)
snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_NS_1;
}
if (snd_device == SND_DEVICE_NONE) {
snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
}
@ -4210,7 +4199,6 @@ static int adev_open(const hw_module_t *module, const char *name,
return -ENOMEM;
}
adev->dualmic_config = DUALMIC_CONFIG_NONE;
adev->ns_in_voice_rec = false;
list_init(&adev->usecase_list);

@ -53,9 +53,6 @@ struct effect_info_s {
#define SOUND_TRIGGER_HAL_LIBRARY_PATH "/system/lib/hw/sound_trigger.primary.flounder.so"
#endif
#define DUALMIC_CONFIG_NONE 0
#define DUALMIC_CONFIG_1 1
/* Sound devices specific to the platform
* The DEVICE_OUT_* and DEVICE_IN_* should be mapped to these sound
* devices to enable corresponding mixer paths
@ -95,12 +92,8 @@ enum {
SND_DEVICE_IN_HDMI_MIC,
SND_DEVICE_IN_BT_SCO_MIC,
SND_DEVICE_IN_CAMCORDER_MIC,
SND_DEVICE_IN_VOICE_DMIC_1,
SND_DEVICE_IN_VOICE_SPEAKER_DMIC_1,
SND_DEVICE_IN_VOICE_REC_HEADSET_MIC,
SND_DEVICE_IN_VOICE_REC_MIC,
SND_DEVICE_IN_VOICE_REC_DMIC_1,
SND_DEVICE_IN_VOICE_REC_DMIC_NS_1,
SND_DEVICE_IN_LOOPBACK_AEC,
SND_DEVICE_IN_END,
@ -391,7 +384,6 @@ struct audio_device {
struct listnode usecase_list;
bool speaker_lr_swap;
unsigned int cur_hdmi_channels;
int dualmic_config;
bool ns_in_voice_rec;
void* offload_fx_lib;

Loading…
Cancel
Save