Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of stereo audio within audiodelays when freq_shift=True #9876

Draft
wants to merge 30 commits into
base: 9.2.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
398eb45
Always update `echo_buffer_len` during `recalculate_delay` when `freq…
relic-se Dec 6, 2024
cf6086d
Fix casting error in buffer length calculation.
relic-se Dec 6, 2024
83fce94
Fix handling of echo buffer when `freq_shift=True` and `channel_count…
relic-se Dec 6, 2024
9e36143
Reset buffer if changing `freq_shift` modes.
relic-se Dec 6, 2024
76caf0c
Merge remote-tracking branch 'upstream/main' into audiodelays_stereo_…
relic-se Jan 24, 2025
f4b5a35
Merge branch 'main' into audiodelays_stereo_freq_shift_fix
relic-se Feb 5, 2025
b3afaea
implement ColoConverter for TilePaletteMapper
FoamyGuy Mar 7, 2025
2f4cd74
Use MICROPY_HW_MCU_NAME for sysname and nodename for all ports.
eightycc Mar 18, 2025
9b3731c
Remove watchdog.deinit() for 10.0.0.
eightycc Mar 19, 2025
68561fc
Merge pull request #10144 from eightycc/issue-7722
tannewt Mar 19, 2025
9b89ee8
update docstring to new name
FoamyGuy Mar 19, 2025
8afdccc
check if pins exist before using
FoamyGuy Mar 19, 2025
7c0fa46
Suspected typo: last "S" in "STM32F412xGS"
page200 Mar 19, 2025
8ef2168
Merge pull request #10150 from page200/patch-1
dhalbert Mar 19, 2025
df33271
CIRCUITPY_FULL_BUILD now controls a few more features
dhalbert Mar 20, 2025
214c2f6
Factor common_hal_os_uname into os_uname() and remove common_hal_os_u…
eightycc Mar 20, 2025
b4698a5
Merge branch 'main' into audiodelays_stereo_freq_shift_fix
relic-se Mar 20, 2025
e40b1f5
Merge pull request #10145 from eightycc/issue-9686
tannewt Mar 20, 2025
429efe8
Merge pull request #10148 from FoamyGuy/usb_deviceinfo_fix
tannewt Mar 20, 2025
a0b482c
Merge pull request #10152 from dhalbert/use-full-build-for-some-features
tannewt Mar 20, 2025
afb153e
Merge branch 'main' into tile_palette_mapper_color_converter
FoamyGuy Mar 23, 2025
9ba4104
Merge pull request #10178 from adafruit/9.2.x
dhalbert Mar 26, 2025
70fe5cd
Merge pull request #10173 from FoamyGuy/tile_palette_mapper_color_con…
tannewt Mar 27, 2025
1876c71
Convert completely to new displayio bindings; remove warnings
dhalbert Mar 28, 2025
ca063ae
Update TinyUSB and close device endpoints
tannewt Mar 28, 2025
5202806
Merge pull request #10193 from dhalbert/remove-old-displayio-bus-bind…
tannewt Mar 28, 2025
14eb89a
Merge pull request #10194 from tannewt/update_tinyusb_close_ep
dhalbert Mar 28, 2025
25216c8
Merge pull request #10195 from dhalbert/9.2.x
dhalbert Mar 28, 2025
db3a47d
Merge branch 'adafruit:main' into audiodelays_stereo_freq_shift_fix
relic-se Mar 28, 2025
232c7ff
Revert "Merge branch 'adafruit:main' into audiodelays_stereo_freq_shi…
relic-se Mar 29, 2025
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
10 changes: 0 additions & 10 deletions .github/pull_request_template.md

This file was deleted.

5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repos:
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/mimxrt10xx/sdk|ports/raspberrypi/sdk|lib/tinyusb)'
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/raspberrypi/sdk|lib/tinyusb)'
- id: trailing-whitespace
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|ports/mimxrt10xx/sdk|lib/tinyusb)'
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|lib/tinyusb)'
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
Expand Down Expand Up @@ -59,4 +59,3 @@ repos:
rev: "v2.5.0"
hooks:
- id: pyproject-fmt
exclude: '^(ports/mimxrt10xx/sdk)'
2 changes: 1 addition & 1 deletion docs/library/errno.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
|see_cpython_module| :mod:`python:errno`.

