[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibe
From: |
Bjørn Mork |
Subject: |
Re: [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibernated) |
Date: |
Wed, 29 Jul 2009 15:46:01 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) |
Bjørn Mork <address@hidden> writes:
> I tried your modified patch with Windows XP as a client, using the
> Windows "Sound Recorder" app for testing audio capture. I have it
> working up until the host is suspended, but cannot make it work after
> resuming. Nothing is captured and nothing is logged to the QEMU
> monitor. The "Sound Recorder" app just sits there after pressing record,
> without ever changing the stream position from 0,00 sec.
I added a few debug printf's and found that the problem is that
alsa_get_avail() will report 0 consistently after suspend. Thus, we end
up silently returning before ever trying to snd_pcm_readi() anything:
avail = alsa_get_avail (alsa->handle);
decr = audio_MIN (dead, avail);
if (!decr) {
return 0;
}
I don't know how to best fix this. We probably need to add some code
triggering ESTRPIPE when the driver is suspended, even if
alsa_get_avail() returns 0. But I hesitate, as that seems rather
inefficent just for a special case like suspend/resume.
Bjørn
Re: [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibernated), Rob Landley, 2009/07/29