ESP-IDF
i2s_channel_obj_t::dma
is only used within ESP-IDF.
Symbol previews are coming soon...
Symbols
loading (4/5)...
Files
loading (4/5)...
Summary
Syntax
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
i2s_channel_obj_t::dma
i2s_channel_obj_t::dma field
i2s dma object
Syntax
Show:
Summary
Declaration
from
i2s_private.h:157
i2s_dma_t
dma
;
Examples
References
from
examples
Code
Location
Referrer
i2s_dma_t
dma
;
/*!< i2s dma object */
i2s_private.h:157
esp_intr_enable
(
handle
->
dma
.
dma_chan
)
;
i2s_common.c:131
i2s_tx_channel_start()
i2s_hal_tx_start_link
(
&
(
handle
->
controller
->
hal
)
,
(
uint32_t
)
handle
->
dma
.
desc
[
0
]
)
;
i2s_common.c:134
i2s_tx_channel_start()
esp_intr_enable
(
handle
->
dma
.
dma_chan
)
;
i2s_common.c:153
i2s_rx_channel_start()
i2s_hal_rx_start_link
(
&
(
handle
->
controller
->
hal
)
,
(
uint32_t
)
handle
->
dma
.
desc
[
0
]
)
;
i2s_common.c:156
i2s_rx_channel_start()
esp_intr_disable
(
handle
->
dma
.
dma_chan
)
;
i2s_common.c:174
i2s_tx_channel_stop()
esp_intr_disable
(
handle
->
dma
.
dma_chan
)
;
i2s_common.c:189
i2s_rx_channel_stop()
new_chan
->
dma
.
rw_pos
=
0
;
i2s_common.c:345
i2s_register_channel()
new_chan
->
dma
.
curr_ptr
=
NULL
;
i2s_common.c:346
i2s_register_channel()
new_chan
->
dma
.
curr_desc
=
NULL
;
i2s_common.c:347
i2s_register_channel()
if
(
!
handle
->
dma
.
desc
)
{
i2s_common.c:459
i2s_free_dma_desc()
for
(
int
i
=
0
;
i
<
handle
->
dma
.
desc_num
;
i
++
)
{
i2s_common.c:462
i2s_free_dma_desc()
if
(
handle
->
dma
.
bufs
[
i
]
)
{
i2s_common.c:463
i2s_free_dma_desc()
free
(
handle
->
dma
.
bufs
[
i
]
)
;
i2s_common.c:464
i2s_free_dma_desc()
handle
->
dma
.
bufs
[
i
]
=
NULL
;
i2s_common.c:465
i2s_free_dma_desc()
if
(
handle
->
dma
.
desc
[
i
]
)
{
i2s_common.c:467
i2s_free_dma_desc()
free
(
handle
->
dma
.
desc
[
i
]
)
;
i2s_common.c:468
i2s_free_dma_desc()
handle
->
dma
.
desc
[
i
]
=
NULL
;
i2s_common.c:469
i2s_free_dma_desc()
if
(
handle
->
dma
.
bufs
)
{
i2s_common.c:472
i2s_free_dma_desc()
free
(
handle
->
dma
.
bufs
)
;
i2s_common.c:473
i2s_free_dma_desc()
handle
->
dma
.
bufs
=
NULL
;
i2s_common.c:474
i2s_free_dma_desc()
if
(
handle
->
dma
.
desc
)
{
i2s_common.c:476
i2s_free_dma_desc()
free
(
handle
->
dma
.
desc
)
;
i2s_common.c:477
i2s_free_dma_desc()
handle
->
dma
.
desc
=
NULL
;
i2s_common.c:478
i2s_free_dma_desc()
handle
->
dma
.
desc_num
=
num
;
i2s_common.c:489
i2s_alloc_dma_desc()
handle
->
dma
.
buf_size
=
bufsize
;
i2s_common.c:490
i2s_alloc_dma_desc()
handle
->
dma
.
desc
=
(
lldesc_t
*
*
)
heap_caps_calloc
(
num
,
sizeof
(
lldesc_t
*
)
,
I2S_MEM_ALLOC_CAPS
)
;
i2s_common.c:493
i2s_alloc_dma_desc()
ESP_GOTO_ON_FALSE
(
handle
->
dma
.
desc
,
ESP_ERR_NO_MEM
,
err
,
TAG
,
"create I2S DMA descriptor array failed"
)
;
i2s_common.c:494
i2s_alloc_dma_desc()
handle
->
dma
.
bufs
=
(
uint8_t
*
*
)
heap_caps_calloc
(
num
,
sizeof
(
uint8_t
*
)
,
I2S_MEM_ALLOC_CAPS
)
;
i2s_common.c:495
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
=
(
lldesc_t
*
)
i2s_dma_calloc
(
handle
,
1
,
sizeof
(
lldesc_t
)
)
;
i2s_common.c:498
i2s_alloc_dma_desc()
ESP_GOTO_ON_FALSE
(
handle
->
dma
.
desc
[
i
]
,
ESP_ERR_NO_MEM
,
err
,
TAG
,
"allocate DMA description failed"
)
;
i2s_common.c:499
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
owner
=
1
;
i2s_common.c:500
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
eof
=
1
;
i2s_common.c:501
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
sosf
=
0
;
i2s_common.c:502
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
length
=
bufsize
;
i2s_common.c:503
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
size
=
bufsize
;
i2s_common.c:504
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
offset
=
0
;
i2s_common.c:505
i2s_alloc_dma_desc()
handle
->
dma
.
bufs
[
i
]
=
(
uint8_t
*
)
i2s_dma_calloc
(
handle
,
1
,
bufsize
*
sizeof
(
uint8_t
)
)
;
i2s_common.c:506
i2s_alloc_dma_desc()
ESP_GOTO_ON_FALSE
(
handle
->
dma
.
bufs
[
i
]
,
ESP_ERR_NO_MEM
,
err
,
TAG
,
"allocate DMA buffer failed"
)
;
i2s_common.c:507
i2s_alloc_dma_desc()
handle
->
dma
.
desc
[
i
]
->
buf
=
handle
->
dma
.
bufs
[
i
]
;
i2s_common.c:511
i2s_alloc_dma_desc()
ESP_LOGV
(
TAG
,
"desc addr: %8p\tbuffer addr:%8p"
,
handle
->
dma
.
desc
[
i
]
,
handle
->
dma
.
bufs
[
i
]
)
;
i2s_common.c:512
i2s_alloc_dma_desc()
STAILQ_NEXT
(
handle
->
dma
.
desc
[
i
]
,
qe
)
=
(
i
<
(
num
-
1
)
)
?
(
handle
->
dma
.
desc
[
i
+
1
]
)
:
handle
->
dma
.
desc
[
0
]
;
i2s_common.c:517
i2s_alloc_dma_desc()
evt
.
size
=
handle
->
dma
.
buf_size
;
i2s_common.c:681
i2s_dma_rx_callback()
evt
.
size
=
handle
->
dma
.
buf_size
;
i2s_common.c:722
i2s_dma_tx_callback()
if
(
handle
->
dma
.
auto_clear_before_cb
)
{
i2s_common.c:724
i2s_dma_tx_callback()
memset
(
curr_buf
,
0
,
handle
->
dma
.
buf_size
)
;
i2s_common.c:725
i2s_dma_tx_callback()
if
(
handle
->
dma
.
auto_clear_after_cb
)
{
i2s_common.c:738
i2s_dma_tx_callback()
memset
(
curr_buf
,
0
,
handle
->
dma
.
buf_size
)
;
i2s_common.c:739
i2s_dma_tx_callback()
i2s_dma_tx_callback
,
handle
,
&
handle
->
dma
.
dma_chan
)
;
i2s_common.c:817
i2s_init_dma_intr()
i2s_dma_rx_callback
,
handle
,
&
handle
->
dma
.
dma_chan
)
;
i2s_common.c:821
i2s_init_dma_intr()
i2s_obj
->
tx_chan
->
dma
.
auto_clear_after_cb
=
chan_cfg
->
auto_clear_after_cb
;
i2s_common.c:979
i2s_new_channel()
i2s_obj
->
tx_chan
->
dma
.
auto_clear_before_cb
=
chan_cfg
->
auto_clear_before_cb
;
i2s_common.c:980
i2s_new_channel()
i2s_obj
->
tx_chan
->
dma
.
desc_num
=
chan_cfg
->
dma_desc_num
;
i2s_common.c:981
i2s_new_channel()
i2s_obj
->
tx_chan
->
dma
.
frame_num
=
chan_cfg
->
dma_frame_num
;
i2s_common.c:982
i2s_new_channel()
i2s_obj
->
rx_chan
->
dma
.
desc_num
=
chan_cfg
->
dma_desc_num
;
i2s_common.c:994
i2s_new_channel()
i2s_obj
->
rx_chan
->
dma
.
frame_num
=
chan_cfg
->
dma_frame_num
;
i2s_common.c:995
i2s_new_channel()
if
(
handle
->
dma
.
desc
)
{
i2s_common.c:1070
i2s_del_channel()
if
(
handle
->
dma
.
dma_chan
)
{
i2s_common.c:1087
i2s_del_channel()
esp_intr_free
(
handle
->
dma
.
dma_chan
)
;
i2s_common.c:1092
i2s_del_channel()
chan_info
->
total_dma_buf_size
=
handle
->
state
>=
I2S_CHAN_STATE_READY
?
handle
->
dma
.
desc_num
*
handle
->
dma
.
buf_size
:
0
;
i2s_common.c:1143
i2s_channel_get_info()
handle
->
dma
.
curr_ptr
=
NULL
;
i2s_common.c:1199
i2s_channel_disable()
handle
->
dma
.
curr_desc
=
NULL
;
i2s_common.c:1200
i2s_channel_disable()
handle
->
dma
.
rw_pos
=
0
;
i2s_common.c:1201
i2s_channel_disable()
if
(
tx_handle
->
dma
.
curr_desc
==
NULL
)
{
i2s_common.c:1228
i2s_channel_preload_data()
tx_handle
->
dma
.
curr_desc
=
tx_handle
->
dma
.
desc
[
0
]
;
i2s_common.c:1229
i2s_channel_preload_data()
tx_handle
->
dma
.
curr_ptr
=
(
void
*
)
tx_handle
->
dma
.
desc
[
0
]
->
buf
;
i2s_common.c:1230
i2s_channel_preload_data()
tx_handle
->
dma
.
rw_pos
=
0
;
i2s_common.c:1231
i2s_channel_preload_data()
size_t
bytes_can_load
=
remain_bytes
>
(
tx_handle
->
dma
.
buf_size
-
tx_handle
->
dma
.
rw_pos
)
?
i2s_common.c:1236
i2s_channel_preload_data()
(
tx_handle
->
dma
.
buf_size
-
tx_handle
->
dma
.
rw_pos
)
:
remain_bytes
;
i2s_common.c:1237
i2s_channel_preload_data()
memcpy
(
(
uint8_t
*
)
(
tx_handle
->
dma
.
curr_ptr
+
tx_handle
->
dma
.
rw_pos
)
,
data_ptr
,
bytes_can_load
)
;
i2s_common.c:1243
i2s_channel_preload_data()
tx_handle
->
dma
.
rw_pos
+=
bytes_can_load
;
// Move forward the dma buffer position
i2s_common.c:1250
i2s_channel_preload_data()
if
(
tx_handle
->
dma
.
rw_pos
==
tx_handle
->
dma
.
buf_size
)
{
i2s_common.c:1252
i2s_channel_preload_data()
if
(
STAILQ_NEXT
(
(
lldesc_t
*
)
tx_handle
->
dma
.
curr_desc
,
qe
)
!=
tx_handle
->
dma
.
desc
[
0
]
)
{
i2s_common.c:1256
i2s_channel_preload_data()
tx_handle
->
dma
.
curr_desc
=
STAILQ_NEXT
(
(
lldesc_t
*
)
tx_handle
->
dma
.
curr_desc
,
qe
)
;
i2s_common.c:1257
i2s_channel_preload_data()
tx_handle
->
dma
.
curr_ptr
=
(
void
*
)
(
(
(
lldesc_t
*
)
tx_handle
->
dma
.
curr_desc
)
->
buf
)
;
i2s_common.c:1258
i2s_channel_preload_data()
tx_handle
->
dma
.
rw_pos
=
0
;
i2s_common.c:1259
i2s_channel_preload_data()
if
(
handle
->
dma
.
rw_pos
==
handle
->
dma
.
buf_size
||
handle
->
dma
.
curr_ptr
==
NULL
)
{
i2s_common.c:1289
i2s_channel_write()
if
(
xQueueReceive
(
handle
->
msg_queue
,
&
(
handle
->
dma
.
curr_ptr
)
,
pdMS_TO_TICKS
(
timeout_ms
)
)
==
pdFALSE
)
{
i2s_common.c:1290
i2s_channel_write()
handle
->
dma
.
rw_pos
=
0
;
i2s_common.c:1294
i2s_channel_write()
data_ptr
=
(
char
*
)
handle
->
dma
.
curr_ptr
;
i2s_common.c:1296
i2s_channel_write()
data_ptr
+=
handle
->
dma
.
rw_pos
;
i2s_common.c:1297
i2s_channel_write()
bytes_can_write
=
handle
->
dma
.
buf_size
-
handle
->
dma
.
rw_pos
;
i2s_common.c:1298
i2s_channel_write()
handle
->
dma
.
rw_pos
+=
bytes_can_write
;
i2s_common.c:1308
i2s_channel_write()
if
(
handle
->
dma
.
rw_pos
==
handle
->
dma
.
buf_size
||
handle
->
dma
.
curr_ptr
==
NULL
)
{
i2s_common.c:1334
i2s_channel_read()
if
(
xQueueReceive
(
handle
->
msg_queue
,
&
(
handle
->
dma
.
curr_ptr
)
,
pdMS_TO_TICKS
(
timeout_ms
)
)
==
pdFALSE
)
{
i2s_common.c:1335
i2s_channel_read()
handle
->
dma
.
rw_pos
=
0
;
i2s_common.c:1339
i2s_channel_read()
data_ptr
=
(
uint8_t
*
)
handle
->
dma
.
curr_ptr
;
i2s_common.c:1341
i2s_channel_read()
data_ptr
+=
handle
->
dma
.
rw_pos
;
i2s_common.c:1342
i2s_channel_read()
bytes_can_read
=
handle
->
dma
.
buf_size
-
handle
->
dma
.
rw_pos
;
i2s_common.c:1343
i2s_channel_read()
handle
->
dma
.
rw_pos
+=
bytes_can_read
;
i2s_common.c:1350
i2s_channel_read()
uint32_t
buf_size
=
i2s_get_buf_size
(
handle
,
slot_cfg
->
data_bit_width
,
handle
->
dma
.
frame_num
)
;
i2s_pdm.c:95
i2s_pdm_tx_set_slot()
if
(
handle
->
dma
.
buf_size
!=
buf_size
)
{
i2s_pdm.c:97
i2s_pdm_tx_set_slot()
handle
->
dma
.
buf_size
=
buf_size
;
i2s_pdm.c:98
i2s_pdm_tx_set_slot()
ESP_RETURN_ON_ERROR
(
i2s_alloc_dma_desc
(
handle
,
handle
->
dma
.
desc_num
,
buf_size
)
,
i2s_pdm.c:100
i2s_pdm_tx_set_slot()
uint32_t
buf_size
=
i2s_get_buf_size
(
handle
,
slot_cfg
->
data_bit_width
,
handle
->
dma
.
frame_num
)
;
i2s_pdm.c:383
i2s_pdm_rx_set_slot()
if
(
handle
->
dma
.
buf_size
!=
buf_size
)
{
i2s_pdm.c:385
i2s_pdm_rx_set_slot()
handle
->
dma
.
buf_size
=
buf_size
;
i2s_pdm.c:386
i2s_pdm_rx_set_slot()
ESP_RETURN_ON_ERROR
(
i2s_alloc_dma_desc
(
handle
,
handle
->
dma
.
desc_num
,
buf_size
)
,
i2s_pdm.c:388
i2s_pdm_rx_set_slot()
return
(
size_t
)
&
(
(
(
i2s_chan_handle_t
)
0
)
->
dma
.
bufs
)
;
i2s_platform.c:122
i2s_platform_get_dma_buffer_offset()
uint32_t
buf_size
=
i2s_get_buf_size
(
handle
,
slot_cfg
->
data_bit_width
,
handle
->
dma
.
frame_num
)
;
i2s_std.c:106
i2s_std_set_slot()
if
(
handle
->
dma
.
buf_size
!=
buf_size
)
{
i2s_std.c:108
i2s_std_set_slot()
handle
->
dma
.
buf_size
=
buf_size
;
i2s_std.c:109
i2s_std_set_slot()
ESP_RETURN_ON_ERROR
(
i2s_alloc_dma_desc
(
handle
,
handle
->
dma
.
desc_num
,
buf_size
)
,
i2s_std.c:111
i2s_std_set_slot()
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
i2s_channel_obj_t::dma
is read by 21 functions:
All items filtered out
i2s_channel_obj_t::dma
i2s_tx_channel_start()
i2s_rx_channel_start()
i2s_tx_channel_stop()
i2s_rx_channel_stop()
i2s_register_channel()
i2s_free_dma_desc()
i2s_alloc_dma_desc()
i2s_dma_rx_callback()
i2s_dma_tx_callback()
i2s_init_dma_intr()
i2s_new_channel()
i2s_del_channel()
i2s_channel_get_info()
i2s_channel_disable()
i2s_channel_preload_data()
i2s_channel_write()
i2s_channel_read()
i2s_std_set_slot()
i2s_pdm_tx_set_slot()
i2s_pdm_rx_set_slot()
i2s_platform_get_dma_buffer_offset()
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out