Skip to content

Commit

Permalink
v7.1
Browse files Browse the repository at this point in the history
+ DietPi-Set_hardware | soundcard: Fix amixer controls loop when generic USB DAC is selected, which did split at spaces within the control name. Use the unique numid (first field) as identifier. Outstanding test: Set "100%" for controls which do not take percentage values or are actually no volumes, like "Playback switch".
  • Loading branch information
MichaIng authored Apr 6, 2021
1 parent b6e17a5 commit 744bd8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -1839,10 +1839,11 @@ Do you want to continue and DISABLE Bluetooth now?' || return 1
[[ $INPUT_DEVICE_VALUE == *'1.1' ]] && G_EXEC sed -i 's/aotg\.aotg1_speed=0/aotg.aotg1_speed=1/' $FP_UENV

# Unmute all (re: @sudeep)
for x in $(amixer -c "$SOUNDCARD_TARGET_CARD" controls | grep layback)
while read -r line
do
G_EXEC amixer -c "$SOUNDCARD_TARGET_CARD" cset "$x" 100%
done
G_EXEC amixer -c "$SOUNDCARD_TARGET_CARD" cset "$line" 100%

done < <(amixer -c "$SOUNDCARD_TARGET_CARD" controls | mawk -F, '/layback/{print $1}')

# Odroid C2: https://github.com/MichaIng/DietPi/issues/2101
elif (( $G_HW_MODEL == 12 )); then
Expand Down

0 comments on commit 744bd8e

Please sign in to comment.