hal: add FM_TUNER capture support
Add FM_TUNER as supported capture source and device. Change-Id: I575125ca485d41b04e31d60f37619037329b0895
This commit is contained in:
parent
d028157708
commit
5bba6cbc20
|
@ -2603,7 +2603,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
|
|||
}
|
||||
}
|
||||
} else if (source == AUDIO_SOURCE_FM_RX ||
|
||||
source == AUDIO_SOURCE_FM_RX_A2DP) {
|
||||
source == AUDIO_SOURCE_FM_RX_A2DP ||
|
||||
source == AUDIO_SOURCE_FM_TUNER) {
|
||||
snd_device = SND_DEVICE_IN_CAPTURE_FM;
|
||||
} else if (source == AUDIO_SOURCE_DEFAULT) {
|
||||
goto exit;
|
||||
|
@ -2646,7 +2647,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
|
|||
} else if (in_device & AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET ||
|
||||
in_device & AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET) {
|
||||
snd_device = SND_DEVICE_IN_USB_HEADSET_MIC;
|
||||
} else if (in_device & AUDIO_DEVICE_IN_FM_RX) {
|
||||
} else if (in_device & AUDIO_DEVICE_IN_FM_RX ||
|
||||
in_device & AUDIO_DEVICE_IN_FM_TUNER) {
|
||||
snd_device = SND_DEVICE_IN_CAPTURE_FM;
|
||||
} else {
|
||||
ALOGE("%s: Unknown input device(s) %#x", __func__, in_device);
|
||||
|
@ -3297,7 +3299,8 @@ int64_t platform_render_latency(audio_usecase_t usecase)
|
|||
int platform_update_usecase_from_source(int source, int usecase)
|
||||
{
|
||||
ALOGV("%s: input source :%d", __func__, source);
|
||||
if(source == AUDIO_SOURCE_FM_RX_A2DP)
|
||||
if (source == AUDIO_SOURCE_FM_RX_A2DP ||
|
||||
source == AUDIO_SOURCE_FM_TUNER)
|
||||
usecase = USECASE_AUDIO_RECORD_FM_VIRTUAL;
|
||||
return usecase;
|
||||
}
|
||||
|
|
|
@ -2508,7 +2508,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
|
|||
}
|
||||
}
|
||||
} else if (source == AUDIO_SOURCE_FM_RX ||
|
||||
source == AUDIO_SOURCE_FM_RX_A2DP) {
|
||||
source == AUDIO_SOURCE_FM_RX_A2DP||
|
||||
source == AUDIO_SOURCE_FM_TUNER) {
|
||||
snd_device = SND_DEVICE_IN_CAPTURE_FM;
|
||||
} else if (source == AUDIO_SOURCE_DEFAULT) {
|
||||
goto exit;
|
||||
|
@ -2551,7 +2552,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
|
|||
} else if (in_device & AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET ||
|
||||
in_device & AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET) {
|
||||
snd_device = SND_DEVICE_IN_USB_HEADSET_MIC;
|
||||
} else if (in_device & AUDIO_DEVICE_IN_FM_RX) {
|
||||
} else if (in_device & AUDIO_DEVICE_IN_FM_RX ||
|
||||
in_device & AUDIO_DEVICE_IN_FM_TUNER) {
|
||||
snd_device = SND_DEVICE_IN_CAPTURE_FM;
|
||||
} else {
|
||||
ALOGE("%s: Unknown input device(s) %#x", __func__, in_device);
|
||||
|
@ -3227,7 +3229,8 @@ int64_t platform_render_latency(audio_usecase_t usecase)
|
|||
int platform_update_usecase_from_source(int source, int usecase)
|
||||
{
|
||||
ALOGV("%s: input source :%d", __func__, source);
|
||||
if(source == AUDIO_SOURCE_FM_RX_A2DP)
|
||||
if (source == AUDIO_SOURCE_FM_RX_A2DP ||
|
||||
source == AUDIO_SOURCE_FM_TUNER)
|
||||
usecase = USECASE_AUDIO_RECORD_FM_VIRTUAL;
|
||||
return usecase;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue