Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
1cc2a85
feat: Unified Ethernet interface with settings manager and web UI
craigmillard86 Feb 12, 2026
d736928
Merge branch 'develop' of https://github.com/CarlosDerSeher/snapclien…
craigmillard86 Feb 19, 2026
ac46f3f
Merge luar123/player_state + fix 4 critical issues
craigmillard86 Feb 20, 2026
25fc8c2
Fix: Restore required includes in snapcast_protocol_parser.c
craigmillard86 Feb 20, 2026
3706883
Revert README.md to match luar123/player_state version
craigmillard86 Feb 20, 2026
62842df
Remove local Claude Code config file from commits
craigmillard86 Feb 20, 2026
ebf7a14
Add .claude to .gitignore to exclude local IDE config
craigmillard86 Feb 20, 2026
bb97646
Revert .gitignore to match luar123/player_state
craigmillard86 Feb 20, 2026
6d01fd1
Merge luar123/player_state latest update - Fix deadlock in deinit_player
craigmillard86 Feb 21, 2026
5836146
Unified Ethernet/WiFi MAC, player state fixes, and boot-time improvem…
craigmillard86 Feb 24, 2026
3d5841f
Fix correctness bugs from code review and Copilot findings
craigmillard86 Feb 25, 2026
9805edd
Merge luar123/player_state (a274fa1) - command-based state machine
craigmillard86 Apr 3, 2026
5170a17
Fix build break and correctness issues from code review
craigmillard86 Apr 3, 2026
5c19771
Replace reconnect polling with sc_restart_snapcast() commands
craigmillard86 Apr 3, 2026
c4250e8
Resolve luar123 review comments on reconnect polling PR
craigmillard86 Apr 7, 2026
f840181
Fix audio not restarting after network reconnection
craigmillard86 Apr 8, 2026
f138c63
Fix Ethernet reconnection: restart DHCP and clean up IPv6 on disconnect
craigmillard86 Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,11 @@ Update third party code (opus, flac, esp-dsp, improv_wifi):
```
git submodule update --init
```
Copy one of the template sdkconfig files and rename it to sdkconfig...

...on Linux:
```
cp sdkconfig_lyrat_v4.3 sdkconfig
```

...on Windows:
```
copy sdkconfig_lyrat_v4.3 sdkconfig
```

### ESP-IDF environment setup (required for configuration, compiling and flashing)
### ESP-IDF environnement configuration
- <b>If you're on Windows :</b> Install [ESP-IDF v5.5.1](https://github.com/espressif/esp-idf/releases/tag/v5.5.1) locally ([More info](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/windows-setup-update.html)).
- <b>If you're on Linux (docker) :</b> Use the image for ESP-IDF by following [docker build](doc/docker_build.md) doc (you won't need any of the remaining commands/steps below up until the <b>Test</b> section then)
- <b>If you're on Linux (docker) :</b> Use the image for ESP-IDF by following [docker build](doc/docker_build.md) doc
- <b>If you're on Linux :</b> follow [official Espressif](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html) instructions

For debian based systems you'll need to do the following:
```
sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
Expand All @@ -136,16 +124,24 @@ copy sdkconfig_lyrat_v4.3 sdkconfig
. ./export.sh
```

### Snapcast ESP Configuration (Non-Docker-Linux and Windows)
<a name="config"></a>
### Snapcast ESP Configuration
Start with the default config (remove any existing sdkconfig file) or copy one of the template sdkconfig files and rename it to sdkconfig

Configure your platform:
```
rm sdkconfig
```
or
```
cp sdkconfig_lyrat_v4.3 sdkconfig
```

then configure your platform:

```
idf.py menuconfig
```

<a name="config"></a>
Choose configuration options to match your setup
Configure to match your setup
- <b>Audio HAL :</b> Choose your audio board
- Lyrat (4.3, 4.2)
- Lyrat TD (2.2, 2.1)
Expand Down Expand Up @@ -235,7 +231,7 @@ Replace `snapclient.local` with your clients IP address. If you have multiple cl

