All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@aknet.ru>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: rate plugin issue
Date: Sat, 17 Nov 2007 17:59:53 +0300	[thread overview]
Message-ID: <473F01E9.8070907@aknet.ru> (raw)
In-Reply-To: <s5h6404dmsi.wl%tiwai@suse.de>

Hi.

Takashi Iwai wrote:
> What I don't like is the place you fix it.  This is not much better
> than the old hack, or it's even worse because it adds a hack in the
> common function not in the plugin.
That depends on what logic does the
fix imply. My logic was that the writei()
should not depend on avail_min, and just
always use period_size. Your logic is that
they both should respect avail_min when it
is >period_size, and from that point of view,
my fix is of course wrong and at the wrong
place.

> And above all, the fix would be really easy like the patch below.
Your patch works very well.
Actually, much better than mine, for
the reasons I can't explain (there is
probably another similar loop somewhere,
otherwise they would work in the similar
way).
Just a few questions:
1. Do you want to "round" avail_min only
when it is < period_size, or maybe you
want something like this instead:
---
avail_min += period_size - 1;
avail_min -= avail_min % period_size;
---
so that it is always rounded up?
2. What is it really good for? Why would
the one want avail_min != period_size?
Now, after you disallow avail_min<period_size,
it makes even less sense - why would
someone set avail_min>period_size, instead
of increasing the period_size itself?
So maybe something like this is also
possible:
---
/* there seem to be no reason to set avail_min,
 * period_size is enough */
avail_min = period_size;
---

> Then which version of mpg123 with which configuration?
But I am not sure if you tried _any_
mpg123 with any configuration. :)
Well, mine is mpg123-0.60-1.fc5.rf,
running on top of Fedora8.
---
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 0.60; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
---
But your patch works very well, so
perhaps you don't even need to test
it with mpg123 any more. :)

Thanks!

  reply	other threads:[~2007-11-17 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12  8:01 rate plugin issue Takashi Iwai
2007-11-12 19:25 ` Stas Sergeev
2007-11-13  3:20   ` Takashi Iwai
2007-11-14 20:10     ` Stas Sergeev
2007-11-15  6:51       ` Takashi Iwai
2007-11-17 14:59         ` Stas Sergeev [this message]
2007-11-19 11:09           ` Takashi Iwai
2007-11-19 21:09             ` Stas Sergeev
2007-11-20  6:31               ` Takashi Iwai
2007-12-18 15:43                 ` Timur Tabi
2007-12-19 12:50                   ` Takashi Iwai
2007-11-13 11:04   ` Takashi Iwai

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=473F01E9.8070907@aknet.ru \
    --to=stsp@aknet.ru \
    --cc=alsa-devel@alsa-project.org \
    --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.