<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/virtio, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-02-16T14:01:31Z</updated>
<entry>
<title>ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.</title>
<updated>2024-02-16T14:01:31Z</updated>
<author>
<name>Aiswarya Cyriac</name>
</author>
<published>2024-02-16T10:06:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba00e413fa1515e4d0890803c01ebc555f500f15'/>
<id>urn:sha1:ba00e413fa1515e4d0890803c01ebc555f500f15</id>
<content type='text'>
This commit fixes the following warning when building virtio_snd driver.

"
*** CID 1583619:  Uninitialized variables  (UNINIT)
sound/virtio/virtio_kctl.c:294 in virtsnd_kctl_tlv_op()
288
289     		break;
290     	}
291
292     	kfree(tlv);
293
vvv     CID 1583619:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "rc".
294     	return rc;
295     }
296
297     /**
298      * virtsnd_kctl_get_enum_items() - Query items for the ENUMERATED element type.
299      * @snd: VirtIO sound device.
"

This warning is caused by the absence of the "default" branch in the
switch-block, and is a false positive because the kernel calls
virtsnd_kctl_tlv_op() only with values for op_flag processed in
this block.

Also, this commit unifies the cleanup path for all possible control
paths in the callback function.

Signed-off-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Signed-off-by: Aiswarya Cyriac &lt;aiswarya.cyriac@opensynergy.com&gt;
Reported-by: coverity-bot &lt;keescook+coverity-bot@chromium.org&gt;
Addresses-Coverity-ID: 1583619 ("Uninitialized variables")
Fixes: d6568e3de42d ("ALSA: virtio: add support for audio controls")
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Link: https://lore.kernel.org/r/20240216100643.688590-1-aiswarya.cyriac@opensynergy.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: add support for audio controls</title>
<updated>2024-02-09T13:01:15Z</updated>
<author>
<name>Anton Yakovlev</name>
</author>
<published>2024-01-15T13:36:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6568e3de42dd971a1356f7ba581e6600d53f0a0'/>
<id>urn:sha1:d6568e3de42dd971a1356f7ba581e6600d53f0a0</id>
<content type='text'>
Implementation of support for audio controls in accordance with the
extension of the virtio sound device specification [1] planned for
virtio-v1.3-cs01.

The device can announce the VIRTIO_SND_F_CTLS feature. If the feature is
negotiated, then an additional field appears in the configuration space:

  struct virtio_snd_config {
    ...
    /* number of available control elements */
    __le32 controls;
  };

The driver can send the following requests to manage audio controls:

  enum {
    ...
    /* control element request types */
    VIRTIO_SND_R_CTL_INFO = 0x0300,
    VIRTIO_SND_R_CTL_ENUM_ITEMS,
    VIRTIO_SND_R_CTL_READ,
    VIRTIO_SND_R_CTL_WRITE,
    VIRTIO_SND_R_CTL_TLV_READ,
    VIRTIO_SND_R_CTL_TLV_WRITE,
    VIRTIO_SND_R_CTL_TLV_COMMAND,
    ...
  };

And the device can send the following audio control event notification:

  enum {
    ...
    /* control element event types */
    VIRTIO_SND_EVT_CTL_NOTIFY = 0x1200,
    ...
  };

See additional details in [1].

[1] https://lists.oasis-open.org/archives/virtio-comment/202104/msg00013.html

Signed-off-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Signed-off-by: Aiswarya Cyriac &lt;aiswarya.cyriac@opensynergy.com&gt;
Link: https://lore.kernel.org/r/20240115133654.576068-2-aiswarya.cyriac@opensynergy.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: remove duplicate check if queue is broken</title>
<updated>2024-01-24T13:41:37Z</updated>
<author>
<name>Li RongQing</name>
</author>
<published>2024-01-24T12:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d62ccb59afcd94e8d301433974672b156392289d'/>
<id>urn:sha1:d62ccb59afcd94e8d301433974672b156392289d</id>
<content type='text'>
virtqueue_enable_cb() will call virtqueue_poll() which will check if
queue is broken at beginning, so remove the virtqueue_is_broken() call

Signed-off-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Link: https://lore.kernel.org/r/20240124120834.49410-1-lirongqing@baidu.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: use ack callback</title>
<updated>2023-10-27T09:25:07Z</updated>
<author>
<name>Matias Ezequiel Vara Larsen</name>
</author>
<published>2023-10-25T09:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe981e67568c41de6caae25d70b5f203b94452cc'/>
<id>urn:sha1:fe981e67568c41de6caae25d70b5f203b94452cc</id>
<content type='text'>
This commit uses the ack() callback to determine when a buffer has been
updated, then exposes it to guest.