You are very welcome to help and provide [Pull
Requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
to the project. Use [develop](https://github.com/CarlosDerSeher/snapclient/tree/develop) branch for your PRs as this is the place where new features will go.
to the project. Use [develop](https://github.com/jorgenkraghjakobsen/snapclient/tree/develop) branch for your PRs as this is the place where new features will go.

We strongly suggest you activate [pre-commit](https://pre-commit.com) hooks in
this git repository before starting to hack and make commits.
Expand Down
20 changes: 18 additions & 2 deletions components/lightsnapcast/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ int init_player(i2s_std_gpio_config_t pin_config0_, i2s_port_t i2sNum_, void (*s

// create message queue to inform task of changed settings
snapcastSettingQueueHandle = xQueueCreate(1, sizeof(playerSetting_t));
if (snapcastSettingQueueHandle == NULL) {
ESP_LOGE(TAG, "Failed to create snapcast settings queue");
return -1;
}

if (playerStateMux == NULL) {
playerStateMux = xSemaphoreCreateMutex();
Expand Down Expand Up @@ -587,6 +591,15 @@ int start_player() {
entries -= ((i2sDmaBufMaxLen * i2sDmaBufCnt) / scSet->chkInFrames);

pcmChkQHdl = xQueueCreate(entries, sizeof(pcm_chunk_message_t *));
if (pcmChkQHdl == NULL) {
ESP_LOGE(TAG, "Failed to create pcm chunk queue (%d entries)", entries);
tg0_timer_deinit();
#if CONFIG_PM_ENABLE
esp_pm_lock_release(player_pm_lock_handle);
#endif
playerStarted = false;
return -1;
}

ESP_LOGI(TAG, "created new queue with %d", entries);
}
Expand Down Expand Up @@ -1535,8 +1548,11 @@ static void player_task(void *pvParameters) {
queueCreatedWithChkInFrames = __scSet.chkInFrames;

pcmChkQHdl = xQueueCreate(entries, sizeof(pcm_chunk_message_t *));

ESP_LOGI(TAG, "created new queue with %d", entries);
if (pcmChkQHdl == NULL) {
ESP_LOGE(TAG, "Failed to create pcm chunk queue (%d entries)", entries);
} else {
ESP_LOGI(TAG, "created new queue with %d", entries);
}
}

if ((scSet.sr != __scSet.sr) || (scSet.bits != __scSet.bits) ||
Expand Down
2 changes: 1 addition & 1 deletion components/lightsnapcast/snapcast_protocol_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ parser_return_state_t parse_codec_header_message(
if (!read_data(parser, (uint8_t *)codecString, sizeof(codecString)-1)) return PARSER_RESTART_CONNECTION;

codecString[sizeof(codecString)-1] = 0; // null terminate
ESP_LOGE(TAG, "Codec : %s... not supported", codecString);
ESP_LOGE(TAG, "Codec : %s... not supported (length: %lu)", codecString, codecStringLen);
ESP_LOGI(TAG,
"Change encoder codec to "
"opus, flac or pcm in "
Expand Down
19 changes: 17 additions & 2 deletions components/network_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
idf_component_register(SRCS "network_interface.c" "eth_interface.c" "wifi_interface.c"
set(SRCS "network_interface.c" "wifi_interface.c")

# Only include Ethernet interface if Ethernet is enabled
if(CONFIG_SNAPCLIENT_USE_INTERNAL_ETHERNET OR CONFIG_SNAPCLIENT_USE_SPI_ETHERNET)
list(APPEND SRCS "eth_interface.c")
endif()

set(PRIV_DEPS driver esp_wifi esp_eth esp_netif esp_timer nvs_flash improv_wifi settings_manager lwip)

# ping is only needed when Ethernet is enabled (used by eth_interface.c)
if(CONFIG_SNAPCLIENT_USE_INTERNAL_ETHERNET OR CONFIG_SNAPCLIENT_USE_SPI_ETHERNET)
list(APPEND PRIV_DEPS ping)
endif()

idf_component_register(SRCS ${SRCS}
INCLUDE_DIRS "include"
PRIV_REQUIRES driver esp_wifi esp_eth esp_netif esp_timer nvs_flash improv_wifi)
PRIV_INCLUDE_DIRS "priv_include"
PRIV_REQUIRES ${PRIV_DEPS})
Loading
Loading