static int audiodsp_open(struct inode *node, struct file *file) { DSP_PRNT("dsp_open\n"); audiodsp_prevent_sleep(); return 0; }
static int audiodsp_open(struct inode *node, struct file *file) { DSP_PRNT("dsp_open\n"); #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6 switch_mod_gate_by_type(MOD_MEDIA_CPU, 1); /* Audio DSP firmware uses mailbox registers for communications * with host processor. And these mailbox registers unfortunately * falls into the assistant module, which is in vdec DOS clock domain. * So we have to make sure the clock domain is enabled/disabled when * audio firmware start/stop running. * Note the module_gating has ref count so a flag 0 does * not mean the vdec clock is gated off immediately. */ switch_mod_gate_by_type(MOD_VDEC, 1); #endif audiodsp_prevent_sleep(); return 0; }