Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rern authored Feb 14, 2024
1 parent 05980ed commit fce43a0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Notes/ALSA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,24 @@ amixer -M -c $card sget "$control" \
| awk -F'[%[]' '/%/ {print $2}' \
| head -1

# set % linear scale
# sset linear scale
amixer -M -c $card sset "$control" 50%

# set dB
# mute
amixer -c $card sset "$control" [on|off|toggle]
# sset dB
amixer -c $card sset "$control" 0dB
amixer -c $card sset "$control" [on|off|toggle] # mute
amixer -c $card sset "$control" .1dB-
amixer -c $card sset "$control" .1dB+

# get numid
numid=$( amixer -c $card controls | grep 'Playback Volume' | cut -d, -f1 )
numidsw=$( amixer -c $card controls | grep 'Playback Switch' | cut -d, -f1 )

# set dB
amixer -c $card cset $numid 0dB # 100% (no % scale)
amixer -c $card cset $numid 50% # 50% of min-max dB (not in linear scale)
amixer -c $card cset $numidsw [on|off-toggle] # mute
# cset dB
amixer -c $card cset $numid 0 # no linear scale
amixer -c $card cset $numid 50% # % of max-min dB (not in linear scale)
# mute
amixer -c $card cset $numidsw [on|off-toggle]
```

`scontrols`
Expand Down

0 comments on commit fce43a0

Please sign in to comment.