[pulseaudio-discuss] LFE remixing

Alexander E. Patrakov patrakov at gmail.com
Tue Sep 30 06:59:27 PDT 2014


30.09.2014 19:07, David Henningsson wrote:
>
>
> On 2014-09-26 14:17, Tanu Kaskinen wrote:
>> A summary of my proposal:
>>
>> To add LFE low-pass filtering, just hack the current remixer
>> implementation, no need for interface changes anywhere.
>
> Actually, I think this could be good enough, at least as a first step.
>
> Do you think it would be okay to:
>
>   - Implement a LR2 or LR4 filter by "hacking the current remixer
> implementation"

For me, it would be okay, but I would prefer a slightly more complex 
plan, purely to avoid the blame of the form "you demand fully rewindable 
code everywhere from others but just wrote an LFE-remixer that doesn't 
handle rewinds correctly". The plan is:

1. Implement functions to calculate the coefficients of the required IIR 
filters for LR2 and/or LR4.

2. Implement, in a separate file, some set of functions that would allow 
one to apply an arbitrary matrix of IIR filters on a memblockq. Make 
sure they are fully rewindable (that's the PR part), write a test.

3. Connect functions from (2) to the existing remixer implementation. If 
it turns out that it is impossible to form the rewind requests 
correctly, write a TODO item.

(2), except the test, already sits on my laptop since the previous year 
in the form of a virtual sink. I just need to refactor it from the 
"parallel biquads" to the "chain of biquads" form (because both LR2 and 
LR4 have pairs of identical poles which are inexpressible in the 
parallel-biquads formulation) and remove the sink code.

>   - This requires us to add a "lfe-cutoff" parameter in daemon.conf, we
> can have a default of 120 Hz [1]. We could also have a special value of
> -1 meaning the current behaviour, i e sending a mix to lfe and leave the
> non-lfe channels unchanged

100% agree, including the default.

>   - When the filter is in place, we can enable-lfe-remixing by default.

I have no strong opinion here. For 2.1 speakers, it is definitely 
appropriate. For 5.1, not sure, as some of them have this functionality 
in hardware and others don't need it. But on laptops, 2.1 is a more 
common case, so let's do it. We can always refine the policy later.

-- 
Alexander E. Patrakov


More information about the pulseaudio-discuss mailing list