The current mechanism splits a dma buffer into descriptors that are
exposed to the device. This dma buffer is shared with the user
application. When the device consumes a buffer, the driver moves the
request from the used ring to available ring.

The driver exposes the buffer to the device without knowing if the
content has been updated from the user. The section 2.8.21.1 of the
virtio spec states that: "The device MAY access the descriptor chains
the driver created and the memory they refer to immediately". If the
device picks up buffers from the available ring just after it is
notified, it happens that the content may be old.

When the ack() callback is invoked, the driver exposes only the buffers
that have already been updated, i.e., enqueued in the available ring.
Thus, the device always picks up a buffer that is updated.

For capturing, the driver starts by exposing all the available buffers
to device. After device updates the content of a buffer, it enqueues it
in the used ring. It is only after the ack() for capturing is issued
that the driver re-enqueues the buffer in the available ring.

Co-developed-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Signed-off-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Signed-off-by: Matias Ezequiel Vara Larsen &lt;mvaralar@redhat.com&gt;
Link: https://lore.kernel.org/r/ZTjkn1YAFz67yfqx@fedora
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>virtio: wrap config-&gt;reset calls</title>
<updated>2022-01-14T23:50:52Z</updated>
<author>
<name>Michael S. Tsirkin</name>
</author>
<published>2021-10-13T10:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9679d0013a66849f23057978f92e76b255c50aa'/>
<id>urn:sha1:d9679d0013a66849f23057978f92e76b255c50aa</id>
<content type='text'>
This will enable cleanups down the road.
The idea is to disable cbs, then add "flush_queued_cbs" callback
as a parameter, this way drivers can flush any work
queued after callbacks have been disabled.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Link: https://lore.kernel.org/r/20211013105226.20225-1-mst@redhat.com
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: Replace zero-length array with flexible-array member</title>
<updated>2021-09-30T11:47:57Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2021-09-29T19:15:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b38269ecd2b2bdd63780b3f7d43c39f924ac515a'/>
<id>urn:sha1:b38269ecd2b2bdd63780b3f7d43c39f924ac515a</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

Also, make use of the struct_size() helper in kzalloc().

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20210929191504.GA337268@embeddedor
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: fix kernel-doc</title>
<updated>2021-04-27T06:39:39Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2021-04-26T21:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e861431303d23428bf26e8496252d7bee260a956'/>
<id>urn:sha1:e861431303d23428bf26e8496252d7bee260a956</id>
<content type='text'>
make W=1 warning:

sound/virtio/virtio_ctl_msg.c:70: warning: expecting prototype for
virtsnd_ctl_msg_request(). Prototype was for
virtsnd_ctl_msg_response() instead

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210426213902.234711-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: use module_virtio_driver() to simplify the code</title>
<updated>2021-04-12T10:15:34Z</updated>
<author>
<name>Chen Huang</name>
</author>
<published>2021-04-08T12:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d91cbe83d319e8923d36f974d8c9b1e1b56fea62'/>
<id>urn:sha1:d91cbe83d319e8923d36f974d8c9b1e1b56fea62</id>
<content type='text'>
module_virtio_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Chen Huang &lt;chenhuang5@huawei.com&gt;
Reviewed-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Link: https://lore.kernel.org/r/20210408125429.1158703-1-chenhuang5@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: introduce device suspend/resume support</title>
<updated>2021-03-07T08:08:39Z</updated>
<author>
<name>Anton Yakovlev</name>
</author>
<published>2021-03-02T16:47:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=575483e90a3292c2afceb7161732046e411d6fdd'/>
<id>urn:sha1:575483e90a3292c2afceb7161732046e411d6fdd</id>
<content type='text'>
All running PCM substreams are stopped on device suspend and restarted
on device resume.

Signed-off-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Link: https://lore.kernel.org/r/20210302164709.3142702-10-anton.yakovlev@opensynergy.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: virtio: introduce PCM channel map support</title>
<updated>2021-03-07T08:08:20Z</updated>
<author>
<name>Anton Yakovlev</name>
</author>
<published>2021-03-02T16:47:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19325fedf245ca932c58a629d3888a9a393534ab'/>
<id>urn:sha1:19325fedf245ca932c58a629d3888a9a393534ab</id>
<content type='text'>
Enumerate all available PCM channel maps and create ALSA controls.

Signed-off-by: Anton Yakovlev &lt;anton.yakovlev@opensynergy.com&gt;
Link: https://lore.kernel.org/r/20210302164709.3142702-9-anton.yakovlev@opensynergy.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
