Skip to content

Commit

Permalink
fix 32 bits sample size L/R swap - release
Browse files Browse the repository at this point in the history
issue is in esp-idf
  • Loading branch information
philippe44 committed Sep 12, 2021
1 parent 511df0b commit 6f4ed06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions components/services/i2s.c
Expand Up @@ -928,7 +928,7 @@ static esp_err_t i2s_param_config(i2s_port_t i2s_num, const i2s_config_t *i2s_co

if (i2s_config->mode & I2S_MODE_TX) {
// PATCH
I2S[i2s_num]->conf.tx_msb_right = 1;
I2S[i2s_num]->conf.tx_msb_right = i2s_config->bits_per_sample == 32 ? 0 : 1;
I2S[i2s_num]->conf.tx_right_first = 0;

I2S[i2s_num]->conf.tx_slave_mod = 0; // Master
Expand All @@ -941,7 +941,7 @@ static esp_err_t i2s_param_config(i2s_port_t i2s_num, const i2s_config_t *i2s_co

if (i2s_config->mode & I2S_MODE_RX) {
// PATCH
I2S[i2s_num]->conf.rx_msb_right = 1;
I2S[i2s_num]->conf.rx_msb_right = i2s_config->bits_per_sample == 32 ? 0 : 1;
I2S[i2s_num]->conf.rx_right_first = 0;
I2S[i2s_num]->conf.rx_slave_mod = 0; // Master
I2S[i2s_num]->fifo_conf.rx_fifo_mod_force_en = 1;
Expand Down
5 changes: 1 addition & 4 deletions components/squeezelite/output_i2s.c
Expand Up @@ -238,10 +238,7 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
set_i2s_pin(spdif_config, &i2s_spdif_pin);
set_i2s_pin(dac_config, &i2s_dac_pin);

/* BEWARE: i2s. must be patched to set tx_msb_right/rx_msb_right to 1
* or SPDIF will not work. These settings are not accessible from
* userland and I don't know why
*/
/* BEWARE: i2s.c must be patched otherwise L/R are swapped in 32 bits mode */

// common I2S initialization
i2s_config.mode = I2S_MODE_MASTER | I2S_MODE_TX;
Expand Down
4 changes: 2 additions & 2 deletions plugin/SqueezeESP32/strings.txt
Expand Up @@ -107,8 +107,8 @@ PLUGIN_SQUEEZEESP32_ARTWORK_Y
EN Y

PLUGIN_SQUEEZEESP32_EQUALIZER
DE Parametrischer Equalizer
EN Parametric equalizer
DE Grafischer Equalizer
EN Graphic equalizer

PLUGIN_SQUEEZEESP32_EQUALIZER_SAVE
DE Bitte speichern Sie die Equalizer Einstellungen, falls das Gerät diese dauerhaft verwenden soll. Ansonsten werden sie beim nächsten Start zurückgesetzt.
Expand Down

0 comments on commit 6f4ed06

Please sign in to comment.