From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02955C63793 for ; Thu, 22 Jul 2021 04:53:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74B1261248 for ; Thu, 22 Jul 2021 04:53:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74B1261248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6QiW-0006g7-IJ for qemu-devel@archiver.kernel.org; Thu, 22 Jul 2021 00:53:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6Qhm-0005zN-Nm for qemu-devel@nongnu.org; Thu, 22 Jul 2021 00:53:06 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:34396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6Qhl-0001oO-21 for qemu-devel@nongnu.org; Thu, 22 Jul 2021 00:53:06 -0400 Received: by mail-pj1-x1031.google.com with SMTP id p5-20020a17090a8685b029015d1a9a6f1aso2573320pjn.1 for ; Wed, 21 Jul 2021 21:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iALvRI9A14y0KLM+qiG1UxRkiEt/vXEExaXeTWBCq9Y=; b=Hqq7TgHt7lx7jcdLJPHKRkFYW6EcrLQp/CVIY9y2l2q021+bf+mAtkzB7TdnPioFJo lJ3HqW8MW9HVmoDmyFwlvb3q+OHi1JCQRyjkCSfpt7cuT5mqPLeQuuBk2eeuo1Nf9EhS 2aVyD5VJGTpcKfle2arBTSNMP+ZY01wClzGfRH8bYKtzxaPUZzm2PNZ9jwcTNQIYgjiN PAGpfPFa3o44FyUYyBn3KlU5n0psiSkLHtiqY58apsdsD0Gs3R9ZmJzkPgixNtNKterr 9/fpGj5HLkV5vSGn2Mrji5+BVhVvD/0dZ/hA//wfb6MxvyEwBEFHGnFQMWOx14Fd3Jk2 socQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iALvRI9A14y0KLM+qiG1UxRkiEt/vXEExaXeTWBCq9Y=; b=OlnzEfG8aCk/WcT/6mL7lIM61W0rgs7JQTS9t6+72kMDp5jlxAOW/4whDB2o+jzijp lnpOpmFHKhyIFRJ7J9FcQufwVgCnpozMx5Rt4AZSK611ROj4BKPvM7OvJplV4kIvI8lt U9FT4m8KWiUUjbIPlhTQwcqbN3co66VkNxBmQ2a+bG6CVMILx4t9BOtBZB/f8F+oQ+WJ GYRIrcAY0fByCjcG1injOs+agXIzCdJ7/rnVle1N2zkZx4ro9Maydl25wv7L5XAlIDOn VqV8FPVunyPLcGMXZXmuOC+tS2GqN97K4Jb4iD22hR4mX5ZAcJ/Hx/3NOEOxDzxA2zBI /rkg== X-Gm-Message-State: AOAM531aEBFLT2JMDHjvrAKTCoG8iNPPcI0G80C/0lyzCEPv7ItrHr1+ Llg1LSsGV9fDCugQZ/GDvrTAo0zeMkLmDeZnS/I= X-Google-Smtp-Source: ABdhPJxJoVgtHXbr9fybxn098LkJHFtcLvHOMCcWDameOYXtSp4EWOW90CpK3+5DS+uaA7OJnZ/2qO2ohT0lSStgUKo= X-Received: by 2002:a17:902:e80f:b029:12b:5cb8:dbf5 with SMTP id u15-20020a170902e80fb029012b5cb8dbf5mr27839087plg.30.1626929582883; Wed, 21 Jul 2021 21:53:02 -0700 (PDT) MIME-Version: 1.0 References: <20210429120445.694420-1-chouhan.shreyansh2702@gmail.com> <20210429120445.694420-11-chouhan.shreyansh2702@gmail.com> In-Reply-To: From: Shreyansh Chouhan Date: Thu, 22 Jul 2021 10:22:51 +0530 Message-ID: Subject: Re: [RFC PATCH 10/27] virtio-snd: Add code for the realize function To: Deepa gowda , Gerd Hoffmann Content-Type: multipart/alternative; boundary="000000000000dcd05505c7af0f13" Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=chouhan.shreyansh2702@gmail.com; helo=mail-pj1-x1031.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000dcd05505c7af0f13 Content-Type: text/plain; charset="UTF-8" Hi, On Thu, 22 Jul 2021 at 07:48, Deepa gowda wrote: > Hi, Shreyansh, > > When is virtio-snd expected to be completed and available in Qemu GitHub? > > Sorry for the recent absence of activity on this patch series. I have the sound card working with alsa. The output works just fine. The input needs a little bit of polishing to do. To answer your question, it is still going to take some time because I recently got selected for an internship/mentorship program and I cannot give as much time to the patch as I would like to. It could still take me over a month to complete this. Hope you understand. (I've cc'd the mailing list and Gerd so that they too can know about this.) Thanks, Shreyansh Chouhan > Regards Deepa > > On Thu, 29 Apr 2021, 17:58 Shreyansh Chouhan, < > chouhan.shreyansh2702@gmail.com> wrote: > >> Signed-off-by: Shreyansh Chouhan >> --- >> hw/audio/virtio-snd.c | 35 +++++++++++++++++++++++++++++++++++ >> 1 file changed, 35 insertions(+) >> >> diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c >> index edaeffd6b7..caad157705 100644 >> --- a/hw/audio/virtio-snd.c >> +++ b/hw/audio/virtio-snd.c >> @@ -97,8 +97,43 @@ static uint64_t virtio_snd_get_features(VirtIODevice >> *vdev, uint64_t features, >> return vdev->host_features; >> } >> >> +/* >> + * Initializes the VirtIOSound card device. Validates the configuration >> + * passed by the command line. Initializes the virtqueues. Allocates >> resources >> + * for and initializes streams, jacks and chmaps. >> + * >> + * @dev: VirtIOSound card device >> + * @errp: Set if there is an error >> + */ >> static void virtio_snd_device_realize(DeviceState *dev, Error **errp) >> { >> + VirtIODevice *vdev = VIRTIO_DEVICE(dev); >> + VirtIOSound *s = VIRTIO_SOUND(dev); >> + >> + virtio_init(vdev, "virtio-snd", VIRTIO_ID_SOUND, >> sizeof(virtio_snd_config)); >> + >> + /* set number of jacks and streams */ >> + if (s->snd_conf.jacks > 8) { >> + error_setg(errp, "Invalid number of jacks: %d", >> s->snd_conf.jacks); >> + return; >> + } >> + if (s->snd_conf.streams < 1 || s->snd_conf.streams > 10) { >> + error_setg(errp, "Invalid number of streams: %d", >> s->snd_conf.streams); >> + return; >> + } >> + >> + if (s->snd_conf.chmaps > VIRTIO_SND_CHMAP_MAX_SIZE) { >> + error_setg(errp, "Invalid number of channel maps: %d", >> + s->snd_conf.chmaps); >> + return; >> + } >> + >> + /* set up QEMUSoundCard and audiodev */ >> + AUD_register_card ("virtio_snd_card", &s->card); >> + >> + s->streams = g_new0(virtio_snd_pcm_stream *, s->snd_conf.streams); >> + s->pcm_params = g_new0(virtio_snd_pcm_params *, s->snd_conf.streams); >> + s->jacks = g_new0(virtio_snd_jack *, s->snd_conf.jacks); >> } >> >> static void virtio_snd_device_unrealize(DeviceState *dev) >> -- >> 2.25.1 >> >> >> --000000000000dcd05505c7af0f13 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Thu, 22 Jul 2021 at 07:48, Deepa gowda <= ;deepa.gouda@gmail.com> wro= te:
Hi, Shreyansh,

