Home of the Squeezebox™ & Transporter® network music players.
Page 105 of 113 FirstFirst ... 55595103104105106107 ... LastLast
Results 1,041 to 1,050 of 1123
  1. #1041
    Junior Member
    Join Date
    Mar 2021
    Posts
    12

    How do you get back to using the dial as a volume control?

    This maybe a LMS question, but is there a control available to force the rotary control back to volume control mode?

    I'm using the rotary dial with 3 additional buttons to control a squeezelite-esp32 with a display. The dial is used for volume control by default. After clicking the button, you can access the menu, and I use the buttons for the back and play functions. It works great, but somethimes it's frustrating that I have to wait for the timeout to use the dial to adjust the volume again. Is it possible to force this?

    This is my current button setup
    Code:
    [{"gpio":38,"type":"BUTTON_LOW","pull":true,"long_press":600, "normal":{"pressed":"BCTRLS_LEFT"}, "longpress":{"pressed":"ACTRLS_PREV"}},  {"gpio":39,"type":"BUTTON_LOW","pull":true,"long_press":600, "normal":{"pressed":"BCTRLS_RIGHT"}, "longpress":{"pressed":"ACTRLS_NEXT"}},  {"gpio":37,"type":"BUTTON_LOW","pull":true,"long_press":600, "normal":{"pressed":"ACTRLS_PLAY"}, "longpress":{"pressed":"ACTRLS_TOGGLE"}} ]
    Edit:
    No worries, figured it out. Pressing a volume button on the Boom puts the dial back immediately.

    Current button setup is now
    Code:
    [{"gpio":38,"type":"BUTTON_LOW","pull":true,"shifter_gpio":0,"long_press":600, "normal":{"pressed":"BCTRLS_LEFT"},"longpress":{"pressed":"ACTRLS_PREV"},"shifted":{"pressed":"ACTRLS_VOLDOWN"}},  {"gpio":39,"type":"BUTTON_LOW","pull":true,"shifter_gpio":0,"long_press":600, "normal":{"pressed":"BCTRLS_RIGHT"},"longpress":{"pressed":"ACTRLS_NEXT"},"shifted":{"pressed":"ACTRLS_VOLUP"}},
    {"gpio":37,"type":"BUTTON_LOW","pull":true,"long_press":600, "normal":{"pressed":"ACTRLS_PLAY"}, "longpress":{"pressed":"ACTRLS_TOGGLE"}}]
    Now I just have to long press the button and the up or down button.
    Last edited by wizmo; 2021-07-25 at 10:13.
    SlimServer user since circa 2003 - still the best networked audio solution after 20+years!

  2. #1042
    Finally I got the board playing a sound with the default example from https://github.com/Ai-Thinker-Open/ESP32-A1S-AudioKit
    The configuration is as described by the pictures in this manual: https://docs.ai-thinker.com/_media/e...swHqCNjb_50ntg

    Maybe we can get the configuration from there.

    Here is what to do for the default example "play_mp3":

    * Clone the repository from https://github.com/Ai-Thinker-Open/ESP32-A1S-AudioKit
    * Set the environment variables:
    * export IDF_PATH=~/esp/ESP32-A1S-AudioKit/esp-idf/
    * export ADF_PATH=~/esp/ESP32-A1S-AudioKit/
    * cd esp-adf/ai-examples/get-started/play_mp3
    * make menuconfig
    * chose Audio-HAL --> ESP32-Lyrat V4.3 (a board with es8388)
    * chose your serail port
    * connect your device
    * make flash monitor
    * a sound will play

    If I try to configure the audio kit V2.2 I get a non surprising error: AC101: reset failed!


    Maybe you first have to set up the SDK, but as I set the path variables to the SDK within the github project above, it may not be necessary...
    * Install ESP-IDF following: https://docs.espressif.com/projects/...ed-get-esp-idf
    * I switched to the linux installation guide: https://docs.espressif.com/projects/...nux-setup.html
    * Do not forget to set the environment variables to IDF_PATH
    * Install the ESP-ADF following: https://docs.espressif.com/projects/...ed-get-esp-adf
    * Do not forget to set the environment variables to ADF_PATH


    The configuration of the Lyrat V4.3 board can be found here: https://github.com/Ai-Thinker-Open/E..._pins_config.c
    Code:
            i2c_config->sda_io_num = GPIO_NUM_18;
            i2c_config->scl_io_num = GPIO_NUM_23;
            i2s_config->bck_io_num = GPIO_NUM_5;
            i2s_config->ws_io_num = GPIO_NUM_25;
            i2s_config->data_out_num = GPIO_NUM_26;
            i2s_config->data_in_num = GPIO_NUM_35;
    So the squeezelite dac_config should look like:
    Code:
    model=I2S,bck=5,ws=25,do=26,di=35,sda=18,scl=23,i2c=16
    For dac_controlset I have
    Code:
    {"init":[{"reg":8,"val":0},{"reg":4,"val":60},{"reg":23,"va l":24}]}
    Unfortunately I get still this random noise.


    ==> What can we do next?

    Maybe somebody can check the es8388 config for setting the registers from here: https://github.com/Ai-Thinker-Open/E...s8388/es8388.c
    Last edited by jofland; 2021-07-26 at 10:32.

  3. #1043
    Senior Member
    Join Date
    Jul 2017
    Posts
    125
    Quote Originally Posted by jofland View Post

    Maybe somebody can check the es8388 config for setting the registers from here: https://github.com/Ai-Thinker-Open/E...s8388/es8388.c
    This person seems to have had success, but again, he modified the code to assign MCLK to GPIO0 so that the ES8388 could be in slave mode.

    https://github.com/philippe44/squeez...sp32/issues/28

    Scroll to the bottom for the register settings.

    Sorry if you have already tried this.

    Mike

  4. #1044
    Quote Originally Posted by mboxler View Post
    This person seems to have had success, but again, he modified the code to assign MCLK to GPIO0 so that the ES8388 could be in slave mode.

    https://github.com/philippe44/squeez...sp32/issues/28

    Scroll to the bottom for the register settings.

    Sorry if you have already tried this.

    Mike
    Thank you for the hint; I did not know this yet.

    I tried the suggestion for the registers from kheperV3┤s last post:

    Code:
    {"init":[{"reg":0,"val":0},{"reg":25,"val":4},{"reg":1,"val":80},{"reg":2,"val":0},{"reg":8,"val":0},{"reg":4,"val":192},{"reg":0,"val":18},{"reg":1,"val":0},{"reg":23,"val":24},{"reg":24,"val":2},{"reg":38,"val":9},{"reg":39,"val":144},{"reg":42,"val":144},{"reg":43,"val":128},{"reg":45,"val":0},{"reg":27,"val":0},{"reg":26,"val":0},{"reg":2,"val":240},{"reg":2,"val":0},{"reg":29,"val":28},{"reg":4,"val":48},{"reg":25,"val":0},{"reg":46,"val":33},{"reg":47,"val":33}],"poweron":[{"reg":2, "val":0}],"poweroff":[{"reg":2,"val":3}]}
    Code:
    model=I2S,bck=5,ws=25,do=26,di=35,sda=18,scl=23,i2c=16,port=0
    ==> I get plopping sound on reboot; but no sound (music) playing. When starting a mp3 song fist there is no random noise; the noise starts after several seconds.


    I wonder why kheperV3 sets the same registers (0 and 4) twice to different values?

  5. #1045
    Junior Member
    Join Date
    Apr 2019
    Posts
    10

    Loading nvs_config

    Trying to load a nvs_config file nothing happens,
    maybe I'm doing something wrong:

    Download the config from the nvs editor, change e.g. dac_config
    Upload the new config via "Load File"
    Commit
    Reboot the System
    No changes

    fw: I2S-4MFlash.16.704.master-cmake, mode: Squeezelite-ESP32


    While looking for a possible way to put presets on buttons,
    i find "BCTRLS_PS1" ... in the git, works very well,
    shouldn't it be listed in the readme?

    thank you for all the work, a great project !!!

    chschind

  6. #1046
    Senior Member
    Join Date
    Jul 2017
    Posts
    125
    Quote Originally Posted by jofland View Post

    I wonder why kheperV3 sets the same registers (0 and 4) twice to different values?
    Rats...I think kheperV3 was using https://github.com/espressif/esp-adf...s8388/es8388.c
    and not the one you linked to. Should have looked closer.

    Sorry about that.

    That said, I think kheperV3 was just following the code top to bottom and setting registers accordingly.

    Mike

  7. #1047
    Senior Member
    Join Date
    Jul 2017
    Posts
    125
    Quote Originally Posted by jofland View Post
    * Clone the repository from https://github.com/Ai-Thinker-Open/ESP32-A1S-AudioKit
    * Set the environment variables:
    * export IDF_PATH=~/esp/ESP32-A1S-AudioKit/esp-idf/
    * export ADF_PATH=~/esp/ESP32-A1S-AudioKit/
    * cd esp-adf/ai-examples/get-started/play_mp3
    * make menuconfig
    * chose Audio-HAL --> ESP32-Lyrat V4.3 (a board with es8388)
    * chose your serail port
    * connect your device
    * make flash monitor
    * a sound will play
    For my own education, I can't figure out what this code does in es8388.c...

    res |= es_write_reg(ES8388_ADDR, ES8388_MASTERMODE, cfg->i2s_iface.mode); //CODEC IN I2S SLAVE MODE

    If you boot that board without anything in dac_controlset, what ends up in ES8388_MASTERMODE, Register 8?

    Thanks, Mike

  8. #1048
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,496
    Quote Originally Posted by mboxler View Post
    For my own education, I can't figure out what this code does in es8388.c...

    res |= es_write_reg(ES8388_ADDR, ES8388_MASTERMODE, cfg->i2s_iface.mode); //CODEC IN I2S SLAVE MODE

    If you boot that board without anything in dac_controlset, what ends up in ES8388_MASTERMODE, Register 8?

    Thanks, Mike
    The default value according to the ES8388 doc
    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

  9. #1049
    Quote Originally Posted by mboxler View Post
    If you boot that board without anything in dac_controlset, what ends up in ES8388_MASTERMODE, Register 8?
    Quote Originally Posted by philippe_44 View Post
    The default value according to the ES8388 doc
    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.

    Name:  Screenshot_20210727_191429.png
Views: 137
Size:  20.4 KB

  10. #1050
    Quote Originally Posted by mboxler View Post
    For my own education, I can't figure out what this code does in es8388.c...

    res |= es_write_reg(ES8388_ADDR, ES8388_MASTERMODE, cfg->i2s_iface.mode); //CODEC IN I2S SLAVE MODE
    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.

Posting Permissions

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