diff options
author | yixuanjiang <yixuanjiang@google.com> | 2023-09-04 15:50:08 +0800 |
---|---|---|
committer | Yixuan Jiang <yixuanjiang@google.com> | 2023-11-17 06:52:23 +0000 |
commit | 1574b1a0b85a8ec2742456cd2612201eb7c1500b (patch) | |
tree | fa3e35e2536935c65085a3bc0446dcacba2167f2 | |
parent | d16319dd4b25e5a9f01c823da63c7165ba4c0c0f (diff) | |
download | aoc-1574b1a0b85a8ec2742456cd2612201eb7c1500b.tar.gz |
aoc: remove spatial capture control during stream open/close
move spatial eanble control to mixer control from HAL
Bug: 278650628
Change-Id: Ic8b186235ce7ffe884b82a958faddd013fba7930
Signed-off-by: yixuanjiang <yixuanjiang@google.com>
-rw-r--r-- | alsa/aoc_alsa_hw.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/alsa/aoc_alsa_hw.c b/alsa/aoc_alsa_hw.c index 8da92c6..adbdbcd 100644 --- a/alsa/aoc_alsa_hw.c +++ b/alsa/aoc_alsa_hw.c @@ -2844,8 +2844,6 @@ int aoc_audio_set_params(struct aoc_alsa_stream *alsa_stream, uint32_t channels, uint32_t samplerate, uint32_t bps, bool pcm_float_fmt, int source_mode) { int err = 0; - struct aoc_chip *chip = alsa_stream->chip; - pr_debug("setting channels(%u), samplerate(%u), bits-per-sample(%u)\n", channels, samplerate, bps); @@ -2861,13 +2859,6 @@ int aoc_audio_set_params(struct aoc_alsa_stream *alsa_stream, uint32_t channels, pr_err("ERR:%d capture audio param set fails\n", err); goto exit; } - - /* To deal with recording with spatial module enabled */ - if (chip->mic_spatial_module_enable && !aoc_pcm_is_mmap_raw(alsa_stream)) { - err = aoc_audio_capture_spatial_module_trigger(chip, START); - if (err < 0) - pr_err("ERR:%d mic proc spatial module failed to start!\n", err); - } } exit: @@ -3634,7 +3625,6 @@ int aoc_audio_open(struct aoc_alsa_stream *alsa_stream) int aoc_audio_close(struct aoc_alsa_stream *alsa_stream) { - int err = 0; struct aoc_chip *chip = alsa_stream->chip; struct snd_pcm_substream *substream = alsa_stream->substream; @@ -3643,14 +3633,6 @@ int aoc_audio_close(struct aoc_alsa_stream *alsa_stream) if (alsa_stream->idx == UC_ULTRASONIC_RECORD) ap_record_stop(chip, alsa_stream); else if (ap_filter_capture_stream(alsa_stream)) { - /* Disable spatial module */ - if (chip->mic_spatial_module_enable && !aoc_pcm_is_mmap_raw(alsa_stream)) { - err = aoc_audio_capture_spatial_module_trigger(chip, STOP); - if (err < 0) - pr_err("ERR:%d mic proc spatial module failed to stop!\n", - err); - } - /* Stop the capturing mic*/ if (aoc_audio_capture_active_stream_num(chip) == 0) { pr_info("%s: record stop\n", __func__); |