From: Geoffrey McRae <geoff@hostfission.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 5/6] audio/jack: honour the enable state of the audio device
Date: Thu, 18 Jun 2020 13:11:03 +1000 [thread overview]
Message-ID: <a08a08cc6735d2fb2ba07145befc64c3@hostfission.com> (raw)
In-Reply-To: <20200617124406.7dgne73ttfhgkj3x@sirius.home.kraxel.org>
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 as guest OS reboot,
>> and
>> causes a hang of the input pipeline breaking it until QEMU is
>> restated.
>>
>> Closing and reconnecting to JACK was tested during these
>> enable/disable
>> calls which works well for Linux guests, however Windows re-opens the
>> audio hardware repeatedly even when doing simple tasks like playing a
>> system sounds. As such it was decided it is better to feed silence to
>> JACK while the device is disabled.
>
> 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 few minutes?
>
> [ Doesn't render the patch invalid, consider it a suggestion for future
> improvements ]
Thanks, I had considered that however there is a usability issue to
consider. Each time a jack client registers, it removes the client
entirely and disconnects any custom plumbing that may have been done by
the user. JACK does not remember this custom routing and as such it's
lost until the user re-establishes it, or they have some automation set
up to do it. While this could likely be worked around, it would likely
cause more headaches then the few CPU cycles lost in a memset.
Further to this, while I have added some automation to connect ports via
regex matching, this is likely not going to be used by many as it's not
the normal method of connecting things up. This was added to open up
this for general use for those that don't care for custom filters but
just want the reliable audio interface.
>
> take care,
> Gerd
next prev parent reply other threads:[~2020-06-18 3:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-13 4:05 [PATCH 0/6] audio/jack: fixes to overall jack behaviour Geoffrey McRae
2020-06-13 4:05 ` [PATCH 1/6] audio/jack: fix invalid minimum buffer size check Geoffrey McRae
2020-06-13 4:05 ` [PATCH 2/6] audio/jack: remove unused stopped state Geoffrey McRae
2020-06-13 4:05 ` [PATCH 3/6] audio/jack: remove invalid set of input support bool Geoffrey McRae
2020-06-13 4:05 ` [PATCH 4/6] audio/jack: do not remove ports when finishing Geoffrey McRae
2020-06-13 4:05 ` [PATCH 5/6] audio/jack: honour the enable state of the audio device Geoffrey McRae
2020-06-17 12:44 ` Gerd Hoffmann
2020-06-18 3:11 ` Geoffrey McRae [this message]
2020-06-19 9:29 ` Gerd Hoffmann
2020-06-21 4:06 ` Geoffrey McRae
2020-06-22 9:05 ` Gerd Hoffmann
2020-06-22 9:27 ` Geoffrey McRae
2020-06-13 4:05 ` [PATCH 6/6] audio/jack: simplify the re-init code path Geoffrey McRae
2020-06-14 5:07 ` [PATCH 0/6] audio/jack: fixes to overall jack behaviour no-reply
-- strict thread matches above, loose matches on Subject: below --
2020-06-11 15:20 [PATCH 5/6] audio/jack: honour the enable state of the audio device Geoffrey McRae
2020-06-11 15:20 Geoffrey McRae
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=a08a08cc6735d2fb2ba07145befc64c3@hostfission.com \
--to=geoff@hostfission.com \
--cc=kraxel@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).