Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
8efe3109
Unverified
Commit
8efe3109
authored
Nov 12, 2023
by
Wolle
Committed by
GitHub
Nov 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct m_i2s_std_cfg.clk_cfg.mclk_multiple
parent
6eabd95c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/Audio.cpp
src/Audio.cpp
+6
-4
src/Audio.h
src/Audio.h
+3
-3
No files found.
src/Audio.cpp
View file @
8efe3109
...
...
@@ -5,8 +5,8 @@
*
* Created on: Oct 26.2018
*
* Version 3.0.7
o
* Updated on:
Oct 2
2.2023
* Version 3.0.7
p
* Updated on:
Nov 1
2.2023
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -185,7 +185,7 @@ Audio::Audio(bool internalDAC /* = false */, uint8_t channelEnabled /* = I2S_SLO
m_i2s_std_cfg
.
gpio_cfg
.
invert_flags
.
ws_inv
=
false
;
m_i2s_std_cfg
.
clk_cfg
.
sample_rate_hz
=
44100
;
m_i2s_std_cfg
.
clk_cfg
.
clk_src
=
I2S_CLK_SRC_DEFAULT
;
// Select PLL_F160M as the default source clock
m_i2s_std_cfg
.
clk_cfg
.
mclk_multiple
=
I2S_MCLK_MULTIPLE_
256
;
// mclk = sample_rate * 256
m_i2s_std_cfg
.
clk_cfg
.
mclk_multiple
=
I2S_MCLK_MULTIPLE_
128
;
// mclk = sample_rate * 256
i2s_channel_init_std_mode
(
m_i2s_tx_handle
,
&
m_i2s_std_cfg
);
I2Sstart
(
0
);
#else
...
...
@@ -197,7 +197,8 @@ Audio::Audio(bool internalDAC /* = false */, uint8_t channelEnabled /* = I2S_SLO
m_i2s_config
.
dma_buf_len
=
512
;
m_i2s_config
.
use_apll
=
APLL_DISABLE
;
// must be disabled in V2.0.1-RC1
m_i2s_config
.
tx_desc_auto_clear
=
true
;
// new in V1.0.1
m_i2s_config
.
fixed_mclk
=
I2S_GPIO_UNUSED
;
m_i2s_config
.
fixed_mclk
=
true
;
m_i2s_config
.
mclk_multiple
=
I2S_MCLK_MULTIPLE_128
;
if
(
internalDAC
)
{
#ifdef CONFIG_IDF_TARGET_ESP32 // ESP32S3 has no DAC
...
...
@@ -4523,6 +4524,7 @@ bool Audio::setPinout(uint8_t BCLK, uint8_t LRC, uint8_t DOUT, int8_t MCLK) {
m_pin_config
.
ws_io_num
=
LRC
;
// wclk = lrc
m_pin_config
.
data_out_num
=
DOUT
;
m_pin_config
.
data_in_num
=
I2S_GPIO_UNUSED
;
m_pin_config
.
mck_io_num
=
MCLK
;
result
=
i2s_set_pin
((
i2s_port_t
)
m_i2s_num
,
&
m_pin_config
);
#endif
return
(
result
==
ESP_OK
);
...
...
src/Audio.h
View file @
8efe3109
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 28,2018
*
* Version 3.0.7
o
* Updated on:
Oct 2
2.2023
* Version 3.0.7
p
* Updated on:
Nov 1
2.2023
* Author: Wolle (schreibfaul1)
*/
...
...
@@ -460,7 +460,7 @@ private:
i2s_std_config_t
m_i2s_std_cfg
=
{};
// stores I2S driver values
#else
i2s_config_t
m_i2s_config
=
{};
// stores values for I2S driver
i2s_pin_config_t
m_pin_config
=
{};
i2s_pin_config_t
m_pin_config
=
{
0
};
#endif
std
::
vector
<
char
*>
m_playlistContent
;
// m3u8 playlist buffer
std
::
vector
<
char
*>
m_playlistURL
;
// m3u8 streamURLs buffer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment