mbox series

[v5,0/9] ALSA: add virtio sound driver

Message ID 20210222153444.348390-1-anton.yakovlev@opensynergy.com (mailing list archive)
Headers show
Series ALSA: add virtio sound driver | expand

Message

Anton Yakovlev Feb. 22, 2021, 3:34 p.m. UTC
This series implements a driver part of the virtio sound device
specification v8 [1].

The driver supports PCM playback and capture substreams, jack and
channel map controls. A message-based transport is used to write/read
PCM frames to/from a device.

As a device part was used OpenSynergy proprietary implementation.

v5 changes:
 - Fixed another bunch of sparse warnings
   (replaced virtio_cread() -> virtio_cread_le()), no functional changes.
(Sorry, I didn't know how to run sparse locally, now everything should be fixed)

[1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html


Anton Yakovlev (9):
  uapi: virtio_ids: add a sound device type ID from OASIS spec
  ALSA: virtio: add virtio sound driver
  ALSA: virtio: handling control messages
  ALSA: virtio: build PCM devices and substream hardware descriptors
  ALSA: virtio: handling control and I/O messages for the PCM device
  ALSA: virtio: PCM substream operators
  ALSA: virtio: introduce jack support
  ALSA: virtio: introduce PCM channel map support
  ALSA: virtio: introduce device suspend/resume support

 MAINTAINERS                     |   9 +
 include/uapi/linux/virtio_ids.h |   1 +
 include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++
 sound/Kconfig                   |   2 +
 sound/Makefile                  |   3 +-
 sound/virtio/Kconfig            |  10 +
 sound/virtio/Makefile           |  13 +
 sound/virtio/virtio_card.c      | 462 +++++++++++++++++++++++++++++
 sound/virtio/virtio_card.h      | 113 ++++++++
 sound/virtio/virtio_chmap.c     | 219 ++++++++++++++
 sound/virtio/virtio_ctl_msg.c   | 310 ++++++++++++++++++++
 sound/virtio/virtio_ctl_msg.h   |  78 +++++
 sound/virtio/virtio_jack.c      | 233 +++++++++++++++
 sound/virtio/virtio_pcm.c       | 498 ++++++++++++++++++++++++++++++++
 sound/virtio/virtio_pcm.h       | 120 ++++++++
 sound/virtio/virtio_pcm_msg.c   | 392 +++++++++++++++++++++++++
 sound/virtio/virtio_pcm_ops.c   | 491 +++++++++++++++++++++++++++++++
 17 files changed, 3287 insertions(+), 1 deletion(-)
 create mode 100644 include/uapi/linux/virtio_snd.h
 create mode 100644 sound/virtio/Kconfig
 create mode 100644 sound/virtio/Makefile
 create mode 100644 sound/virtio/virtio_card.c
 create mode 100644 sound/virtio/virtio_card.h
 create mode 100644 sound/virtio/virtio_chmap.c
 create mode 100644 sound/virtio/virtio_ctl_msg.c
 create mode 100644 sound/virtio/virtio_ctl_msg.h
 create mode 100644 sound/virtio/virtio_jack.c
 create mode 100644 sound/virtio/virtio_pcm.c
 create mode 100644 sound/virtio/virtio_pcm.h
 create mode 100644 sound/virtio/virtio_pcm_msg.c
 create mode 100644 sound/virtio/virtio_pcm_ops.c

Comments

Michael S. Tsirkin Feb. 23, 2021, 12:09 p.m. UTC | #1
On Mon, Feb 22, 2021 at 04:34:35PM +0100, Anton Yakovlev wrote:
> This series implements a driver part of the virtio sound device
> specification v8 [1].
> 
> The driver supports PCM playback and capture substreams, jack and
> channel map controls. A message-based transport is used to write/read
> PCM frames to/from a device.
> 
> As a device part was used OpenSynergy proprietary implementation.
> 
> v5 changes:
>  - Fixed another bunch of sparse warnings
>    (replaced virtio_cread() -> virtio_cread_le()), no functional changes.
> (Sorry, I didn't know how to run sparse locally, now everything should be fixed)
> 
> [1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html


In the future please number patches from 1, not from 2.
thanks!

> 
> Anton Yakovlev (9):
>   uapi: virtio_ids: add a sound device type ID from OASIS spec
>   ALSA: virtio: add virtio sound driver
>   ALSA: virtio: handling control messages
>   ALSA: virtio: build PCM devices and substream hardware descriptors
>   ALSA: virtio: handling control and I/O messages for the PCM device
>   ALSA: virtio: PCM substream operators
>   ALSA: virtio: introduce jack support
>   ALSA: virtio: introduce PCM channel map support
>   ALSA: virtio: introduce device suspend/resume support
> 
>  MAINTAINERS                     |   9 +
>  include/uapi/linux/virtio_ids.h |   1 +
>  include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++
>  sound/Kconfig                   |   2 +
>  sound/Makefile                  |   3 +-
>  sound/virtio/Kconfig            |  10 +
>  sound/virtio/Makefile           |  13 +
>  sound/virtio/virtio_card.c      | 462 +++++++++++++++++++++++++++++
>  sound/virtio/virtio_card.h      | 113 ++++++++
>  sound/virtio/virtio_chmap.c     | 219 ++++++++++++++
>  sound/virtio/virtio_ctl_msg.c   | 310 ++++++++++++++++++++
>  sound/virtio/virtio_ctl_msg.h   |  78 +++++
>  sound/virtio/virtio_jack.c      | 233 +++++++++++++++
>  sound/virtio/virtio_pcm.c       | 498 ++++++++++++++++++++++++++++++++
>  sound/virtio/virtio_pcm.h       | 120 ++++++++
>  sound/virtio/virtio_pcm_msg.c   | 392 +++++++++++++++++++++++++
>  sound/virtio/virtio_pcm_ops.c   | 491 +++++++++++++++++++++++++++++++
>  17 files changed, 3287 insertions(+), 1 deletion(-)
>  create mode 100644 include/uapi/linux/virtio_snd.h
>  create mode 100644 sound/virtio/Kconfig
>  create mode 100644 sound/virtio/Makefile
>  create mode 100644 sound/virtio/virtio_card.c
>  create mode 100644 sound/virtio/virtio_card.h
>  create mode 100644 sound/virtio/virtio_chmap.c
>  create mode 100644 sound/virtio/virtio_ctl_msg.c
>  create mode 100644 sound/virtio/virtio_ctl_msg.h
>  create mode 100644 sound/virtio/virtio_jack.c
>  create mode 100644 sound/virtio/virtio_pcm.c
>  create mode 100644 sound/virtio/virtio_pcm.h
>  create mode 100644 sound/virtio/virtio_pcm_msg.c
>  create mode 100644 sound/virtio/virtio_pcm_ops.c
> 
> -- 
> 2.30.0
>
Anton Yakovlev Feb. 23, 2021, 12:33 p.m. UTC | #2
On 23.02.2021 13:09, Michael S. Tsirkin wrote:
> On Mon, Feb 22, 2021 at 04:34:35PM +0100, Anton Yakovlev wrote:
>> This series implements a driver part of the virtio sound device
>> specification v8 [1].
>>
>> The driver supports PCM playback and capture substreams, jack and
>> channel map controls. A message-based transport is used to write/read
>> PCM frames to/from a device.
>>
>> As a device part was used OpenSynergy proprietary implementation.
>>
>> v5 changes:
>>   - Fixed another bunch of sparse warnings
>>     (replaced virtio_cread() -> virtio_cread_le()), no functional changes.
>> (Sorry, I didn't know how to run sparse locally, now everything should be fixed)
>>
>> [1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html
> 
> 
> In the future please number patches from 1, not from 2.
> thanks!

But they are numbered automatically by git. Patch #1 is for virtio_ids.h


>>
>> Anton Yakovlev (9):
>>    uapi: virtio_ids: add a sound device type ID from OASIS spec
>>    ALSA: virtio: add virtio sound driver
>>    ALSA: virtio: handling control messages
>>    ALSA: virtio: build PCM devices and substream hardware descriptors
>>    ALSA: virtio: handling control and I/O messages for the PCM device
>>    ALSA: virtio: PCM substream operators
>>    ALSA: virtio: introduce jack support
>>    ALSA: virtio: introduce PCM channel map support
>>    ALSA: virtio: introduce device suspend/resume support
>>
>>   MAINTAINERS                     |   9 +
>>   include/uapi/linux/virtio_ids.h |   1 +
>>   include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++
>>   sound/Kconfig                   |   2 +
>>   sound/Makefile                  |   3 +-
>>   sound/virtio/Kconfig            |  10 +
>>   sound/virtio/Makefile           |  13 +
>>   sound/virtio/virtio_card.c      | 462 +++++++++++++++++++++++++++++
>>   sound/virtio/virtio_card.h      | 113 ++++++++
>>   sound/virtio/virtio_chmap.c     | 219 ++++++++++++++
>>   sound/virtio/virtio_ctl_msg.c   | 310 ++++++++++++++++++++
>>   sound/virtio/virtio_ctl_msg.h   |  78 +++++
>>   sound/virtio/virtio_jack.c      | 233 +++++++++++++++
>>   sound/virtio/virtio_pcm.c       | 498 ++++++++++++++++++++++++++++++++
>>   sound/virtio/virtio_pcm.h       | 120 ++++++++
>>   sound/virtio/virtio_pcm_msg.c   | 392 +++++++++++++++++++++++++
>>   sound/virtio/virtio_pcm_ops.c   | 491 +++++++++++++++++++++++++++++++
>>   17 files changed, 3287 insertions(+), 1 deletion(-)
>>   create mode 100644 include/uapi/linux/virtio_snd.h
>>   create mode 100644 sound/virtio/Kconfig
>>   create mode 100644 sound/virtio/Makefile
>>   create mode 100644 sound/virtio/virtio_card.c
>>   create mode 100644 sound/virtio/virtio_card.h
>>   create mode 100644 sound/virtio/virtio_chmap.c
>>   create mode 100644 sound/virtio/virtio_ctl_msg.c
>>   create mode 100644 sound/virtio/virtio_ctl_msg.h
>>   create mode 100644 sound/virtio/virtio_jack.c
>>   create mode 100644 sound/virtio/virtio_pcm.c
>>   create mode 100644 sound/virtio/virtio_pcm.h
>>   create mode 100644 sound/virtio/virtio_pcm_msg.c
>>   create mode 100644 sound/virtio/virtio_pcm_ops.c
>>
>> --
>> 2.30.0
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> 
>
Michael S. Tsirkin Feb. 23, 2021, 12:59 p.m. UTC | #3
On Tue, Feb 23, 2021 at 01:33:57PM +0100, Anton Yakovlev wrote:
> On 23.02.2021 13:09, Michael S. Tsirkin wrote:
> > On Mon, Feb 22, 2021 at 04:34:35PM +0100, Anton Yakovlev wrote:
> > > This series implements a driver part of the virtio sound device
> > > specification v8 [1].
> > > 
> > > The driver supports PCM playback and capture substreams, jack and
> > > channel map controls. A message-based transport is used to write/read
> > > PCM frames to/from a device.
> > > 
> > > As a device part was used OpenSynergy proprietary implementation.
> > > 
> > > v5 changes:
> > >   - Fixed another bunch of sparse warnings
> > >     (replaced virtio_cread() -> virtio_cread_le()), no functional changes.
> > > (Sorry, I didn't know how to run sparse locally, now everything should be fixed)
> > > 
> > > [1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html
> > 
> > 
> > In the future please number patches from 1, not from 2.
> > thanks!
> 
> But they are numbered automatically by git. Patch #1 is for virtio_ids.h

Weird somehow I was missing patch #1. Applied now, thanks!

> 
> > > 
> > > Anton Yakovlev (9):
> > >    uapi: virtio_ids: add a sound device type ID from OASIS spec
> > >    ALSA: virtio: add virtio sound driver
> > >    ALSA: virtio: handling control messages
> > >    ALSA: virtio: build PCM devices and substream hardware descriptors
> > >    ALSA: virtio: handling control and I/O messages for the PCM device
> > >    ALSA: virtio: PCM substream operators
> > >    ALSA: virtio: introduce jack support
> > >    ALSA: virtio: introduce PCM channel map support
> > >    ALSA: virtio: introduce device suspend/resume support
> > > 
> > >   MAINTAINERS                     |   9 +
> > >   include/uapi/linux/virtio_ids.h |   1 +
> > >   include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++
> > >   sound/Kconfig                   |   2 +
> > >   sound/Makefile                  |   3 +-
> > >   sound/virtio/Kconfig            |  10 +
> > >   sound/virtio/Makefile           |  13 +
> > >   sound/virtio/virtio_card.c      | 462 +++++++++++++++++++++++++++++
> > >   sound/virtio/virtio_card.h      | 113 ++++++++
> > >   sound/virtio/virtio_chmap.c     | 219 ++++++++++++++
> > >   sound/virtio/virtio_ctl_msg.c   | 310 ++++++++++++++++++++
> > >   sound/virtio/virtio_ctl_msg.h   |  78 +++++
> > >   sound/virtio/virtio_jack.c      | 233 +++++++++++++++
> > >   sound/virtio/virtio_pcm.c       | 498 ++++++++++++++++++++++++++++++++
> > >   sound/virtio/virtio_pcm.h       | 120 ++++++++
> > >   sound/virtio/virtio_pcm_msg.c   | 392 +++++++++++++++++++++++++
> > >   sound/virtio/virtio_pcm_ops.c   | 491 +++++++++++++++++++++++++++++++
> > >   17 files changed, 3287 insertions(+), 1 deletion(-)
> > >   create mode 100644 include/uapi/linux/virtio_snd.h
> > >   create mode 100644 sound/virtio/Kconfig
> > >   create mode 100644 sound/virtio/Makefile
> > >   create mode 100644 sound/virtio/virtio_card.c
> > >   create mode 100644 sound/virtio/virtio_card.h
> > >   create mode 100644 sound/virtio/virtio_chmap.c
> > >   create mode 100644 sound/virtio/virtio_ctl_msg.c
> > >   create mode 100644 sound/virtio/virtio_ctl_msg.h
> > >   create mode 100644 sound/virtio/virtio_jack.c
> > >   create mode 100644 sound/virtio/virtio_pcm.c
> > >   create mode 100644 sound/virtio/virtio_pcm.h
> > >   create mode 100644 sound/virtio/virtio_pcm_msg.c
> > >   create mode 100644 sound/virtio/virtio_pcm_ops.c
> > > 
> > > --
> > > 2.30.0
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> > 
> > 
> 
> -- 
> Anton Yakovlev
> Senior Software Engineer
> 
> OpenSynergy GmbH
> Rotherstr. 20, 10245 Berlin