[ALSA] snd-aoa: fix onyx resume
[deliverable/linux.git] / sound / aoa / codecs / snd-aoa-codec-onyx.c
index 0b7650788f1f846b5b0415682fcef6ca9d10fd21..b00fc4842c9327ecf0bf9a82bf5e24596b8b1937 100644 (file)
@@ -825,7 +825,16 @@ static int onyx_resume(struct codec_info_item *cii)
        int err = -ENXIO;
 
        mutex_lock(&onyx->mutex);
-       /* take codec out of suspend */
+
+       /* reset codec */
+       onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0);
+       msleep(1);
+       onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1);
+       msleep(1);
+       onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0);
+       msleep(1);
+
+       /* take codec out of suspend (if it still is after reset) */
        if (onyx_read_register(onyx, ONYX_REG_CONTROL, &v))
                goto out_unlock;
        onyx_write_register(onyx, ONYX_REG_CONTROL, v & ~(ONYX_ADPSV | ONYX_DAPSV));
This page took 0.034811 seconds and 5 git commands to generate.