[pulseaudio-discuss] [RFC PATCH 0/6] LFE filter

Raymond Yau superquad.vortex2 at gmail.com
Tue Feb 10 18:54:12 PST 2015

>>>> Hui and I have been working on some LFE filter patches lately, and this
>>>> is our first draft for review/feedback.
>>>> First, I have greedily stolen the math from CRAS, because CRAS is BSD
>>>> and
>>>> as I understand we don't have a problem with merging more liberal
>>>> licenses.
>>>> The LFE filter is implemented in the resampler, which means it is done
>>>> for
>>>> every sink-input rather than every sink - this might mean some
>>>> additional
>>>> CPU processing if many different streams play back at the same time, but
>>>> putting it on the sink side would disable the possibility to mix a 2.0
>>>> stream
>>>> with a 2.1 stream.
>>>> The rewind part is very drafty and untested, and I'm not sure I choose
>>>> the
>>>> best design here. But at least this is something that could act as
>>>> base for
>>>> discussion.
>>> Sorry for a possibly-stupid question, but...
>>> Which part of PulseAudio is supposed to disable the effect if the user
>>> plugs headphones in? Or is it yet to be written?
>> Hrm, that is actually a good question. In theory, I would expect
>> module-switch-on-port-available to switch profiles between 2.0 and 2.1
>> as headphones are plugged in and out, but in practice,
>>   - I'm not 100% sure if our "don't switch to HDMI" might prevent
>> switching from 2.1 to 2.0 when headphones are plugged in, and
>>   - As the 2.0 profile is available on speakers, that will continue to
>> be selected when headphones are unplugged.
>> So, while this is not directly related to whether there is an LFE filter
>> or not - we already have a 2.1, 5.1, etc, profiles - indeed the problem
>> might become worse with the LFE filter.
> Having given this a second thought, I'm thinking maybe an improvement of
> the priority-list based routing would be the best option. (Which I'm not
> working on as often as I perhaps should...).
> I e, the port-based priority list routing should also remember what
> profile a particular port was on.
> E g, first time boot you will start up on stereo + speaker (because stereo
> has higher prio than 2.1).
> The user then switches manually to 2.1 which makes the routing module
> remember "2.1 profile for speaker port".
> Then the user plugs headphones in. That causes a switch to stereo, because
> the headphones port is not supported on 2.1.
> After unplug again, the routing module will switch port to speaker (the
> highest priority port that is available) and profile to 2.1 (because it
> remembered that).
For notebook with internal subwoofer, user would expected pulseaudio
remember the selection of 2.0 profile and 2.1 profile after reboot instead
of select the profile everytime when pulseaudio restart

For notebook using internal speaker and external subwoofer, the selection
of 2.1 profile depend on whether the external subwoofer is plugged or not

> Currently, it doesn't allow using headphones at all on that PC if a
non-stereo profile is initially selected, so the question is pointless. It
currently can't switch from the stereo profile to 5.1, because it never
switched from 5.1 to stereo. As a user, I would indeed expect it to switch
to the stereo profile when I plug headphones, and switch to what I selected
before (e.g. to 5.1) when I unplug headphones.

In theory, the virtual master still control the headphone volume even in
5.1 as the snd-hda-intel driver just copy the front signal to both line out
and headphone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150211/d46bdd48/attachment.html>

More information about the pulseaudio-discuss mailing list