The Astro A20 headphones are NOT being registered as an output device on Ubuntu 20.04, even though the built-in mic is registered correctly as an input device.
Append the function below to your ~/.bashrc
and then you can simply type in a20
in the terminal whenever you need to connect your A20 headset.
It checks to make sure the headset is plugged in and uses a regex to automatically detect the card number, which often changes. The device number on the other hand seems to be always "1" (at least for me).
If you want to connect the headset at startup, simply copy the function body (what's inside the curly brackets) to ~/.profile
.
# Astro A20 headphones
a20() {
if (aplay -l | grep -q 'Astro A20') then
pactl load-module module-alsa-sink device=hw:"$(aplay -l | grep -oPm1 'card \K[\d\+]*?(?=: A20)')",1
else
echo "A20 not found"
fi
}
Hi!
I really don't want to wake the dead, but I'm very grateful I found this post. I still use A20 headphones and recently switched to a Debian based distro, Linux Mint.
Although this helped me to get onto the right track, I had to have a persistent sink name to connect it to the correct outputs. I came up with this solution which seems to work:
If you want to use this in a startup script (Startup Applications in Mint) , calling the function 'a20' directly and silent on startup, you just have to add :
This should always create a sink called 'Astro'.
I hope this helps!