qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
	qemu-devel@nongnu.org, qemu-stable@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	 Zheyu Ma <zheyuma97@gmail.com>
Subject: Re: [PATCH v1 3/4] virtio-snd: factor card removal out of unrealize()
Date: Tue, 23 Apr 2024 10:17:07 +0200	[thread overview]
Message-ID: <34e3bbc4-e2ec-4bbc-84c4-ebfb45f7095f@linaro.org> (raw)
In-Reply-To: <2ebc4f49-4d50-4ad8-9d44-eb6ef2ff0066@linaro.org>

On 22/4/24 15:27, Philippe Mathieu-Daudé wrote:
> On 22/4/24 14:52, Manos Pitsidianakis wrote:
>> Extract audio card removal logic out of the device unrealize callback so
>> that it can be re-used in follow up commits.
>>
>> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
>> ---
>>   hw/audio/virtio-snd.c | 20 ++++++++++++++------
>>   1 file changed, 14 insertions(+), 6 deletions(-)
> 
> 
>> -static void virtio_snd_unrealize(DeviceState *dev)
>> +/* Remove audio card and cleanup streams. */
>> +static void virtio_snd_unsetup(VirtIOSound *vsnd)
> 
> Maybe s/unsetup/cleanup/?

Or 'teardown'?

> 
>>   {
>> -    VirtIODevice *vdev = VIRTIO_DEVICE(dev);
>> -    VirtIOSound *vsnd = VIRTIO_SND(dev);
>>       VirtIOSoundPCMStream *stream;
>> -    qemu_del_vm_change_state_handler(vsnd->vmstate);
>> -    trace_virtio_snd_unrealize(vsnd);
>> -
>>       if (vsnd->pcm) {
>>           if (vsnd->pcm->streams) {
>>               for (uint32_t i = 0; i < vsnd->snd_conf.streams; i++) {
>> @@ -1370,6 +1366,18 @@ static void virtio_snd_unrealize(DeviceState *dev)
>>           vsnd->pcm = NULL;
>>       }
>>       AUD_remove_card(&vsnd->card);
>> +}



  reply	other threads:[~2024-04-23  8:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 12:52 [PATCH v1 0/4] virtio_snd_set_config: Fix #2296 Manos Pitsidianakis
2024-04-22 12:52 ` [PATCH v1 1/4] virtio-snd: add virtio_snd_is_config_valid() Manos Pitsidianakis
2024-04-22 13:20   ` Philippe Mathieu-Daudé
2024-04-22 12:52 ` [PATCH v1 2/4] virtio-snd: factor card setup out of realize func Manos Pitsidianakis
2024-04-22 13:23   ` Philippe Mathieu-Daudé
2024-04-22 12:52 ` [PATCH v1 3/4] virtio-snd: factor card removal out of unrealize() Manos Pitsidianakis
2024-04-22 13:27   ` Philippe Mathieu-Daudé
2024-04-23  8:17     ` Philippe Mathieu-Daudé [this message]
2024-04-22 12:52 ` [PATCH v1 4/4] virtio_snd_set_config: validate and re-setup card Manos Pitsidianakis
2024-09-01 13:25 ` [PATCH v1 0/4] virtio_snd_set_config: Fix #2296 Volker Rümelin

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=34e3bbc4-e2ec-4bbc-84c4-ebfb45f7095f@linaro.org \
    --to=philmd@linaro.org \
    --cc=kraxel@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=zheyuma97@gmail.com \
    /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).