notes

Log | Files | Refs

commit a856f2708b81f5ad3f4c9676c2e47d960d2cc425
parent 8a51d257118bee6d83123f59da068c733f20f06b
Author: ling0x <ling0x@users.noreply.github.com>
Date:   Mon, 29 Jun 2026 16:41:04 +0100

feat: linux audio

Diffstat:
Acommands/linux_audio.txt | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 121 insertions(+), 0 deletions(-)

diff --git a/commands/linux_audio.txt b/commands/linux_audio.txt @@ -0,0 +1,120 @@ +Quick overview (start here) + + ```bash + # Best single overview — devices, default in/out, volumes + wpctl status + + # Short lists of inputs (mics) and outputs (speakers/headphones) + pactl list sources short + pactl list sinks short + + # What's currently the default? + pactl get-default-source # default mic + pactl get-default-sink # default speaker/headphones + ``` + + On your machine right now, wpctl status shows mics including USB Audio + Front Microphone, C922 Webcam, and OpenFit Pro (Bluetooth); default output + is the Shokz headset. + + ─────────────────────────────────────────────────────────────────────────── + + PipeWire / PulseAudio layer + + ```bash + # Full detail on one device (replace SOURCE_NAME from list above) + pactl list sources | less + pactl list sinks | less + + # Set default mic/speaker by name or index + wpctl set-default <ID> # ID from `wpctl status` + pactl set-default-source <name> + pactl set-default-sink <name> + + # Live volume meters (useful before a call) + pavucontrol # GUI, if installed + ``` + + ─────────────────────────────────────────────────────────────────────────── + + ALSA hardware (kernel level) + + ```bash + # List capture (microphone) hardware + arecord -l + + # List playback hardware + aplay -l + + # See which ALSA cards the kernel sees + cat /proc/asound/cards + + # Per-card details + aplay -L # playback PCM devices + arecord -L # capture PCM devices + ``` + + Your ALSA capture devices: USB Audio (front/rear mics) and C922 Webcam mic. + + ─────────────────────────────────────────────────────────────────────────── + + USB / Bluetooth devices + + ```bash + # USB audio devices plugged in + lsusb | grep -i audio + + # Bluetooth audio devices + bluetoothctl devices + bluetoothctl info <MAC> # connection/profile details + ``` + + ─────────────────────────────────────────────────────────────────────────── + + Quick mic test (record 5 seconds) + + ```bash + # Record from default mic + arecord -d 5 -f cd /tmp/mic-test.wav && aplay /tmp/mic-test.wav + + # Record from a specific device (from `arecord -l`) + arecord -D hw:0,0 -d 5 -f cd /tmp/mic-test.wav + + # Record via PipeWire default source + pw-record --target=@DEFAULT_SOURCE@ /tmp/mic-test.wav + # Ctrl+C after a few seconds, then: + pw-play /tmp/mic-test.wav + ``` + + ─────────────────────────────────────────────────────────────────────────── + + Check audio services are running + + ```bash + systemctl --user status pipewire pipewire-pulse wireplumber + ``` + + ─────────────────────────────────────────────────────────────────────────── + + One-liner cheat sheet + + ┌───────────────────┬─────────────────────────────────────────────────────┐ + │ Goal │ Command │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ Full audio tree │ wpctl status │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ List mics │ pactl list sources short │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ List speakers │ pactl list sinks short │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ Default mic │ pactl get-default-source │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ Default output │ pactl get-default-sink │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ Hardware mics │ arecord -l │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ Hardware speakers │ aplay -l │ + ├───────────────────┼─────────────────────────────────────────────────────┤ + │ Test recording │ arecord -d 5 -f cd /tmp/test.wav && aplay │ + │ │ /tmp/test.wav │ + └───────────────────┴─────────────────────────────────────────────────────┘ +\ No newline at end of file