- if( rk616->capture_active <= 0 ){
- if ((rk616_codec_work_capture_type != RK616_CODEC_WORK_POWER_DOWN) &&
- (is_codec_capture_running == true)) {
- cancel_delayed_work_sync(&capture_delayed_work);
- /*
- * If rk616_codec_work_capture_type is NULL means codec already power down,
- * so power up codec.
- * If rk616_codec_work_capture_type is RK616_CODEC_WORK_POWER_UP it means
- * codec haven't be powered up, so we don't need to power down codec.
- * If is playback call power down, power down immediatly, because audioflinger
- * already has delay 3s.
- */
- if (rk616_codec_work_capture_type == RK616_CODEC_WORK_NULL) {
- rk616_codec_work_capture_type = RK616_CODEC_WORK_POWER_DOWN;
- queue_delayed_work(rk616_codec_workq, &capture_delayed_work,msecs_to_jiffies(3000));
- } else {
- rk616_codec_work_capture_type = RK616_CODEC_WORK_NULL;
- DBG(" Warning :capture being opened, so interrupt the open process ! \n");
- }
- } else {
- DBG(" Warning :capture has been closed or it being closed ,so return !\n");
- }
- }else
- DBG("capture_active > 0 ,so capture can not be power down !\n");
+ if (rk616->capture_active <= 0) {
+ if ((rk616_codec_work_capture_type != RK616_CODEC_WORK_POWER_DOWN) &&
+ (is_codec_capture_running == true)) {
+ cancel_delayed_work_sync(&capture_delayed_work);
+ /*
+ * If rk616_codec_work_capture_type is NULL means codec already power down,
+ * so power up codec.
+ * If rk616_codec_work_capture_type is RK616_CODEC_WORK_POWER_UP it means
+ * codec haven't be powered up, so we don't need to power down codec.
+ * If is playback call power down, power down immediatly, because audioflinger
+ * already has delay 3s.
+ */
+ if (rk616_codec_work_capture_type == RK616_CODEC_WORK_NULL) {
+ rk616_codec_work_capture_type = RK616_CODEC_WORK_POWER_DOWN;
+ queue_delayed_work(rk616_codec_workq, &capture_delayed_work,msecs_to_jiffies(3000));
+ } else {
+ rk616_codec_work_capture_type = RK616_CODEC_WORK_NULL;
+ DBG(" Warning : capture being opened, so interrupt the open process ! \n");
+ }
+ } else {
+ DBG(" Warning : capture has been closed or it being closed, so return !\n");
+ }
+ }