From: "Bjørn Mork" <bjorn@mork.no>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibernated)
Date: Wed, 29 Jul 2009 15:46:01 +0200 [thread overview]
Message-ID: <87bpn361ra.fsf@nemi.mork.no> (raw)
In-Reply-To: <87fxcf64zy.fsf@nemi.mork.no> ("Bjørn Mork"'s message of "Wed, 29 Jul 2009 14:36:01 +0200")
Bjørn Mork <bjorn@mork.no> 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
next prev parent reply other threads:[~2009-07-29 13:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-29 10:51 [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibernated) Bjørn Mork
2009-07-29 11:57 ` malc
2009-07-29 12:36 ` Bjørn Mork
2009-07-29 13:45 ` malc
2009-07-29 13:46 ` Bjørn Mork [this message]
2009-07-29 13:51 ` malc
2009-07-30 7:44 ` [Qemu-devel] [PATCH] alsa: add host suspend/resume support Bjørn Mork
2009-07-30 10:47 ` [Qemu-devel] " malc
2009-07-30 7:47 ` [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibernated) Bjørn Mork
2009-07-29 16:58 ` Rob Landley
2009-07-29 18:57 ` malc
2009-07-30 10:29 ` malc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bpn361ra.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.