pmaports/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua
shtirlic 97e752caaf
soc-qcom-sdm845: fix pops/clicks sound via alsa buffer tuning (MR 4186)
Update some alsa buffer params to solve sound quality issues

I got working values experimentally after trying
different buffer sizes and limits and watching to pw-top
to ensure there are  no errors during playback from diffrent apps and
sinks.

Contributes to #1534
2023-06-28 10:07:33 +02:00

38 lines
903 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",
["audio.rate"] = 48000,
["api.alsa.period-size"] = 4096,
["api.alsa.period-num"] = 6,
["api.alsa.headroom"] = 512,
},
}
)
-- 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,
},
}
)