[ubuntu] Audio fix on X1 Carbon Gen14.

This commit is contained in:
jmug
2026-11-18 23:41:29 -08:00
parent 8cda62c832
commit ba181a3bdd
2 changed files with 40 additions and 0 deletions
+37
View File
@@ -146,6 +146,43 @@ in {
syssw = "${homeDirectory}/nixos/ubuntu/bootstrap.sh";
};
# Friendlier names for the built-in SoundWire audio (Intel SOF "sof-soundwire"
# card), which otherwise shows up as "sof-soundwire Speaker" etc.
# TODO: X1 Carbon Gen 14 specific (harmless elsewhere: rules only match
# sof_sdw nodes). Move to a per-machine module when another host lands.
xdg.configFile."wireplumber/wireplumber.conf.d/51-builtin-audio-names.conf".text = ''
monitor.alsa.rules = [
{
matches = [ { device.name = "~alsa_card.*sof_sdw.*" } ]
actions = { update-props = { device.description = "Built-in Audio", device.nick = "Built-in Audio" } }
}
{
matches = [ { node.name = "~alsa_output.*sof_sdw.*Speaker.*" } ]
actions = { update-props = { node.description = "Speakers" } }
}
{
matches = [ { node.name = "~alsa_output.*sof_sdw.*Headphones.*" } ]
actions = { update-props = { node.description = "Headphones" } }
}
{
matches = [ { node.name = "~alsa_input.*sof_sdw.*Mic.*" } ]
actions = { update-props = { node.description = "Internal Microphones" } }
}
{
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI1.*" } ]
actions = { update-props = { node.description = "HDMI / DisplayPort 1" } }
}
{
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI2.*" } ]
actions = { update-props = { node.description = "HDMI / DisplayPort 2" } }
}
{
matches = [ { node.name = "~alsa_output.*sof_sdw.*HDMI3.*" } ]
actions = { update-props = { node.description = "HDMI / DisplayPort 3" } }
}
]
'';
# mise is installed by `ubuntu/bootstrap.sh tools`.
programs.zsh.initContent = ''
if [ -x "$HOME/.local/bin/mise" ]; then
+3
View File
@@ -23,3 +23,6 @@ clang
clangd
cmake
pkg-config
# Out-of-tree kernel modules:
dkms