{"id":23300483,"url":"https://github.com/paulh002/rpi-audio-hat","last_synced_at":"2026-02-17T07:04:01.917Z","repository":{"id":107274634,"uuid":"529886536","full_name":"paulh002/rpi-audio-hat","owner":"paulh002","description":"Raspberry Pi PCM1808 and 5102 audio hat for SDR tranceiver","archived":false,"fork":false,"pushed_at":"2022-08-28T15:32:35.000Z","size":1045,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T02:43:08.830Z","etag":null,"topics":["audio","hat","raspberry-pi","sdr"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulh002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-28T14:30:01.000Z","updated_at":"2024-08-02T19:48:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"c480214a-4417-4d98-a013-a25ababa98c1","html_url":"https://github.com/paulh002/rpi-audio-hat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paulh002/rpi-audio-hat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulh002%2Frpi-audio-hat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulh002%2Frpi-audio-hat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulh002%2Frpi-audio-hat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulh002%2Frpi-audio-hat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulh002","download_url":"https://codeload.github.com/paulh002/rpi-audio-hat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulh002%2Frpi-audio-hat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012186,"owners_count":26085079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","hat","raspberry-pi","sdr"],"created_at":"2024-12-20T09:16:14.803Z","updated_at":"2025-10-12T17:21:03.189Z","avatar_url":"https://github.com/paulh002.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpi-audio-hat\nRaspberry Pi PCM1808 and 5102 audio hat for SDR tranceiver.\nThis board can be used with the Tayloe mixers in this repo https://github.com/paulh002/SoapyHifiBerry as alternative for the HifiBerry\nThe SoapyHifiBerry driver is used to supply IQ signals to the SDR software see sdrberry SDR software (https://github.com/paulh002/sdrberry)\nConfigure the SoapyHifiBerry config file with the correct audio board name and sample frequencey\n\nTo test the board:\n- To check if board is loaded:\n```\naplay -l \narecord -l\n```\n\n- Reord and play:\n```\narecord -D hw:0,1 -c 2 -f S24_LE -r 96000 test.wav\naplay -c2 -f S24_LE -r 96000 test.wav\n```\n\n## Hardware\nKicad files and gerbers are availeble in hardware directory.\nR10 and R11 are used to switch between clock from the Pi or internal PLL of the pcm5102 (gnd is internal pll)\nJ5 exposes I2S for setting the mixer frequency of the si5351 on the Tayloe mixer board.\n\n## Prototype\nPicture shows prototype using cheep aliexpress adc and dac boards\nTo connect the boards you can use this table:\n\npcm 5102\n| Board | GPIO | Pin |\n| ----- | ---- | --- |\n| SCK   |  4   |  12 | // or connect to gnd\n| LCK   | 19   |  35 |\n| BCK   | 18   |  12 |\n| DIN   | 21   |  40 |\n| 5V    | 5V   |   2 |\n| FMT   | GND  |  19 |\n| FLT   | GND  |  19 |\n| XSMT  | 3v   |   1 |\n\npcm 1808\n| Board| GPIO | Pin |\n| ---- | ---- | --- |\n| SCK  |  4   |  12 | // or connect to gnd\n| LCK  | 19   |  35 |\n| BCK  | 18   |  12 |\n| Dout | 20   |  38 |\n| MD0  | 3V   |   1 |\n| MD1  | 3V   |   1 |\n| 5V   | 5V   |   2 |\n| 3V   | 3V   |   1 |\n| SCLK |  4   |   7 |  // SCLK need a clock, this can be generated by raspberry pi (See PiClock) but better is to use an xtal oscillator 24.576 Mhz for 96 Khz or 49.125 to overclock to 196 Khz\n\n![prototype](https://github.com/paulh002/rpi-audio-hat/blob/main/prototype.jpg)\n\n## Kicad files\nKicad design is a pcb version of the audio board\n\n![pcb](https://github.com/paulh002/rpi-audio-hat/blob/main/RPi_Hat.png)\n\n\n## How compile and install driver for pcm1808 and pcm5102\nTo support the audio card in slave mode an overlay need to be created. The raspberry pi supports already most audio cards with pcm1808 and pcm5102.\nThe procedure and files are taken from Akiyuki Okayasu github page https://github.com/AkiyukiOkayasu/RaspberryPi_I2S_Slave\n\nCompile on Raspberry Pi  \n```bash\ndtc -@ -H epapr -O dtb -o genericstereoaudiocodec.dtbo -Wno-unit_address_vs_reg genericstereoaudiocodec.dts\n```\n\nCopy genericstereoaudiocodec.dtbo to /boot/overlays  \n```bash\nsudo cp genericstereoaudiocodec.dtbo /boot/overlays\n```\n\nEdit /boot/config.txt  \nEnable I2S and add genericstereoaudiocodec device tree overlay  \n```/boot/config.txt    # Uncomment some or all of these to enable the optional hardware interface\n#dtparam=i2c_arm=on\ndtparam=i2s=on\n#dtparam=spi=on\ndtoverlay=genericstereoaudiocodec\n```\n\nIf you don't need HDMI audio output and Raspberry Pi's headphone output, comment out \"dtparam=audio=on\" by hash.  \nlike this.  \n```/boot/config.txt\n#dtparam=audio=on\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulh002%2Frpi-audio-hat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulh002%2Frpi-audio-hat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulh002%2Frpi-audio-hat/lists"}