04-19-2020, 12:27 PM
The method for getting the mixer name has changed in upcoming 6.5.0 release.
Try the command below and let me know if it returns the correct mixer name for your audio device.
If it works then edit the file below, comment out the existing awk and add the new awk in the specified code block
Try the command below and let me know if it returns the correct mixer name for your audio device.
Code:
amixer -c 1 | awk 'BEGIN{FS="\n"; RS="Simple mixer control"} $0 ~ "pvolume" {print $1}' | awk -F"'" '{print "(" $2 ")";}'
If it works then edit the file below, comment out the existing awk and add the new awk in the specified code block
Code:
sudo nano /var/www/command/util.sh
code block:
# Get alsa mixer name
if [[ $1 = "get-mixername" ]]; then
CARD_NUM=$(sqlite3 $SQLDB "select value from cfg_system where param='cardnum'")
#awk -F"'" '/Simple mixer control/{print "(" $2 ")";}' <(amixer -c $CARD_NUM)
amixer -c $CARD_NUM | awk 'BEGIN{FS="\n"; RS="Simple mixer control"} $0 ~ "pvolume" {print $1}' | awk -F"'" '{print "(" $2 ")";}'
exit
fi