aoc/alsa: change pcm callbacks to be nonatomic
Pcm callbacks such as triggers are atomic by default. Since the mic input start cmd sent to AoC takes more than 50 ms, the spin-lock being used will disable preemption for more than 50ms. So we choose to use mutex to allow preemption. As a result, all the pcm callbacks should be nonatomic and snd_pcm_period_elapsed() should be called within the process context. Changes made here are: - Set pcm->nonatomic as true - Use mutex instead of spin_lock for aoc_audio_control() - Use workqueue to update the pcm hw_ptr Bug: 196817394 Change-Id: Ibc858555b85dedd2560f92cd15e1d059c61f9fce
Loading