Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DAC Json Configuration for WM8960 #2159

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/plugins/system_controller/i2s_dacs/dacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
{"id":"st400-dac-amp","name":"ST400 Dac (PCM5122) - Amp","overlay":"iqaudio-dacplus","alsanum":"2","mixer":"Digital","modules":"","script":"","needsreboot":"yes"},
{"id":"taudac","name":"TauDAC - DM101","overlay":"taudac","alsanum":"2","mixer":"","modules":"","script":"","eeprom_name":"TauDAC-DM101","needsreboot":"yes"},
{"id":"terraberry-dac2","name":"Terra-Berry DAC 2/3","overlay":"i-sabre-q2m","alsanum":"2","alsacard":"DAC","mixer":"","modules":"","script":"","needsreboot":"yes"},
{"id":"es90x8q2m-dac","name":"Volumio ESS 9028QM","overlay":"es90x8q2m-dac","alsanum":"2","mixer":"Digital","modules":"","script":"","i2c_address":"48","needsreboot":"no"}
{"id":"es90x8q2m-dac","name":"Volumio ESS 9028QM","overlay":"es90x8q2m-dac","alsanum":"2","mixer":"Digital","modules":"","script":"","i2c_address":"48","needsreboot":"no"},
{"id":"wm8960-soundcard","name":"Waveshare - WM8960","overlay":"wm8960-soundcard,i2s-mmap","alsanum":"","alsacard":"wm8960soundcard","mixer":"Playback","modules":"","script":"wm8960-unmute.sh","i2c_address":"1a","needsreboot":"yes"}
]},
{"name":"Odroid C1+","data":[
{"id":"odroid-hifi-shield","name":"HiFi Shield","overlay":"","alsanum":"2","mixer":"","modules":"","script":""}
Expand Down
17 changes: 17 additions & 0 deletions app/plugins/system_controller/i2s_dacs/scripts/wm8960-unmute.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
CARD=wm8960soundcard

function level {
for s in "${@:2}"; do
amixer -c $CARD cset iface=MIXER,name="${s}" $1
done
}

level on "Right Output Mixer PCM Playback Switch" \
"Left Output Mixer PCM Playback Switch"
level 255 "Playback Volume"
level 109 "Headphone Playback Volume" "Speaker Playback Volume"
level 4 "Speaker DC Volume" "Speaker AC Volume"

alsactl store