Home of the Squeezebox™ & Transporter® network music players.
Page 106 of 111 FirstFirst ... 65696104105106107108 ... LastLast
Results 1,051 to 1,060 of 1106
  1. #1051
    Senior Member
    Join Date
    Jul 2017
    Posts
    125
    Quote Originally Posted by jofland View Post
    According to the doc it should be 10000000. But if I read it from the DAC after booting with empty dac_controlset it shows 0x00.

    Attachment 35362
    Thanks! That seems to indicate that es8388.c is setting the DAC to slave mode. kheperV3 had to modify esp_app_main.c with this code

    // GPIO0 => CLK_OUT1
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
    WRITE_PERI_REG(PIN_CTRL, READ_PERI_REG(PIN_CTRL)& 0xFFFFFFF0);

    to assign MCLK to GPIO0, allowing the ESP32 to supply the es8388 with MCLK (I hope I have this MASTER/SLAVE thing figured out).


    Quote Originally Posted by jofland View Post
    It writes into register ES8388_MASTERMODE = 0x08 the value from the configuration struct. The return value will be ORed to the last return value; 1 indicates an error.
    Again, thanks. I'm an old COBOL programmer and am having trouble following this code.

  2. #1052
    Senior Member
    Join Date
    Jul 2017
    Posts
    125
    Quote Originally Posted by philippe_44 View Post
    Output to I2S DAC. Special drivers exist for TAS5754/56/13/80 and AC101 but most I2S-connected DAC will work and it's possible to configure rudimentary I2C commands.
    Sorry, but I've been reading up on I2S and now feel like I have enough knowledge to be dangerous .

    Is it true that the default I2S driver makes the ESP32 the I2S master when connected to a DAC? This means that the BCLK, LRCK, AND DATA pins
    are all outputs?

    The ESP32 derives an MCLK from it's internal 40mhz clock, getting an MCLK as close as possible to Freq * Bit Length * 2 * 8?

    Once MCLK is determined, BCLK and LRCK are derived from it?

    I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0

    I'm going to stop there, since any more questions are based on the above answers.

    Thanks, Mike

  3. #1053
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,481
    Quote Originally Posted by mboxler View Post
    Sorry, but I've been reading up on I2S and now feel like I have enough knowledge to be dangerous .

    Is it true that the default I2S driver makes the ESP32 the I2S master when connected to a DAC? This means that the BCLK, LRCK, AND DATA pins
    are all outputs?

    The ESP32 derives an MCLK from it's internal 40mhz clock, getting an MCLK as close as possible to Freq * Bit Length * 2 * 8?

    Once MCLK is determined, BCLK and LRCK are derived from it?

    I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0

    I'm going to stop there, since any more questions are based on the above answers.

    Thanks, Mike
    Yes, esp32 is master and bitclock as well as wordclock are outputs. Masterclock has to be generated by the DAC. All DAC Iíve used so far are capable of being slave in that mode
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  4. #1054
    Senior Member
    Join Date
    Jul 2017
    Posts
    125
    Quote Originally Posted by philippe_44 View Post
    Yes, esp32 is master and bitclock as well as wordclock are outputs. Masterclock has to be generated by the DAC. All DAC Iíve used so far are capable of being slave in that mode
    Thank you so much!

    So in my example above, the DAC has to be able to generate a master clock of 11289597.000, or some other multiple of 1411199.6250? If it can't for some reason, then the ESP32 would need to connect an MCLK pin (GPIO 0) to the DAC? I assume WM8978 DAC has such an issue and that's why wm8978.c
    has code to output the ESP32's MCLK to GPIO 0...

    ESP_LOGI(TAG, "Configuring MCLK on pin:%d", 0);
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
    REG_WRITE(PIN_CTRL, 0xFFFFFFF0);

    Mike

  5. #1055
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,481
    Quote Originally Posted by mboxler View Post
    Thank you so much!

    So in my example above, the DAC has to be able to generate a master clock of 11289597.000, or some other multiple of 1411199.6250? If it can't for some reason, then the ESP32 would need to connect an MCLK pin (GPIO 0) to the DAC? I assume WM8978 DAC has such an issue and that's why wm8978.c
    has code to output the ESP32's MCLK to GPIO 0...

    ESP_LOGI(TAG, "Configuring MCLK on pin:%d", 0);
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
    REG_WRITE(PIN_CTRL, 0xFFFFFFF0);

    Mike
    Iíve never investigated the issue of wm8978, Iíve just accepted the PR. Itís surprising that a DAC cannot work w/o a mclk but I did not try (I have a wm8978 now but my days have only 24 hours ). I donít like the idea of using GPIO0 as I need it for other purpose on some designs and I also intend to make some other development adding Ethernet and I know there are some difficulties there with gpio0. Iíll try the es8388 as soon as I receive my board, which should be this week
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  6. #1056
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,481

    ANNOUNCE: Squeezelite-ESP32 (dedicated thread)

    I've received my board. The main issue was the use of MCLK (master clock). This is a crappy codec...
    Anyway, please use the latest build and there is no need for dac_controlset, I've added it to the well-known codecs. You still need the dac_config
    Code:
    model=ES8388,bck=5,ws=25,do=26,sda=18,scl=23,i2c=16
    [edit]: corrected dac_config!
    Last edited by philippe_44; 2021-08-04 at 13:26.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  7. #1057
    Thank you. I will try it after my vacation, next week.

  8. #1058
    Junior Member
    Join Date
    Jun 2021
    Posts
    10
    thank you, should I use generic firmware and put your config?

  9. #1059
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,481
    Quote Originally Posted by Diddlik View Post
    thank you, should I use generic firmware and put your config?
    Yes - there is no A1S version anymore
    Last edited by philippe_44; 2021-08-04 at 07:47.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  10. #1060
    Junior Member
    Join Date
    Jul 2021
    Posts
    10
    Quote Originally Posted by philippe_44 View Post
    I've received my board. The main issue was the use of MCLK (master clock). This is a crappy codec...
    Anyway, please use the latest build and there is no need for dac_controlset, I've added it to the well-known codec. You still need the dac_config
    Code:
    model=ES8388,bck=5,ws=26,do=25,sda=18,scl=23,i2c=16
    Hi, thanks for the new version!

    Just flashed it, set the dac_config and GPIO but all I get is the noise(gets louder if I turn volume down). Tried both 16 and 32bit versions.
    What did I miss?
    Last edited by attz; 2021-08-04 at 11:18.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •