Discussion:
[Alsa-user] How to improve Linux’ suspend and resume times
Paul Menzel
2017-05-05 14:33:01 UTC
Permalink
Dear ALSA users,


Currently, I am instrumenting Linux’ suspend and resume times on the
ASRock E350M1 with pm-graph [1][2][3], and am trying to decrease the times.

```
[ 56.274229] snd_hda_codec_realtek hdaudioC1D0: ALC892: SKU not ready
0x00000100
[ 56.274811] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC892:
line_outs=4 (0x14/0x16/0x15/0x17/0x0) type:line
[ 56.274815] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0
(0x0/0x0/0x0/0x0/0x0)
[ 56.274818] snd_hda_codec_realtek hdaudioC1D0: hp_outs=1
(0x1b/0x0/0x0/0x0/0x0)
[ 56.274821] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
[ 56.274824] snd_hda_codec_realtek hdaudioC1D0: dig-out=0x1e/0x0
[ 56.274826] snd_hda_codec_realtek hdaudioC1D0: inputs:
[ 56.274830] snd_hda_codec_realtek hdaudioC1D0: Rear Mic=0x18
[ 56.274834] snd_hda_codec_realtek hdaudioC1D0: Front Mic=0x19
[ 56.274837] snd_hda_codec_realtek hdaudioC1D0: Line=0x1a
[ 56.274840] snd_hda_codec_realtek hdaudioC1D0: CD=0x1c
```

Looking at the generated HTML pages, it looks like there are some wanted
delays to avoid a pop sound.

```
#ifdef CONFIG_PM
static int alc_resume(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;

if (!spec->no_depop_delay)
msleep(150); /* to avoid pop noise */
codec->patch_ops.init(codec);
regcache_sync(codec->core.regmap);
hda_call_check_power_status(codec, 0x01);
return 0;
}
#endif
```

The the 150 ms delay is there by default.

Is there a way to override that behavior, in the case that the user
prefers speed over annoyance?

I couldn’t find a module parameter for the module `snd_hda_intel`.


Kind regards,

Paul


[1] https://01.org/suspendresume
[2] https://github.com/01org/pm-graph
[3] sudo ./analyze_suspend.py -config config/suspend-callgraph.cfg
Loading...