qemu-devel
[Top][All Lists]
Advanced

[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: malc
Subject: Re: [Qemu-devel] [PATCH] alsa broken when the host is suspended (or hibernated)
Date: Wed, 29 Jul 2009 17:45:02 +0400 (MSD)

On Wed, 29 Jul 2009, Bjrn Mork wrote:

> malc <address@hidden> writes:
> 
> > Thank you. I've massaged the patch a bit:
> >
> > a. Trimmed the comment line to fit 80 columns
> > b. Suppressed tabs
> 
> Thanks.  Guess I should have read the qemu coding standard
> first... Shame on me.
> 
> > c. Added -ESTRPIPE handling to alsa_run_in
> > d. Changed the verbose message to indicate which of the streams
> >    is being resumed (input/output)
> >
> > It would be very nice if you could verify that it still works since
> > my machine is not capable of suspending nor hibernating, it would be
> > very informative if you could run audio capture inside the guest to
> > verify c. and d.
> 
> Oh, didn't event think about sending audio the other way. I must admit
> that I'm quite new to using audio in QEMU.
> 
> 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.

Thanks.

> 
> Resuming audio output of course still works fine with your modifications:
> 
>   (qemu) alsa: Resuming suspended output stream

Aha, that means only attempts to write audio result in ESTRPIPE and
apparently no errors are generated when trying to read, what i wonder
is what actually happens on an attempt to read: does the call block,
0 is returned, and whether in fact the code calls snd_pcm_readi at all.

> 
> But audio capture still don't work, even if output is resumed.

Does the something like arecord work across suspend/resume cycle?
Does ALSAs oss emulation playback/capture work at all?

In case of arecord working perhaps the answers could be found inside
its sources?

> 
> > The tree is at:
> > http://repo.or.cz/w/qemu/malc.git?a=shortlog;h=refs/heads/alsa
> >
> > Or you can just apply first commit's patch.
> >
> > [..snip..]
> >
> > P.S. Perhaps you could also come up with a better subject line?
> 
> I suspect that my suggestions will be affected by my limited view of the
> world :-)
> 
> I'm not sure what you do have in mind, but how about 
>   "alsa: add host resume support"
> ?

alsa: add host suspend/resume support ?

> 
> But I guess we'll have to fix the audio capture part before making such
> claims.

That would have been great, if not your original patch, modulo whitespace,
issues will be applied, half a measure but certainly better than nothing.

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]