pmaports/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua
Bart Ribbers b982708186
soc-qcom-sdm845: apply workaround for working audio on PipeWire (MR 4139)
Out of the box audio is really quiet and distorted on SDM845 devices when
using PipeWire. This can be worked around by forcing audio to 16 bits
(which PulseAudio uses by default and thus works). This seems to be a
kernel problem and should be fixed properly there but for now we can
apply this workaround to at least be able to switch to PipeWire anytime
soon. The actual workaround is applied by Wireplumber so the dependency
for the subpackage is set to that.

Upstream issue https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3193
[ci:skip-build]: already built successfully in CI
2023-06-05 14:45:38 +02:00

34 lines
742 B
Lua

-- PipeWire's S24LE default audio format is broken in the kernel driver
table.insert(alsa_monitor.rules,
{
matches = {
{
{ "node.name", "matches", "alsa_output.*.HiFi*__sink" },
},
{
{ "node.name", "matches", "alsa_input.*.HiFi*__source" },
},
},
apply_properties = {
["audio.format"] = "S16LE",
},
}
)
-- Disable suspend for Voice Call devices
table.insert(alsa_monitor.rules,
{
matches = {
{
{ "node.name", "matches", "alsa_output.*.Voice_Call*__sink" },
},
{
{ "node.name", "matches", "alsa_input.*.Voice_Call*__source" },
},
},
apply_properties = {
["audio.format"] = "S16LE",
["session.suspend-timeout-seconds"] = 0,
},
}
)