[alsa-devel] snd_pcm_open() taking very long, starting from kernel 4.17
Arnaud Rebillout
arnaud.rebillout at collabora.com
Mon Dec 31 15:58:54 CET 2018
On 12/17/18 5:54 PM, Takashi Iwai wrote:
> On Fri, 14 Dec 2018 18:36:11 +0100,
> Arnaud Rebillout wrote:
>> Dear ALSA maintainers,
>>
>> I noticed big change in how long `snd_pcm_open()` takes, between kernel 4.16
>> and 4.17. With a kernel 4.16, this function consistently returns in less
>> than 1
>> millisecond, with occasional, but rare, peaks that go up to 25ms. While with
>> kernel 4.17 and above, I measure an average of 40ms, with frequent peaks
>> to 1s.
>> The maximum I measured was 3 seconds!
>>
>> Is this change known, intended? Or is it a regression?
> If this happens at opening the PCM stream, it's likely a stall in
> runtime PM resume by some reason. But I have no idea what actually
> broke.
>
> Are you sure that it's a kernel regression, i.e. this doesn't happen
> at all when booting the old kernel on the same system?
>
> If yes, the best would be to perform bisection. At least it'd be
> helpful to narrow the regression a bit.
>
> And, this might be a known issue; I remember some report about the
> long runtime PM resume on Dell XPS, which I can't see on other
> machines. So it might be device-specific.
I found out that this is actually due to a change in the debian kernel
configuration. Starting from version 4.17, the kernel is configured with
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=1 (was =0 before).
I could confirm that this is what makes snd_pcm_open() take much more time.
I opened a bug at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917906.
Thanks for the support!
Arnaud
More information about the Alsa-devel
mailing list