public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Pavel Hofman <pavel.hofman@ivitera.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: alsa-lib rate plugins - float samples - patches
Date: Fri, 01 Jul 2011 11:50:17 +0200	[thread overview]
Message-ID: <4E0D9859.5050009@ivitera.com> (raw)
In-Reply-To: <s5hei2a8hsj.wl%tiwai@suse.de>

Dne 1.7.2011 11:35, Takashi Iwai napsal(a):
> At Fri, 01 Jul 2011 11:27:03 +0200,
>>
>> Hi Takashi, thanks a lot for your reply. Would moving the new method to
>> the end of snd_pcm_rate_ops struct suffice?
> 
> This is needed together with the API version bump.
> Increase SND_PCM_RATE_PLUGIN_VERSION, change rate_open_func() to call
> all older versions, and don't use the new methods for older versions.

OK, I will fight it :)

> 
>> Or do I have to create a new
>> API number with corresponding checks? I am afraid the latter is the case :)
>>
>>>
>>> - From the performance POV, we may need to have the built-in
>>>   float conversion in rate plugin indeed.  Anyway, if rate plugin
>>>   supports float, it should add FLOAT as the supported format.
>>>   This needs changes in the parameter setup in rate plugin.
>>>   Then it should accept the float format as is without conversions.
>>
>> If I understand correctly, the rate plugin accepts only linear formats
>> now. What was the original reason to exclude float?
> 
> Because the existing rate-converter are only for linear formats :)

OK, I will try to provide automatic conversion to/from floats in the
rate converters in alsa-plugin git for the new API version to include
float support.

> 
>> The "convert" API
>> method is generic enough, perhaps I should add float support to all the
>> rate converters using the API "convert" method. Again there is the
>> question of new API version - the new one would offer convert_float and
>> allow float samples in the generic convert method.
>>
>> The specific convert_s16/float methods in pcm_rate.c can be modified to
>> accept float too.
> 
> I don't mind how it'll be implemented as long as the backward
> compatibility is kept somehow.

Backward compatibility - I assume you mean any combination of alsa-lib
and alsa-plugins :) OK, I will try.


> 
> HAVE_SOFT_FLOAT is a bit confusing name.  It means actually NO_FLOAT,
> or better to say, NO_FLOAT_CALCULATION.  Thus ifndef is correct
> below.

OK, how about if I rename the constant accordingly?

>>
>> Well, the libsamplerate is using float internally, I am afraid the
>> float-less case would require disabling this rate converter alltogether.
> 
> Currently yes, but who knows in future?  The library internal can
> change.

OK. I will make patches for alsa-lib first and then we will see.

Regards,


Pavel.

      reply	other threads:[~2011-07-01  9:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20  7:35 alsa-lib rate plugins - float samples Pavel Hofman
2011-06-28  7:11 ` alsa-lib rate plugins - float samples - patches Pavel Hofman
2011-06-30 12:48   ` Takashi Iwai
2011-07-01  9:27     ` Pavel Hofman
2011-07-01  9:35       ` Takashi Iwai
2011-07-01  9:50         ` Pavel Hofman [this message]

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=4E0D9859.5050009@ivitera.com \
    --to=pavel.hofman@ivitera.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox