Scripts:hifiberry
From Autopilot Wiki
{'hifiberry': {
'type': 'bool',
'text': 'Setup Hifiberry DAC/AMP?',
'commands': [
{'command': 'sudo adduser pi i2c', 'optional': True},
'sudo sed -i \'s/^dtparam=audio=on/#dtparam=audio=on/g\' /boot/config.txt',
'sudo sed -i \'$s/$/\\ndtoverlay=hifiberry-dacplus\\ndtoverlay=i2s-mmap\\ndtoverlay=i2c-mmap\\ndtparam=i2c1=on\\ndtparam=i2c_arm=on/\' /boot/config.txt',
'echo -e \'pcm.!default {\\n type hw card 0\\n}\\nctl.!default {\\n type hw card 0\\n}\' | sudo tee /etc/asound.conf'
]
}}