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:51:58 +0400 (MSD)

On Wed, 29 Jul 2009, Bjrn Mork wrote:

> 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.
> 

What does `snd_pcm_state (alsa->handle)' return in this case?

-- 
mailto:address@hidden

reply via email to

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