8000 Merge remote-tracking branch 'origin/main' into main · russbot/circuitpython@a52132c · GitHub
[go: up one dir, main page]

Skip to content

Commit a52132c

Browse files
committed
Merge remote-tracking branch 'origin/main' into main
2 parents 00b1d4e + abfacc3 commit a52132c

File tree

16 files changed

+1092
-197
lines changed

16 files changed

+1092
-197
lines changed

locale/circuitpython.pot

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ msgstr ""
102102
msgid "%q must be a tuple of length 2"
103103
msgstr ""
104104

105+
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
105106
#: shared-bindings/canio/Match.c
106107
msgid "%q out of range"
107108
msgstr ""
@@ -453,6 +454,10 @@ msgstr ""
453454
msgid "Below minimum frame rate"
454455
msgstr ""
455456

457+
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
458+
msgid "Bit clock and word select must be sequential pins"
459+
msgstr ""
460+
456461
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
457462
msgid "Bit clock and word select must share a clock unit"
458463
msgstr ""
@@ -494,6 +499,10 @@ msgstr ""
494499
msgid "Buffer + offset too small %d %d %d"
495500
msgstr ""
496501

502+
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
503+
msgid "Buffer elements must be 4 bytes long or less"
504+
msgstr ""
505+
497506
#: shared-module/usb_hid/Device.c
498507
#, c-format
499508
msgid "Buffer incorrect size. Should be %d bytes."
@@ -1074,6 +1083,10 @@ msgstr ""
10741083
msgid "IV must be %d bytes long"
10751084
msgstr ""
10761085

1086+
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
1087+
msgid "In buffer elements must be 4 bytes long or less"
1088+
msgstr ""
1089+
10771090
#: py/persistentcode.c
10781091
msgid ""
10791092
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
@@ -1088,6 +1101,14 @@ msgstr ""
10881101
msgid "Init program size invalid"
10891102
msgstr ""
10901103

1104+
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1105+
msgid "Initial set pin direcion conflicts with initial out pin direction"
1106+
msgstr ""
1107+
1108+
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1109+
msgid "Initial set pin state conflicts with initial out pin state"
1110+
msgstr ""
1111+
10911112
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
10921113
msgid "Initialization failed due to lack of memory"
10931114
msgstr ""
@@ -1452,6 +1473,7 @@ msgstr ""
14521473

14531474
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
14541475
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
1476+
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
14551477
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
14561478
msgid "No DMA channel found"
14571479
msgstr ""
@@ -1518,6 +1540,14 @@ msgstr ""
15181540
msgid "No hardware support on pin"
15191541
msgstr ""
15201542

1543+
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1544+
msgid "No in in program"
1545+
msgstr ""
1546+
1547+
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1548+
msgid "No in or out in program"
1549+
msgstr ""
1550+
15211551
#: shared-bindings/aesio/aes.c
15221552
msgid "No key was specified"
15231553
msgstr ""
@@ -1604,13 +1634,10 @@ msgid "Odd parity is not supported"
16041634
msgstr ""
16051635

16061636
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
1637+
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
16071638
msgid "Only 8 or 16 bit mono with "
16081639
msgstr ""
16091640

1610-
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1611-
msgid "Only IN/OUT of up to 8 supported"
1612-
msgstr ""
1613-
16141641
#: ports/esp32s2/common-hal/wifi/__init__.c
16151642
msgid "Only IPv4 addresses supported"
16161643
msgstr ""
@@ -1656,6 +1683,10 @@ msgstr ""
16561683
msgid "Operation timed out"
16571684
msgstr ""
16581685

1686+
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
1687+
msgid "Out buffer elements must be 4 bytes long or less"
1688+
msgstr ""
1689+
16591690
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
16601691
msgid "Out of memory"
16611692
msgstr ""
@@ -2085,6 +2116,7 @@ msgid "To exit, please reset the board without "
20852116
msgstr ""
20862117

20872118
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
2119+
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
20882120
msgid "Too many channels in sample."
20892121
msgstr ""
20902122

@@ -2154,6 +2186,7 @@ msgstr ""
21542186

21552187
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
21562188
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
2189+
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
21572190
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
21582191
msgid "Unable to allocate buffers for signed conversion"
21592192
msgstr ""
@@ -3682,6 +3715,7 @@ msgstr ""
36823715
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
36833716
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
36843717
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
3718+
#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h
36853719
msgid "pressing boot button at start up.\n"
36863720
msgstr ""
36873721

@@ -3759,6 +3793,7 @@ msgid ""
37593793
msgstr ""
37603794

37613795
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
3796+
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
37623797
msgid "sampling rate out of range"
37633798
msgstr ""
37643799

ports/raspberrypi/audio_dma.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939

4040
#define AUDIO_DMA_CHANNEL_COUNT NUM_DMA_CHANNELS
4141

42+
void audio_dma_reset(void) {
43+
for (size_t channel = 0; channel < AUDIO_DMA_CHANNEL_COUNT; channel++) {
44+
if (MP_STATE_PORT(playing_audio)[channel] == NULL) {
45+
continue;
46+
}
47+
48+
audio_dma_stop(MP_STATE_PORT(playing_audio)[channel]);
49+
}
50+
}
51+
4252
void audio_dma_convert_signed(audio_dma_t* dma, uint8_t* buffer, uint32_t buffer_length,
4353
uint8_t** output_buffer, uint32_t* output_buffer_length) {
4454
if (dma->first_buffer_free) {
@@ -292,9 +302,16 @@ void audio_dma_stop(audio_dma_t* dma) {
292302
for (size_t i = 0; i < 2; i++) {
293303
size_t channel = dma->channel[i];
294304

305+
dma_channel_config c = dma_channel_get_default_config(dma->channel[i]);
306+
channel_config_set_enable(&c, false);
307+
dma_channel_set_config(channel, &c, false /* trigger */);
308+
295309
if (dma_channel_is_busy(channel)) {
296310
dma_channel_abort(channel);
297311
}
312+
dma_channel_set_read_addr(channel, NULL, false /* trigger */);
313+
dma_channel_set_write_addr(channel, NULL, false /* trigger */);
314+
dma_channel_set_trans_count(channel, 0, false /* trigger */);
298315
dma_channel_unclaim(channel);
299316
MP_STATE_PORT(playing_audio)[channel] = NULL;
300317
dma->channel[i] = NUM_DMA_CHANNELS;

0 commit comments

Comments
 (0)
0