|
|
@ -39,6 +39,8 @@ |
|
|
|
#include <cutils/sched_policy.h> |
|
|
|
#include <cutils/sched_policy.h> |
|
|
|
#include <cutils/properties.h> |
|
|
|
#include <cutils/properties.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <samsung_audio.h> |
|
|
|
|
|
|
|
|
|
|
|
#include <hardware/audio_effect.h> |
|
|
|
#include <hardware/audio_effect.h> |
|
|
|
#include <system/thread_defs.h> |
|
|
|
#include <system/thread_defs.h> |
|
|
|
#include <audio_effects/effect_aec.h> |
|
|
|
#include <audio_effects/effect_aec.h> |
|
|
@ -64,7 +66,7 @@ static struct pcm_device_profile pcm_device_playback = { |
|
|
|
.avail_min = PLAYBACK_AVAILABLE_MIN, |
|
|
|
.avail_min = PLAYBACK_AVAILABLE_MIN, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 9, |
|
|
|
.id = SOUND_PLAYBACK_DEVICE, |
|
|
|
.type = PCM_PLAYBACK, |
|
|
|
.type = PCM_PLAYBACK, |
|
|
|
.devices = AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE| |
|
|
|
.devices = AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE| |
|
|
|
AUDIO_DEVICE_OUT_SPEAKER, |
|
|
|
AUDIO_DEVICE_OUT_SPEAKER, |
|
|
@ -83,7 +85,7 @@ static struct pcm_device_profile pcm_device_capture = { |
|
|
|
.avail_min = 0, |
|
|
|
.avail_min = 0, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 0, |
|
|
|
.id = SOUND_CAPTURE_DEVICE, |
|
|
|
.type = PCM_CAPTURE, |
|
|
|
.type = PCM_CAPTURE, |
|
|
|
.devices = AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC, |
|
|
|
.devices = AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC, |
|
|
|
}; |
|
|
|
}; |
|
|
@ -101,11 +103,12 @@ static struct pcm_device_profile pcm_device_capture_low_latency = { |
|
|
|
.avail_min = 0, |
|
|
|
.avail_min = 0, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 0, |
|
|
|
.id = SOUND_CAPTURE_DEVICE, |
|
|
|
.type = PCM_CAPTURE_LOW_LATENCY, |
|
|
|
.type = PCM_CAPTURE_LOW_LATENCY, |
|
|
|
.devices = AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC, |
|
|
|
.devices = AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SOUND_CAPTURE_LOOPBACK_AEC_DEVICE |
|
|
|
static struct pcm_device_profile pcm_device_capture_loopback_aec = { |
|
|
|
static struct pcm_device_profile pcm_device_capture_loopback_aec = { |
|
|
|
.config = { |
|
|
|
.config = { |
|
|
|
.channels = CAPTURE_DEFAULT_CHANNEL_COUNT, |
|
|
|
.channels = CAPTURE_DEFAULT_CHANNEL_COUNT, |
|
|
@ -119,10 +122,11 @@ static struct pcm_device_profile pcm_device_capture_loopback_aec = { |
|
|
|
.avail_min = 0, |
|
|
|
.avail_min = 0, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 1, |
|
|
|
.id = SOUND_CAPTURE_LOOPBACK_AEC_DEVICE, |
|
|
|
.type = PCM_CAPTURE, |
|
|
|
.type = PCM_CAPTURE, |
|
|
|
.devices = SND_DEVICE_IN_LOOPBACK_AEC, |
|
|
|
.devices = SND_DEVICE_IN_LOOPBACK_AEC, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
static struct pcm_device_profile pcm_device_playback_sco = { |
|
|
|
static struct pcm_device_profile pcm_device_playback_sco = { |
|
|
|
.config = { |
|
|
|
.config = { |
|
|
@ -137,7 +141,7 @@ static struct pcm_device_profile pcm_device_playback_sco = { |
|
|
|
.avail_min = SCO_AVAILABLE_MIN, |
|
|
|
.avail_min = SCO_AVAILABLE_MIN, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 2, |
|
|
|
.id = SOUND_PLAYBACK_SCO_DEVICE, |
|
|
|
.type = PCM_PLAYBACK, |
|
|
|
.type = PCM_PLAYBACK, |
|
|
|
.devices = |
|
|
|
.devices = |
|
|
|
AUDIO_DEVICE_OUT_BLUETOOTH_SCO|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET| |
|
|
|
AUDIO_DEVICE_OUT_BLUETOOTH_SCO|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET| |
|
|
@ -157,11 +161,12 @@ static struct pcm_device_profile pcm_device_capture_sco = { |
|
|
|
.avail_min = 0, |
|
|
|
.avail_min = 0, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 2, |
|
|
|
.id = SOUND_CAPTURE_SCO_DEVICE, |
|
|
|
.type = PCM_CAPTURE, |
|
|
|
.type = PCM_CAPTURE, |
|
|
|
.devices = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET, |
|
|
|
.devices = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SOUND_CAPTURE_HOTWORD_DEVICE |
|
|
|
static struct pcm_device_profile pcm_device_hotword_streaming = { |
|
|
|
static struct pcm_device_profile pcm_device_hotword_streaming = { |
|
|
|
.config = { |
|
|
|
.config = { |
|
|
|
.channels = 1, |
|
|
|
.channels = 1, |
|
|
@ -175,10 +180,11 @@ static struct pcm_device_profile pcm_device_hotword_streaming = { |
|
|
|
.avail_min = 0, |
|
|
|
.avail_min = 0, |
|
|
|
}, |
|
|
|
}, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.card = SOUND_CARD, |
|
|
|
.id = 0, |
|
|
|
.id = SOUND_CAPTURE_HOTWORD_DEVICE, |
|
|
|
.type = PCM_HOTWORD_STREAMING, |
|
|
|
.type = PCM_HOTWORD_STREAMING, |
|
|
|
.devices = AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC |
|
|
|
.devices = AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BACK_MIC |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
static struct pcm_device_profile * const pcm_devices[] = { |
|
|
|
static struct pcm_device_profile * const pcm_devices[] = { |
|
|
|
&pcm_device_playback, |
|
|
|
&pcm_device_playback, |
|
|
@ -186,8 +192,12 @@ static struct pcm_device_profile * const pcm_devices[] = { |
|
|
|
&pcm_device_capture_low_latency, |
|
|
|
&pcm_device_capture_low_latency, |
|
|
|
&pcm_device_playback_sco, |
|
|
|
&pcm_device_playback_sco, |
|
|
|
&pcm_device_capture_sco, |
|
|
|
&pcm_device_capture_sco, |
|
|
|
|
|
|
|
#ifdef SOUND_CAPTURE_LOOPBACK_AEC_DEVICE |
|
|
|
&pcm_device_capture_loopback_aec, |
|
|
|
&pcm_device_capture_loopback_aec, |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef SOUND_CAPTURE_HOTWORD_DEVICE |
|
|
|
&pcm_device_hotword_streaming, |
|
|
|
&pcm_device_hotword_streaming, |
|
|
|
|
|
|
|
#endif |
|
|
|
NULL, |
|
|
|
NULL, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|