Difference between revisions of "Scripts:hifiberry"

From Autopilot Wiki
Jump to: navigation, search
(Created page with "Category:Autopilot Script <syntaxhighlight lang="python"> 'hifiberry': { 'type': 'bool', 'text': 'Setup Hifiberry DAC/AMP?', 'commands': [...")
 
 
Line 2: Line 2:
  
 
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
'hifiberry': {
+
{'hifiberry': {
 
         'type': 'bool',
 
         'type': 'bool',
 
         'text': 'Setup Hifiberry DAC/AMP?',
 
         'text': 'Setup Hifiberry DAC/AMP?',
Line 11: Line 11:
 
             'echo -e \'pcm.!default {\\n type hw card 0\\n}\\nctl.!default {\\n type hw card 0\\n}\' | sudo tee /etc/asound.conf'
 
             'echo -e \'pcm.!default {\\n type hw card 0\\n}\\nctl.!default {\\n type hw card 0\\n}\' | sudo tee /etc/asound.conf'
 
         ]
 
         ]
     }
+
     }}
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 19:50, 30 November 2021


{'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'
        ]
    }}