Merge "hal: Update FM record usecase in open input stream." into audio-hal.lnx.6.0
This commit is contained in:
commit
fd6d3e4fdf
|
@ -8043,6 +8043,16 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
|
||||||
in->format = config->format;
|
in->format = config->format;
|
||||||
|
|
||||||
in->usecase = USECASE_AUDIO_RECORD;
|
in->usecase = USECASE_AUDIO_RECORD;
|
||||||
|
|
||||||
|
if (in->source == AUDIO_SOURCE_FM_TUNER) {
|
||||||
|
if(!get_usecase_from_list(adev, USECASE_AUDIO_RECORD_FM_VIRTUAL))
|
||||||
|
in->usecase = USECASE_AUDIO_RECORD_FM_VIRTUAL;
|
||||||
|
else {
|
||||||
|
ret = -EINVAL;
|
||||||
|
goto err_open;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (config->sample_rate == LOW_LATENCY_CAPTURE_SAMPLE_RATE &&
|
if (config->sample_rate == LOW_LATENCY_CAPTURE_SAMPLE_RATE &&
|
||||||
(flags & AUDIO_INPUT_FLAG_FAST) != 0) {
|
(flags & AUDIO_INPUT_FLAG_FAST) != 0) {
|
||||||
is_low_latency = true;
|
is_low_latency = true;
|
||||||
|
|
Loading…
Reference in New Issue