Closed Fourdee closed 7 years ago
Detection:
if (( $( amixer -c 0 scontrols | grep -ci -m1 'DSP Program') ))
Or can we pull from /sys/....alsa?
Get list of available filters:
amixer -c0 sget 'DSP Program' | grep 'Items:'
Get current filter:
amixer -c0 sget 'DSP Program' | grep 'Item0:'
...
root@DietPi:~# echo -e "$DSP_FILTER_CONTROL_NAME"
'DSP Program'
root@DietPi:~# echo -e "$DSP_FILTER_TARGET"
'Low latency IIR with de-emphasis'
root@DietPi:~# amixer -c$SOUNDCARD_CARD_INDEX sset "$DSP_FILTER_CONTROL_NAME" "$DSP_FILTER_TARGET"
amixer: Invalid command!
get numid of dsp program:
amixer -c $SOUNDCARD_CARD_INDEX cget name="$DSP_FILTER_CONTROL_NAME" | grep 'numid=' | sed 's/[^0-9]//g'
List available filters and indexs
amixer -c $SOUNDCARD_CARD_INDEX cget numid=6 | grep 'Item #' | sed 's/.*#//g'
Completed
For devices that use the
pcm51xx
chipset: