Quote from: Wim Taymans on gitlab.freedesktop.orgTry setting api.alsa.headroom = 1024 in /etc/pipewire/media-session.d/alsa-monitor.conf
# ALSA node property overrides
# docs: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/alsa.html
# to reload,
# systemctl --user --now restart wireplumber
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_output.pci.*HiFi__HDMI1__sink"
}
]
actions = {
update-props = {
node.description = "HDMI1 Out" # less verbose
api.alsa.period-size = 1024
api.alsa.headroom = 256 # introduces latency for badly behaved drivers; 256 seems to work, 2048 may be a decent option idk
}
}
}
]
Quote from: pipewire docsapi.alsa.headroom
This adds extra delay between the hardware pointers and software pointers. In most cases this can be set to 0. For very bad devices or emulated devices (like in a VM) it might be necessary to increase the headroom value.
Type:
integer (samples)
Quote from: lifning on May 03, 2025, 03:43 AMAT&T Archives: The UNIX Operating System, a presentation largely by a young Brian Kernighan
Quote from: Electronics StackExchange (comment score: 3)You get a body diode whether you want it or not.
function hook_my_bbcode(&$codes, &$no_autolink_tags) {
// $no_autolink_tags is an array of tags that shouldn't have their
// content automatically turn into links. we'll be ignoring that
// here.
$codes[] = array(
// the tag will be [box][/box]
'tag' => 'box',
// more on this in a moment!
'type' => 'unparsed_content',
// $1 is the content between the tags
'content' => '<div style="border: 1px solid white;">$1</div>',
// Provide a function to transform the content the user entered.
// For example, [noguest] uses this to hide text from guests.
'validate' => function(&$tag, &$data, $disabled, $params)
{
// If the user didn't provide content, provide it for them :)
if (empty($data)) {
$data = "im in the box!";
}
},
// yes this is a block element
'block_level' => true,
);
}
type: one of...
- (missing): [tag]parsed content[/tag]
- unparsed_equals: [tag=xyz]parsed content[/tag]
- parsed_equals: [tag=parsed data]parsed content[/tag]
- unparsed_content: [tag]unparsed content[/tag]
- closed: [tag], [tag/], [tag /]
- unparsed_commas: [tag=1,2,3]parsed content[/tag]
- unparsed_commas_content: [tag=1,2,3]unparsed content[/tag]
- unparsed_equals_content: [tag=...]unparsed content[/tag]
$codes[] = array(
// the tag will be [box][/box]
'tag' => 'box',
// what to add before the content
'before' => '<div style="border: 1px solid white;">',
// what to add after the content
'after' => '</div>',
'block_level' => true,
);