[OE-core] [PATCH] pulseaudio: rescale input being passed to float method of speex

Koen Kooi koen at dominion.thruhere.net
Thu Jan 16 19:16:00 UTC 2014


Op 16 jan. 2014, om 13:08 heeft Arslan, Fahad <Fahad_Arslan at mentor.com> het volgende geschreven:

>> It's also 10-50x slower on ARM, so always enabling float is a bad option. Just patch it to work, no matter what upstream says :)
> 
> Seems I misunderstood the statement earlier. So to confirm, do you mean I should submit patch here for original bug in Speex source code?

Whatever allows us to use fixed-point mode on fpuless systems

> 
> ________________________________________
> From: Koen Kooi [koen at dominion.thruhere.net]
> Sent: Friday, January 10, 2014 8:33 PM
> To: Arslan, Fahad
> Cc: Saul Wold; openembedded-core at lists.openembedded.org; Marcin Juszkiewicz
> Subject: Re: [OE-core] [PATCH] pulseaudio: rescale input being passed to float method of speex
> 
> Op 10 jan. 2014, om 08:48 heeft Arslan, Fahad <Fahad_Arslan at mentor.com> het volgende geschreven:
> 
>>> def get_speex_fpu_setting(bb, d):
>>>      if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
>>>              return "--enable-fixed-point --disable-float-api --disable-vbr"
>>>      return ""
>> 
>> If we are using Pulseaudio with default settings (speex-float-1) and
>> the if condition in above method is evaluated true, we will end up facing
>> the original issue: streams that need to be resampled are not playedback
>> since input to speex is zeroed out when float input passed by Pulseaudio
>> in range of +/-1 is converted to int.
>> 
>> So isn't Case 2 appropriate, thoughts?
> 
> It's also 10-50x slower on ARM, so always enabling float is a bad option. Just patch it to work, no matter what upstream says :)
> 
> 
>> 
>> Regards,
>> Fahad
>> 
>> ________________________________________
>> From: Koen Kooi [koen at dominion.thruhere.net]
>> Sent: Tuesday, January 07, 2014 3:22 PM
>> To: Arslan, Fahad
>> Cc: Saul Wold; openembedded-core at lists.openembedded.org; marcin at juszkiewicz.pl
>> Subject: Re: [OE-core] [PATCH] pulseaudio: rescale input being passed to float method of speex
>> 
>> Marcins linaro mail address has expired, adding the other one
>> 
>> Op 7 jan. 2014, om 11:03 heeft Koen Kooi <koen at dominion.thruhere.net> het volgende geschreven:
>> 
>>> 
>>> Op 7 jan. 2014, om 10:59 heeft Arslan, Fahad <Fahad_Arslan at mentor.com> het volgende geschreven:
>>> 
>>>>> What affect does it have on the overall size of speex
>>>> 
>>>> If we enable floating point support, there is decrease in size of libs.
>>>> libspeexdsp.so is ~480 KB in fixed point configuration
>>>> libspeexdsp.so is ~220 KB in floating point configuration
>>>> 
>>>> Further details are shown below:
>>>> 
>>>> 
>>>> Case-1 (current configuration)
>>>> ======
>>>> 
>>>> EXTRA_OECONF = " --enable-fixed-point --with-ogg-libraries=${STAGING_LIBDIR} \
>>>>              --disable-float-api --disable-vbr \
>>>>              --with-ogg-includes=${STAGING_INCDIR} --disable-oggtest"
>>>> 
>>>> build$
>>>> build$ ls -l src/.libs/speex*
>>>> -rwxr-xr-x 1 farslan farslan 75112 Jan  7 14:09 src/.libs/speexdec
>>>> -rwxr-xr-x 1 farslan farslan 76989 Jan  7 14:09 src/.libs/speexenc
>>>> build$ file src/.libs/speex*
>>>> src/.libs/speexdec: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
>>>> src/.libs/speexenc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
>>>> build$
>>>> build$
>>>> build$ ls -l libspeex/.libs/libspeex*.so.1.5.0
>>>> -rwxr-xr-x 1 farslan farslan 484940 Jan  7 14:09 libspeex/.libs/libspeexdsp.so.1.5.0
>>>> -rwxr-xr-x 1 farslan farslan 370309 Jan  7 14:09 libspeex/.libs/libspeex.so.1.5.0
>>>> build$
>>>> build$ file libspeex/.libs/libspeex*.so.1.5.0
>>>> libspeex/.libs/libspeexdsp.so.1.5.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
>>>> libspeex/.libs/libspeex.so.1.5.0:    ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
>>>> build$
>>>> 
>>>> 
>>>> Case-2 (suggested configuration)
>>>> ======
>>>> 
>>>> EXTRA_OECONF = " --with-ogg-libraries=${STAGING_LIBDIR} \
>>>>              --enable-float-api --disable-vbr \
>>>>              --with-ogg-includes=${STAGING_INCDIR} --disable-oggtest"
>>> 
>>> Or case 3, which I implemented 3 years ago in https://github.com/openembedded/openembedded/commit/e06553979d23531397af3dd71870abb80718c681 :
>>> 
>>> def get_speex_fpu_setting(bb, d):
>>>      if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
>>>              return "--enable-fixed-point --disable-float-api --disable-vbr"
>>>      return ""
>>> 
>>> 
>>> EXTRA_OECONF += "${@get_speex_fpu_setting(bb, d)}
>>> 
>>> That OE-classic recipe also has support for arm asm which speed things up a lot.
>>> 
>>> regards,
>>> 
>>> Koen
>> 
>> 
> 
> 




More information about the Openembedded-core mailing list