[alsa-devel] [PATCH] Bugfix: Fix resampling when client and slave both use format float

Takashi Iwai tiwai at suse.de
Mon Feb 24 14:19:15 CET 2014

At Mon, 24 Feb 2014 13:13:44 +0100,
Maarten Baert wrote:
> On 24/02/14 10:17, Takashi Iwai wrote:
> > Can S32 work instead of S16?  Then we won't lose the accuracy so much.
> > Of course, handling float directly would be the best option.
> The samplerate and speexrate plugins currently take S16 (see
> pcm_src_convert_s16 in alsa-plugins/rate/rate_samplerate.c and
> alsa-plugins/rate/rate_speexrate.c), so just using S32 will not improve
> the accuracy.

Ah, I forgot it.  We should fix these plugins to allow S32 if
available, too...

> It would be easy to replace those functions with
> pcm_src_convert_float (both resampler libraries have functions that take
> float directly), but that will break the plugin ABI. Is that acceptable?
> The same would have to be done for the channel remapping (route
> conversion) plugin.

It's fine as long as the plugin is backward compatible.
That is, pcm_rate.c checks the plugin version and uses the new ops
only for objects advertising the newer version.  See pcm_extplug.c.
There are some codes checking version numbers.

> > In anyway, could you give your acked-by tag?
> Sorry, I don't know what you mean - this is the first time I've
> submitted a patch here.

Just give a line "Signed-off-by: Your Name <your at mail>" in the patch
changelog.  See Documentation/SubmittingPatches (section "sign your
work") for details.  This is a standard procedure required for
linux-kernel patch management, and we follow it for alsa-lib and
others in general.



More information about the Alsa-devel mailing list