hal: Update FM record usecase in open input stream.
FM record usecase fails after 2nd iteration as audio-record usecase is overridden by FM record usecase in start input stream, due to which the second record session goes through compress record and fails. Update FM record usecase in open input stream instead of doing it in start input stream. Change-Id: I5467a3a74af8067fc1e4341c3e19a37eeefa5322
This commit is contained in:
parent
7c52d43779
commit
0aa07ab8a0
|
@ -8043,6 +8043,16 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
|
|||
in->format = config->format;
|
||||
|
||||
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 &&
|
||||
(flags & AUDIO_INPUT_FLAG_FAST) != 0) {
|
||||
is_low_latency = true;
|
||||
|
|
Loading…
Reference in New Issue