This module provides access to symbolic error codes for `OSError` exception.
Some codes are not available on the smallest CircuitPython builds, such as SAMD21, for space reasons.
The codes available may vary per CircuitPython build.

Constants
---------
Expand Down
6 changes: 3 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ static uint8_t *_allocate_memory(safe_mode_t safe_mode, const char *env_key, siz
*final_size = default_size;
#if CIRCUITPY_OS_GETENV
if (safe_mode == SAFE_MODE_NONE) {
mp_int_t size;
if (common_hal_os_getenv_int(env_key, &size) == GETENV_OK && size > 0) {
*final_size = size;
(void)common_hal_os_getenv_int(env_key, (mp_int_t *)final_size);
if (*final_size < 0) {
*final_size = default_size;
}
}
#endif
Expand Down
7 changes: 4 additions & 3 deletions ports/atmel-samd/common-hal/audioio/AudioOut.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ static void ramp_value(uint16_t start, uint16_t end) {
// Caller validates that pins are free.
void common_hal_audioio_audioout_construct(audioio_audioout_obj_t *self,
const mcu_pin_obj_t *left_channel, const mcu_pin_obj_t *right_channel, uint16_t quiescent_value) {

// The case of left_channel == right_channel is already disallowed in shared-bindings.

#ifdef SAM_D5X_E5X
bool dac_clock_enabled = hri_mclk_get_APBDMASK_DAC_bit(MCLK);
#endif
Expand Down Expand Up @@ -110,6 +107,10 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t *self,
if (right_channel != NULL && right_channel != &pin_PA02 && right_channel != &pin_PA05) {
raise_ValueError_invalid_pin_name(MP_QSTR_right_channel);
}
if (right_channel == left_channel) {
mp_raise_ValueError_varg(MP_ERROR_TEXT("%q and %q must be different"),
MP_QSTR_left_channel, MP_QSTR_right_channel);
}
claim_pin(left_channel);
if (right_channel != NULL) {
claim_pin(right_channel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ CIRCUITPY_DISPLAYIO = 1

FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Shapes
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x
9 changes: 9 additions & 0 deletions ports/espressif/boards/waveshare_esp32_s3_geek/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,18 @@ uint8_t display_init_sequence[] = {
};

static void display_init(void) {

busio_spi_obj_t *spi = common_hal_board_create_spi(0);
fourwire_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;

common_hal_busio_spi_construct(
spi,
&pin_GPIO12, // CLK
&pin_GPIO11, // MOSI
NULL, // MISO not connected
false); // Not half-duplex


bus->base.type = &fourwire_fourwire_type;

common_hal_fourwire_fourwire_construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO17)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO16)

#define CIRCUITPY_BOARD_SPI (2)
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO12, .mosi = &pin_GPIO11}, \
{.clock = &pin_GPIO36, .mosi = &pin_GPIO35, .miso = &pin_GPIO37}}
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
15 changes: 6 additions & 9 deletions ports/espressif/boards/waveshare_esp32_s3_geek/pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
// SPDX-License-Identifier: MIT

#include "shared-bindings/board/__init__.h"
#include "shared-module/displayio/__init__.h"

CIRCUITPY_BOARD_BUS_SINGLETON(sd_spi, spi, 1)

#include "shared-module/displayio/__init__.h"
static const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS

Expand Down Expand Up @@ -66,11 +64,11 @@ static const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },

// SD Card
{ MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO37) },
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_SD_SPI), MP_ROM_PTR(&board_sd_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_GPIO36)},
{ MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO35)},
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO37)},
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO34)},
{ MP_ROM_QSTR(MP_QSTR_SD_SPI), MP_ROM_PTR(&board_spi_obj) },
// Pin 38 is for the SDIO interface, and therefore not included in the SPI object

// LCD
Expand All @@ -80,7 +78,6 @@ static const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_LCD_BACKLIGHT), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_LCD_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) },

};
Expand Down
78 changes: 0 additions & 78 deletions ports/espressif/boards/waveshare_esp32_s3_touch_lcd_2/board.c

This file was deleted.

This file was deleted.

This file was deleted.

94 changes: 0 additions & 94 deletions ports/espressif/boards/waveshare_esp32_s3_touch_lcd_2/pins.c

This file was deleted.

Empty file.
Loading
Loading