Skip to content

Instantly share code, notes, and snippets.

@phoenixthrush
phoenixthrush / set-mic.sh
Last active August 13, 2025 01:37
Fixing Sound BlasterX G6 Microphone on Linux #SoundBlasterXG6 #Linux #Microphone
#!/usr/bin/env bash
cardNumber=$(aplay -l|grep 'Sound BlasterX G6'|cut -d' ' -f 2 |tr -d ':')
amixer -c "$cardNumber" -q set "PCM Capture Source" "External Mic"
if [ $? -eq 0 ]; then
echo "PCM Capture Source successfully changed to 'External Mic'"
else
echo "Failed to configure PCM Capture source for Sound BlasterX G6"
fi