{"id":25029134,"url":"https://github.com/jujax/lyrat_passthru","last_synced_at":"2025-04-13T16:10:10.573Z","repository":{"id":41829441,"uuid":"305013244","full_name":"jujax/lyrat_passthru","owner":"jujax","description":"Audio Passthru / Bluetooth Sink-Source with ESP32-LyraT V4.3 Board","archived":false,"fork":false,"pushed_at":"2022-04-27T17:19:17.000Z","size":13,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T16:09:51.667Z","etag":null,"topics":["a2dp","a2dp-sink","a2dp-source","audio","audio-board","bluetooth","bluetooth-sink-source","bluetooth-speaker","esp-adf","esp-idf","esp32","esp32-lyrat"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"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/jujax.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}},"created_at":"2020-10-18T03:18:02.000Z","updated_at":"2024-04-08T13:23:02.000Z","dependencies_parsed_at":"2022-08-11T18:41:13.531Z","dependency_job_id":null,"html_url":"https://github.com/jujax/lyrat_passthru","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujax%2Flyrat_passthru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujax%2Flyrat_passthru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujax%2Flyrat_passthru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujax%2Flyrat_passthru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jujax","download_url":"https://codeload.github.com/jujax/lyrat_passthru/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741202,"owners_count":21154255,"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","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":["a2dp","a2dp-sink","a2dp-source","audio","audio-board","bluetooth","bluetooth-sink-source","bluetooth-speaker","esp-adf","esp-idf","esp32","esp32-lyrat"],"created_at":"2025-02-05T20:59:20.393Z","updated_at":"2025-04-13T16:10:10.543Z","avatar_url":"https://github.com/jujax.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Audio Passthru / Bluetooth Sink-Source with ESP32-LyraT V4.3 Board \n\nThis can be used in multiple case:\n\n- Passes audio from Line in or Bluetooth to Line out.\n- Passes audio from Line in to Bluetooth.\n\n## Compatibility\n\nThis example works with ESP32-LyraT\t(with ES8388 audio driver), [ESP-IDF](https://github.com/espressif/esp-idf/) and [ESP-ADF](https://github.com/espressif/esp-adf/) libraries.\n\nESP-ADF library redirect automatically Aux input to Headphone output.\nIf you want to use Aux input to another output, you have to use these lines :\n```c\naudio_hal_ctrl_codec(board_handle-\u003eaudio_hal, AUDIO_HAL_CODEC_MODE_BOTH, AUDIO_HAL_CTRL_START);\n\nes8388_write_reg(ES8388_ADCCONTROL2, ADC_INPUT_LINPUT2_RINPUT2); \n```\n\nAlso sound is very dirty when redirected to bluetooth speaker.\n\nIt's because ES8388 is initialized with 9db PGA gain, so you have to use this (0x00 is corresponding to 0db, initialy 0xBB) :\n```c\nes8388_write_reg(ES8388_ADCCONTROL1, 0x00);\n```\n\n## Settings\n\nYou can set up device name, pin code and remote device name in `main/variables.h`.\n\n## Build and Flash\n\nBuild the project and flash it to the board, then run monitor tool to view serial output.\n\n```bash\nidf.py set-target esp32\nmake -j4 flash monitor\n```\n\n(To exit the serial monitor, type ``Ctrl-]``.)\n\n## Example Output\n\nYou can choose between Line out and Bluetooth out when you press ```MODE``` button.\n\nWhen you are in Line out mode, you can switch between Line input and Bluetooth input when you press ```REC``` button.\n\n### Bluetooth input to Line out\n\n- Connect with Bluetooth on your smartphone to the audio board identified as \"ESP_SINK_STREAM_DEMO\"\n- Play some audio from the smartphone and it will be transmitted over Bluetooth to the audio bard.\n- The audio playback may be controlled from the smartphone, as well as from the audio board. The following controls may be used:\n\n    |   Smartphone   | Audio Board |\n    |:--------------:|:-----------:|\n    |   Play Music   |    [Play]   |\n    |   Stop Music   |    [Set]    |\n    |   Next Song    | [long Vol+] |\n    | Previous Song  | [long Vol-] |\n    |   Volume Up    |    [n/a]    |\n    |  Volume Down   |    [n/a]    |\n\n### Line in to Bluetooth output\n\nYou have to choose bluetooth speaker name in ```main/passthru.c``` line 37, eg :\n\n```c\n#define CONFIG_BT_REMOTE_NAME \"WH-1000XM4\"\n```\n\nIt connect to my WH-1000XM4 headset after I pair it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjujax%2Flyrat_passthru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjujax%2Flyrat_passthru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjujax%2Flyrat_passthru/lists"}