All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Takashi Iwai <tiwai@suse.de>,
	David Henningsson <david.henningsson@canonical.com>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Clemens Ladisch <clemens@ladisch.de>
Subject: Re: Master Plan on rewinding
Date: Sun, 14 Sep 2014 00:35:30 +0600	[thread overview]
Message-ID: <54148E72.2050903@gmail.com> (raw)
In-Reply-To: <540C76E0.9050808@gmail.com>

07.09.2014 21:16, Alexander E. Patrakov wrote:
> 1. PulseAudio does not call snd_pcm_rewindable(), because for some ALSA
> plugins it crashed. This crash is completely fixed in alsa-lib 1.0.28,
> but in some cases snd_pcm_rewindable() still returns wrong results.

Bad news: even in 1.0.28, snd_pcm_rewindable() crashes for the file 
plugin due to recursion. So I was wrong when saying "fixed completely" :(

> 3. On the hw plugin, I could demonstrate two other bugs regarding
> snd_pcm_rewindable(): stale data and bogus negative return values.

For all of the above issues, I have sent patches.

> === On the rewind safeguard ===

Result 1: it has been decided that the return value of 
snd_pcm_rewindable() is not changed, and the safeguard is returned by a 
separate function. This would require documentation changes for 
snd_pcm_rewindable(), though, as it officially no longer returns "safe 
count of frames which can be rewinded". I have difficulty designing a 
better wording what the function actually means now.

Result 2: the proposed heuristic has been rightfully and convincingly 
busted, but no alternatives were proposed. It is the top priority to get 
some constructive proposal here where to get the data, or a fallback 
plan for alsa-lib. A fallback plan is also needed for old kernels if the 
constructive proposal involves kernel changes.

> === On non-rewindability of the rate plugin ===

Nothing more to discuss.

> === On possibly-incomplete rewindability of the file plugin ===

Nothing more to discuss.

> === On bogus rewindability of ladspa and extplug plugins ===

No conclusion. The proposed hack to leave the .rewind implementation in 
place for use by old PulseAudio has met some opposition, but not such 
definite and convincing opposition as to the rewind-safeguard and 
low-latency-thread proposals. The proposed alternative (to make a 
"disallow imperfect rewinds" flag, off by default) means more work for 
no gain, and David also doubts whether such flag is worth the 
complexity. It's also notable that nobody explicitly said "let's regress 
old pulseaudio on new alsa-lib on the obscure dca plugin in the name of 
clean code" - which would have also closed the question :)

In fact, I am not really sure that everyone understands the problem.

> === On bogus rewindability of some ioplug-based plugins ===

The "low-latency-thread in ioplug" idea has been rightfully busted, and 
transformed into the "flexiblerewind" plugin idea. However, that plugin 
found no users (as PulseAudio won't use it), and thus there is no 
incentive for me or anyone else to implement it. Nothing left to discuss.

> === On the pulse plugin ===

We have reached an agreement that .rewindable and .rewind should be 
added to ioplug and used by the pulse plugin. Nothing more to discuss.

> === On communication of non-rewindability to the program ===

We have very good progress here: recognition of three rewindability 
classes that seemingly nobody objects to. The wanted behavior of 
PulseAudio for each rewindability class is not something we currently 
fully agree upon, though, but I think that it will be more appropriate 
to discuss further when someone sends a PulseAudio patch making use of 
these classes. I.e. not now. It is very good that there is at least one 
more person (Pierre Bossart) who understands the inherent conflict of 
requirements.

Transition plan remains to be discussed, but that's the same discussion 
as the one called for in the "rewind safeguard" part of the post.

> === On the programmer expectations ===
>
> (social issue)

Resolved (was misinterpretation on my side). I have to submit the 
documentation patch.

-- 
Alexander E. Patrakov

  parent reply	other threads:[~2014-09-13 18:35 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 15:16 Master Plan on rewinding Alexander E. Patrakov
2014-09-07 18:38 ` Tanu Kaskinen
2014-09-07 19:05   ` Alexander E. Patrakov
2014-09-07 20:51 ` Clemens Ladisch
2014-09-08  3:06   ` Raymond Yau
2014-09-08  7:31   ` Alexander E. Patrakov
2014-09-09  8:43     ` Clemens Ladisch
2014-09-09  8:55       ` Alexander E. Patrakov
2014-09-09  9:08         ` David Henningsson
2014-09-09  9:31           ` Alexander E. Patrakov
2014-09-21  2:02             ` Raymond Yau
2014-09-22 13:20               ` Lars-Peter Clausen
2014-09-22 13:36                 ` Alexander E. Patrakov
2014-09-22 13:44                   ` Lars-Peter Clausen
2014-09-23  8:29                   ` Raymond Yau
2014-09-23 10:22                     ` Alexander E. Patrakov
2014-09-09 13:45         ` Clemens Ladisch
2014-09-09 15:55           ` Alexander E. Patrakov
2014-09-09 16:09             ` Takashi Iwai
2014-09-07 23:12 ` David Henningsson
2014-09-09 19:56   ` Pierre-Louis Bossart
2014-09-10  5:38     ` Alexander E. Patrakov
2014-09-08  7:34 ` Lars-Peter Clausen
2014-09-08  7:59 ` David Henningsson
2014-09-08  8:46   ` Alexander E. Patrakov
2014-09-08  9:26     ` David Henningsson
2014-09-08 10:21       ` Alexander E. Patrakov
2014-09-09  8:43         ` Clemens Ladisch
2014-09-11  3:49 ` Raymond Yau
2014-09-11  4:19   ` A. C. Censi
2014-09-13  9:15     ` Raymond Yau
2014-09-11  5:28   ` Alexander E. Patrakov
2014-09-11  6:21     ` Raymond Yau
2014-09-13  8:57     ` Raymond Yau
2014-09-13 10:43       ` Alexander E. Patrakov
2014-09-13 11:33         ` Raymond Yau
2014-09-13 11:36           ` Alexander E. Patrakov
2014-09-13 18:35 ` Alexander E. Patrakov [this message]
2014-09-14 11:37   ` Raymond Yau
2014-09-14 12:07     ` Alexander E. Patrakov
2014-09-15  2:43       ` Raymond Yau
2014-09-15  9:19       ` Takashi Iwai
2014-09-15  9:58         ` Alexander E. Patrakov
2014-09-15 10:08           ` Takashi Iwai
2014-09-15 17:01             ` Pierre-Louis Bossart
2014-09-15 17:14               ` Alexander E. Patrakov
2014-09-15 18:08                 ` Takashi Iwai
2014-09-18  1:15                   ` Raymond Yau
2014-09-21  9:22                     ` Alexander E. Patrakov
2014-09-21  9:53                     ` Clemens Ladisch
2014-09-21 10:56                       ` Alexander E. Patrakov
2014-09-22  3:27                       ` Raymond Yau

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=54148E72.2050903@gmail.com \
    --to=patrakov@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=david.henningsson@canonical.com \
    --cc=o-takashi@sakamocchi.jp \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.