Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1705543

Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation

From Clemens Ladisch <clemens@ladisch.de>
Newsgroups linux.kernel
Subject Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation
Date 2017-08-07 16:00 +0200
Message-ID <ubQJz-xP-13@gated-at.bofh.it> (permalink)
References (1 earlier) <ubKXx-5k4-51@gated-at.bofh.it> <ubNC2-714-13@gated-at.bofh.it> <ubOy6-7Bo-21@gated-at.bofh.it> <ubQ6S-fz-21@gated-at.bofh.it> <ubQqd-nB-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Oleksandr Andrushchenko wrote:
> On 08/07/2017 04:11 PM, Clemens Ladisch wrote:
>> How does that interface work?
>
> For the buffer received in .copy_user/.copy_kernel we send
> a request to the backend and get response back (async) when it has copied
> the bytes into HW/mixer/etc, so the buffer at frontend side can be reused.

So if the frontend sends too many (too large) requests, does the
backend wait until there is enough free space in the buffer before
it does the actual copying and then acks?

If yes, then these acks can be used as interrupts.  (You still
have to count frames, and call snd_pcm_period_elapsed() exactly
when a period boundary was reached or crossed.)

Splitting a large read/write into smaller requests to the backend
would improve the granularity of the known stream position.

The overall latency would be the sum of the sizes of the frontend
and backend buffers.


Why is the protocol designed this way?  Wasn't the goal to expose
some 'real' sound card?


Regards,
Clemens

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/11] ALSA: vsnd: Add Xen para-virtualized frontend driver Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 01/11] ALSA: vsnd: Implement driver's probe/remove Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 06/11] ALSA: vsnd: Introduce ALSA virtual sound driver Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 10/11] ALSA: vsnd: Implement communication with backend Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 05/11] ALSA: vsnd: Implement handling of shared buffers Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 09/11] ALSA: vsnd: Implement ALSA PCM operations Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 02/11] ALSA: vsnd: Implement Xen bus state handling Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 07/11] ALSA: vsnd: Initialize virtul sound card Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
  [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
    Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Clemens Ladisch <clemens@ladisch.de> - 2017-08-07 12:40 +0200
      Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 13:40 +0200
        Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Clemens Ladisch <clemens@ladisch.de> - 2017-08-07 15:20 +0200
          Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 15:40 +0200
            Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Clemens Ladisch <clemens@ladisch.de> - 2017-08-07 16:00 +0200
              Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 17:20 +0200
                Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period  interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-08 08:10 +0200
  Re: [PATCH 00/11] ALSA: vsnd: Add Xen para-virtualized frontend  driver Takashi Sakamoto <o-takashi@sakamocchi.jp> - 2017-08-07 13:40 +0200
    Re: [PATCH 00/11] ALSA: vsnd: Add Xen para-virtualized frontend  driver Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 13:40 +0200

csiph-web