When is virtio-= snd expected to be completed and available in Qemu GitHub?


Sorry for the= recent absence of activity on this patch series. I have the sound card
working with alsa. The output works just fine. The input needs = a little bit of polishing to do.
To answer your question, it is s= till going to take some time because I recently got selected
for= an internship/mentorship program and I cannot give as much time to the pat= ch as I
would like to. It could still take me over a month to com= plete this.

Hope you understand.
(I've cc'd the mailing list and Gerd so that they too c= an know about this.)

Thanks,
Shreyansh C= houhan
Regar= ds Deepa

On Thu, 29 Apr 2021, 17:58 Shreyansh Chouhan, <chouhan.shr= eyansh2702@gmail.com> wrote:
Signed-off-by: Shreyansh Chouhan <chouh= an.shreyansh2702@gmail.com>
---
=C2=A0hw/audio/virtio-snd.c | 35 +++++++++++++++++++++++++++++++++++
=C2=A01 file changed, 35 insertions(+)

diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
index edaeffd6b7..caad157705 100644
--- a/hw/audio/virtio-snd.c
+++ b/hw/audio/virtio-snd.c
@@ -97,8 +97,43 @@ static uint64_t virtio_snd_get_features(VirtIODevice *vd= ev, uint64_t features,
=C2=A0 =C2=A0 =C2=A0return vdev->host_features;
=C2=A0}

+/*
+ * Initializes the VirtIOSound card device. Validates the configuration + * passed by the command line. Initializes the virtqueues. Allocates resou= rces
+ * for and initializes streams, jacks and chmaps.
+ *
+ * @dev: VirtIOSound card device
+ * @errp: Set if there is an error
+ */
=C2=A0static void virtio_snd_device_realize(DeviceState *dev, Error **errp)=
=C2=A0{
+=C2=A0 =C2=A0 VirtIODevice *vdev =3D VIRTIO_DEVICE(dev);
+=C2=A0 =C2=A0 VirtIOSound *s =3D VIRTIO_SOUND(dev);
+
+=C2=A0 =C2=A0 virtio_init(vdev, "virtio-snd", VIRTIO_ID_SOUND, s= izeof(virtio_snd_config));
+
+=C2=A0 =C2=A0 /* set number of jacks and streams */
+=C2=A0 =C2=A0 if (s->snd_conf.jacks > 8) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 error_setg(errp, "Invalid number of jacks= : %d", s->snd_conf.jacks);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;
+=C2=A0 =C2=A0 }
+=C2=A0 =C2=A0 if (s->snd_conf.streams < 1 || s->snd_conf.streams = > 10) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 error_setg(errp, "Invalid number of strea= ms: %d", s->snd_conf.streams);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;
+=C2=A0 =C2=A0 }
+
+=C2=A0 =C2=A0 if (s->snd_conf.chmaps > VIRTIO_SND_CHMAP_MAX_SIZE) {<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 error_setg(errp, "Invalid number of chann= el maps: %d",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->= ;snd_conf.chmaps);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;
+=C2=A0 =C2=A0 }
+
+=C2=A0 =C2=A0 /* set up QEMUSoundCard and audiodev */
+=C2=A0 =C2=A0 AUD_register_card ("virtio_snd_card", &s->c= ard);
+
+=C2=A0 =C2=A0 s->streams =3D g_new0(virtio_snd_pcm_stream *, s->snd_= conf.streams);
+=C2=A0 =C2=A0 s->pcm_params =3D g_new0(virtio_snd_pcm_params *, s->s= nd_conf.streams);
+=C2=A0 =C2=A0 s->jacks =3D g_new0(virtio_snd_jack *, s->snd_conf.jac= ks);
=C2=A0}

=C2=A0static void virtio_snd_device_unrealize(DeviceState *dev)
--
2.25.1


--000000000000dcd05505c7af0f13--