{"action":"opened","issue":{"url":"https://api.github.com/repos/cesarvandevelde/OnoSW/issues/2","labels_url":"https://api.github.com/repos/cesarvandevelde/OnoSW/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/cesarvandevelde/OnoSW/issues/2/comments","events_url":"https://api.github.com/repos/cesarvandevelde/OnoSW/issues/2/events","html_url":"https://github.com/cesarvandevelde/OnoSW/issues/2","id":104455649,"number":2,"title":"ALSA configuration","user":{"login":"cesarvandevelde","id":4973479,"avatar_url":"https://avatars.githubusercontent.com/u/4973479?v=3","gravatar_id":"","url":"https://api.github.com/users/cesarvandevelde","html_url":"https://github.com/cesarvandevelde","followers_url":"https://api.github.com/users/cesarvandevelde/followers","following_url":"https://api.github.com/users/cesarvandevelde/following{/other_user}","gists_url":"https://api.github.com/users/cesarvandevelde/gists{/gist_id}","starred_url":"https://api.github.com/users/cesarvandevelde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesarvandevelde/subscriptions","organizations_url":"https://api.github.com/users/cesarvandevelde/orgs","repos_url":"https://api.github.com/users/cesarvandevelde/repos","events_url":"https://api.github.com/users/cesarvandevelde/events{/privacy}","received_events_url":"https://api.github.com/users/cesarvandevelde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-02T11:03:47Z","updated_at":"2015-09-02T11:03:47Z","closed_at":null,"body":"OnoHAT rev. 3 contains a I2S DAC + class-D amplifier to drive the speaker. This I2S DAC requires special configuration:  \r\n\r\n/etc/modules should be edited as following:\r\n```\r\n#snd-bcm2835\r\nsnd_soc_core\r\nsnd_soc_bcm2708_i2s\r\nbcm2708_dmaengine\r\nsnd_soc_pcm1794a\r\nsnd_soc_rpi_dac\r\n```\r\n\r\nIn addition, device tree should be disabled in raspi-config.  \r\n\r\nWith these changes, the speaker should be enabled, however ALSA seems to be quite picky and will not play mono files over this sound card. (The DAC is in fact stereo, but the amplifier is mono and is connected to the left channel.)  \r\nSpeaker can be tested with:\r\n```\r\nspeaker-test -c 2 -t sine -f 600\r\n```\r\n\r\nPicoTTS files and the default sound samples are mono files however, and aplay will refuse to play them over this sound card.  Current workaround uses ecasound to convert sound files to the correct format on the fly. However, this method introduces a delay in sound playback.  \r\n\r\nThe sound coming from the speaker is also quite limited in volume, however, this is a hardware issue which will be fixed in a new board revision. Preliminary debugging attempts indicate that the problem should also be fixable using some bodge wires and passive components in rev3 boards."}}