Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-22 Thread Geoffrey McRae
On 2020-06-22 19:05, Gerd Hoffmann wrote: On Sun, Jun 21, 2020 at 02:06:25PM +1000, Geoffrey McRae wrote: > Can you stop the stream without closing the connection? Not as far as I can tell, it seems the JACK API doesn't allow for this in a way that is useful to us. What happens if you do

Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-22 Thread Gerd Hoffmann
On Sun, Jun 21, 2020 at 02:06:25PM +1000, Geoffrey McRae wrote: > > > Can you stop the stream without closing the connection? > > Not as far as I can tell, it seems the JACK API doesn't allow for this in a > way that is useful to us. What happens if you don't feed data to jack? The cracking you

Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-20 Thread Geoffrey McRae
On 2020-06-19 19:29, Gerd Hoffmann wrote: Hi, > Hmm, I guess feeding silence into jack needs some cpu cycles? > Maybe add a timer to close the jack server connection? Keep the > connection open for re-use for a while, but in case the guest stops > playing sound altogether close the jack con

Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-19 Thread Gerd Hoffmann
Hi, > > Hmm, I guess feeding silence into jack needs some cpu cycles? > > Maybe add a timer to close the jack server connection? Keep the > > connection open for re-use for a while, but in case the guest stops > > playing sound altogether close the jack connection after being unused > > for a f

Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-17 Thread Geoffrey McRae
On 2020-06-17 22:44, Gerd Hoffmann wrote: On Sat, Jun 13, 2020 at 02:05:17PM +1000, Geoffrey McRae wrote: When the guest closes the audio device we must start dropping input samples from JACK and zeroing the output buffer samples. Failure to do so causes sound artifacts during operations such

Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-17 Thread Gerd Hoffmann
On Sat, Jun 13, 2020 at 02:05:17PM +1000, Geoffrey McRae wrote: > When the guest closes the audio device we must start dropping input > samples from JACK and zeroing the output buffer samples. Failure to do > so causes sound artifacts during operations such as guest OS reboot, and > causes a hang o

[PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-13 Thread Geoffrey McRae
When the guest closes the audio device we must start dropping input samples from JACK and zeroing the output buffer samples. Failure to do so causes sound artifacts during operations such as guest OS reboot, and causes a hang of the input pipeline breaking it until QEMU is restated. Closing and re

[PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-11 Thread Geoffrey McRae
Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/audio/jackaudio.c b/audio/jackaudio.c index 249cbd3265..b2b53985ae 100644 --- a/audio/jackaudio.c +++ b/audio/jackaudio.c @@ -56,7 +56,7 @@ typede

[PATCH 5/6] audio/jack: honour the enable state of the audio device

2020-06-11 Thread Geoffrey McRae
Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/audio/jackaudio.c b/audio/jackaudio.c index 249cbd3265..b2b53985ae 100644 --- a/audio/jackaudio.c +++ b/audio/jackaudio.c @@ -56,7 +56,7 @@ typede