audio: fix audio driver del_timer BUG_ON crash issue [1/1]
PD#SWPL-972
Problem:
audio crash when ATV switch channel long time burning test
Solution:
there is a risk to fetch the timer lock. when input stop, stop_timer
will call del_timer, at the same time the function
"aml_i2s_hrtimer_callback" is waiting for the timer lock,after
stop_timer release the lock,"aml_i2s_hrtimer_callback" get the
lock and call mod_timer again, which will set the timer to pending
status. It will cause the next "start input" stage,add_timer will
trigger BUG_ON.Now we put the lock before the active status
checking then we will not touch the timer.
Verify:
Need burning test
Change-Id: I1fb66903a4d31e9491ac0533e477e1597575d4cf
Signed-off-by: Jian Xu <jian.xu@amlogic.com>