[Buildroot] [PATCH v7 1/1] squeezelite: new package

川島 浩 kei-k at ca2.so-net.ne.jp
Tue Sep 22 02:52:23 UTC 2015


Hello.

And one more.

Actually, -DRESAMPLE and -DRESAMPLE_MP of squeezelite build, the essence of
difference is here (squeezelite/resample.c):
#if RESAMPLE_MP
    r->resampler = SOXR(r, create, raw_sample_rate, outrate, 2, &error, &io_spec, &q_spec, &r_spec);
#else
    r->resampler = SOXR(r, create, raw_sample_rate, outrate, 2, &error, &io_spec, &q_spec, NULL);
#endif
Just difference is passing r_spec or NULL for last arg.
So if I always define RESAMPLE and RESAMPLE_MP variables, it does not have side effect.
I think it’s better for simplification.

With these modification, I will send patch again.

Thank you,
Kawashima 

> 2015/09/22 10:11、川島 浩 <kei-k at ca2.so-net.ne.jp> のメール:
> 
> Hello.
> 
> Thank you for your comment.
> 
> About openmp issue, squeezelite is using openmp through libsoxr.
> I have realized that libsoxr in buildroot is compiled with
>    LIBSOXR_CONF_OPTS = -DWITH_OPENMP=OFF
> So, processing of resampling will result to use ordinal multi-thread ?
> 
> 
>> 2015/09/21 18:36、Thomas Petazzoni <thomas.petazzoni at free-electrons.com> のメール:
>> 
>> Hello,
>> 
>> On Mon, 21 Sep 2015 12:47:38 +0900, kei-k at ca2.so-net.ne.jp wrote:
>> 
>>> +config BR2_PACKAGE_SQUEEZELITE_ENABLE_RESAMPLE
>>> +	bool "Enable resampling function"
>>> +	default y
>>> +	depends on BR2_PACKAGE_SQUEEZELITE
>>> +	help
>>> +	  Enable resampling function
>>> +
>>> +config BR2_PACKAGE_SQUEEZELITE_WITH_RESAMPLE_MP
>>> +	bool "Use OpenMP for resampling"
>>> +	default y
>>> +	depends on BR2_PACKAGE_SQUEEZELITE_ENABLE_RESAMPLE
>>> +	help
>>> +	  Enable OpenMP support for resampling
>> 
>> The naming of the options is a bit inconsistent: "ENABLE" in one case
>> and "WITH" in the other case. I believe in fact you could simplify the
>> option naming to just:
>> 
>> BR2_PACKAGE_SQUEEZELITE_RESAMPLE
>> BR2_PACKAGE_SQUEEZELITE_RESAMPLE_OPENMP
>> 
>> However, I'm a bit worried about the OpenMP option. Does it require
>> OpenMP support in the toolchain? If yes, then not all toolchains have
>> OpenMP support, so we should handle that.
>> 
>>> +ifeq ($(BR2_PACKAGE_SQUEEZELITE_ENABLE_RESAMPLE),y)
>>> +	SQUEEZELITE_MAKE_OPTS += -DRESAMPLE
>>> +	ifeq ($(BR2_PACKAGE_SQUEEZELITE_WITH_RESAMPLE_MP),y)
>> 
>> Since BR2_PACKAGE_SQUEEZELITE_WITH_RESAMPLE_MP already depends on
>> BR2_PACKAGE_SQUEEZELITE_ENABLE_RESAMPLE, there's no real need to nest
>> the two tests. They can be made two separate tests.
>> 
>>> +		SQUEEZELITE_MAKE_OPTS += -DRESAMPLE_MP
>>> +	endif
>>> +endif
>>> +
>>> +define SQUEEZELITE_BUILD_CMDS
>>> +    $(TARGET_MAKE_ENV) $(MAKE) OPTS="$(SQUEEZELITE_MAKE_OPTS)" \
>>> +	CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
>> 
>> Have you tried using $(TARGET_CONFIGURE_OPTS) instead of manually
>> passing CC and LD ?
>> 
>> Thanks,
>> 
>> Thomas
>> -- 
>> Thomas Petazzoni, CTO, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
> 




More information about the buildroot mailing list