TAS2110: RX with I2S/left justify

Part Number: TAS2110


Hi ! 
I'm sending data to the TAS2110 on the SDIN pin. 
I noticed PPC3 did not export the TDM configuration (TDM_CG) 
I intend to use PCM/I2S left justified, single channel , tho I output L and R each frame cycle. 

I added these registers to the list. 

{ 0x07, 0x03 }, // RX justfigy left, RX_OFFSET = 1
{ 0x08, 0x00 }, // RX stereo downmix, 16 bit word, 16 bit slot length
 

Looking on the wire, the data looks right. 
The audio does not resemble an audible tone and sounds garbled. 
Any advice for debugging this? 

I'm using zephyr 3.5.0 and here are my settings

i2s_cfg.word_size = 16U;
i2s_cfg.channels = 2U;
i2s_cfg.format = I2S_FMT_DATA_FORMAT_PCM_SHORT | I2S_FMT_DATA_FORMAT_LEFT_JUSTIFIED;
i2s_cfg.frame_clk_freq = 48000;
i2s_cfg.block_size = BLOCK_SIZE;
i2s_cfg.timeout = 2000;
i2s_cfg.options = I2S_OPT_FRAME_CLK_MASTER | I2S_OPT_BIT_CLK_MASTER;
 

Screenshot 2025-10-18 at 13.06.05.png

  • Hi Michael,

    Do you have any device control features enabled such as brown out protection or low EMI spectrum spread? If the device is receiving the proper data/clocks, perhaps one of these features could be affecting the output signal quality. 

    Regards,

    Sebastian 

  • Thanks Sebastian. 

    Looks like they were both on by default. 
    I just shut them off and getting the same result. 

    tho for the first time, I've gotten audio on my macbook and windows machine. 
    I will keep poking.



    I've attached GUI screen shots. 

  • Here's what I notice. with xmos as a sound device, it only works when I power on from PPC3. 
    Using the i2c logger with PPC3, I get the following 3 sequences when I go power on -> off -> on. 

    w 98 00 00
    w 98 7f 00
    w 98 00 00
    w 98 02 0c
    w 98 00 00
    w 98 7f 00
    w 98 00 00
    w 98 02 0e
    w 98 00 00
    w 98 7f 00
    w 98 00 00
    w 98 02 0c
    I added that with my config, still getting distorted audio. 
    Should I disable the thermal stuff as well? 

    I also realized I needed i2c pullups, so that's looking much better. 


    When I push my full config, I'm seeing alot of clock stretching


    zoomed in, register 0x5b
    this is my config loop at the bottom of this file, I added 5 ms delays between attempts, and 10 ms delay before retry
    this is triggered after I have timers filling the i2s buffer from a small state machine in a while loop. 
    #include "tas2110_ppc3_cfg.h"
    
    typedef unsigned char cfg_u8;
    typedef struct {
        cfg_u8 command;
        cfg_u8 param;
    } cfg_reg;
    
    #define CFG_META_SWITCH (255)
    #define CFG_META_DELAY (254)
    #define CFG_META_BURST (253)
    
    // cfg_reg registers_ch1[] = {
    // #define CHECKSUM (0)
    
    //     // -----------------------------------------------------------------------------
    //     // Reset
    //     // -----------------------------------------------------------------------------
    
    //     // Page 0
    //     {0x00, 0x00},
    //     // Book 0
    //     {0x7f, 0x00},
    //     // Page 0
    //     {0x00, 0x00},
    
    //     // Reset Device
    //     {0x01, 0x01},
    
    //     // 1mS Delay
    //     {CFG_META_DELAY, 0x01},
    
    //     // Test bits Page fd
    //     {0x00, 0x00},
    //     {0x7f, 0x00},
    //     {0x00, 0xfd},
    //     // Password
    //     {0x0d, 0x0d},
    //     {0x19, 0x80},
    //     {0x32, 0x49},
    //     {0x3f, 0x21},
    //     {0x51, 0xc1},
    
    //     // -----------------------------------------------------------------------------
    //     // Begin Device Memory
    //     // -----------------------------------------------------------------------------
    
    //     // Book 0 Page 0 (0x00) Dump
    //     {0x00, 0x00},
    //     {0x7f, 0x00},
    //     {0x00, 0x00},
    //     {0x04, 0xC4}, // turn off EMI spread spectrum
    //     {0x07, 0x03}, // RX justify left, RX_OFFSET = 1
    //     {0x08, 0x00}, // RX stereo downmix, 16 bit word, 16 bit slot length
    //     {0x0a, 0x03},
    //     {0x0b, 0x00},
    //     {0x11, 0x00},
    //     {0x14, 0x00}, // turn off BOP
    //     {0x16, 0x00},
    //     {0x17, 0x00},
    //     {0x18, 0x00},
    //     {0x32, 0x81},
    //     {0x35, 0x84},
    //     {0x38, 0x21},
    //     {0x3f, 0x40},
    //     {0x40, 0xb6},
    
    //     // Book 0 Page 1 (0x01) Dump
    //     {0x00, 0x00},
    //     {0x7f, 0x00},
    //     {0x00, 0x01},
    
    //     // Book 0 Page 2
    //     {0x00, 0x00},
    //     {0x7f, 0x00},
    //     {0x00, 0x02},
    //     {0x0c, 0x40},
    //     {0x0d, 0x00},
    //     {0x0e, 0x00},
    //     {0x0f, 0x00},
    //     {0x10, 0x03},
    //     {0x11, 0x4a},
    //     {0x12, 0x51},
    //     {0x13, 0x6c},
    //     {0x14, 0x2d},
    //     {0x15, 0x6a},
    //     {0x16, 0x86},
    //     {0x17, 0x6f},
    //     {0x18, 0x45},
    //     {0x19, 0xee},
    //     {0x1a, 0x3a},
    //     {0x1b, 0x8f},
    //     {0x1c, 0x16},
    //     {0x1d, 0x66},
    //     {0x1e, 0x66},
    //     {0x1f, 0x66},
    //     {0x20, 0x34},
    //     {0x21, 0xcc},
    //     {0x22, 0xcc},
    //     {0x23, 0xcd},
    //     {0x24, 0x10},
    //     {0x25, 0x00},
    //     {0x26, 0x00},
    //     {0x27, 0x00},
    //     {0x28, 0x2b},
    //     {0x29, 0x33},
    //     {0x2a, 0x33},
    //     {0x2b, 0x33},
    //     {0x2c, 0x2b},
    //     {0x2d, 0x33},
    //     {0x2e, 0x33},
    //     {0x2f, 0x33},
    //     {0x30, 0x7f},
    //     {0x31, 0xfb},
    //     {0x32, 0xb6},
    //     {0x33, 0x14},
    //     {0x34, 0x80},
    //     {0x35, 0x04},
    //     {0x36, 0x49},
    //     {0x37, 0xed},
    //     {0x38, 0x7f},
    //     {0x39, 0xf7},
    //     {0x3a, 0x6c},
    //     {0x3b, 0x28},
    //     {0x3c, 0x37},
    //     {0x3d, 0x24},
    //     {0x3e, 0x91},
    //     {0x3f, 0xbf},
    //     {0x40, 0x40},
    //     {0x41, 0xf8},
    //     {0x42, 0x3f},
    //     {0x43, 0xbe},
    //     {0x44, 0x00},
    //     {0x45, 0x00},
    //     {0x46, 0xbb},
    //     {0x47, 0x7f},
    //     {0x48, 0x02},
    //     {0x49, 0x46},
    //     {0x4a, 0xb4},
    //     {0x4b, 0xe4},
    //     {0x4c, 0xe0},
    //     {0x4d, 0x00},
    //     {0x4e, 0x00},
    //     {0x4f, 0x01},
    //     {0x50, 0x6e},
    //     {0x51, 0xd9},
    //     {0x52, 0xeb},
    //     {0x53, 0xa1},
    //     {0x54, 0x00},
    //     {0x55, 0x00},
    //     {0x56, 0x00},
    //     {0x57, 0x04},
    //     {0x58, 0x08},
    //     {0x59, 0x09},
    //     {0x5a, 0xbc},
    //     {0x5b, 0xc4},
    //     {0x5c, 0x01},
    //     {0x5d, 0xc9},
    //     {0x5e, 0x24},
    //     {0x5f, 0x92},
    //     {0x60, 0x00},
    //     {0x61, 0x12},
    //     {0x62, 0x49},
    //     {0x63, 0x25},
    //     {0x64, 0x00},
    //     {0x65, 0x20},
    //     {0x66, 0xc4},
    //     {0x67, 0x9c},
    //     {0x6c, 0x00},
    //     {0x6d, 0x00},
    //     {0x6e, 0x12},
    //     {0x6f, 0xc0},
    //     {0x70, 0x7f},
    //     {0x71, 0xfb},
    //     {0x72, 0xb6},
    //     {0x73, 0x14},
    //     {0x74, 0x80},
    //     {0x75, 0x04},
    //     {0x76, 0x49},
    //     {0x77, 0xed},
    //     {0x78, 0x7f},
    //     {0x79, 0xf7},
    //     {0x7a, 0x6c},
    //     {0x7b, 0x28},
    //     {0x7c, 0x72},
    //     {0x7d, 0x14},
    //     {0x7e, 0x82},
    //     {0x7f, 0xc0},
    
    //     // Book 0 Page 4
    //     {0x00, 0x00},
    //     {0x7f, 0x00},
    //     {0x00, 0x04},
    //     {0x58, 0x00},
    //     {0x59, 0x00},
    //     {0x5a, 0x00},
    //     {0x5b, 0x64},
    //     {0x5c, 0x40},
    //     {0x5d, 0xbd},
    //     {0x5e, 0xb7},
    //     {0x5f, 0xc0},
    //     {0x60, 0x39},
    //     {0x61, 0x80},
    //     {0x62, 0x00},
    //     {0x63, 0x00},
    //     {0x64, 0x2d},
    //     {0x65, 0x6a},
    //     {0x66, 0x86},
    //     {0x67, 0x6f},
    //     {0x68, 0x02},
    //     {0x69, 0x46},
    //     {0x6a, 0xb4},
    //     {0x6b, 0xe4},
    
    //     // Book 100 Page 8
    //     {0x00, 0x00},
    //     {0x7f, 0x64},
    //     {0x00, 0x08},
    //     {0x1c, 0x50},
    //     {0x1d, 0x17},
    //     {0x1e, 0x01},
    //     {0x1f, 0xc0},
    
    //     // Book 100 Page 7
    //     {0x00, 0x00},
    //     {0x7f, 0x64},
    //     {0x00, 0x07},
    //     {0x38, 0x2f},
    //     {0x39, 0x33},
    //     {0x3a, 0x33},
    //     {0x3b, 0x33},
    //     {0x3c, 0x00},
    //     {0x3d, 0x00},
    //     {0x3e, 0x00},
    //     {0x3f, 0x00},
    //     {0x40, 0x04},
    //     {0x41, 0xcc},
    //     {0x42, 0xcc},
    //     {0x43, 0xcd},
    //     {0x48, 0x09},
    //     {0x49, 0x99},
    //     {0x4a, 0x99},
    //     {0x4b, 0x9a},
    //     {0x4c, 0x00},
    //     {0x4d, 0x00},
    //     {0x4e, 0x00},
    //     {0x4f, 0x00},
    
    //     // Book 100 Page 18
    //     {0x00, 0x00},
    //     {0x7f, 0x64},
    //     {0x00, 0x12},
    //     {0x10, 0x1e},
    //     {0x11, 0x2e},
    //     {0x12, 0x14},
    //     {0x13, 0x7b},
    //     {0x14, 0x21},
    //     {0x15, 0x3d},
    //     {0x16, 0x70},
    //     {0x17, 0xa4},
    //     {0x18, 0x24},
    //     {0x19, 0x4c},
    //     {0x1a, 0xcc},
    //     {0x1b, 0xcd},
    //     {0x1c, 0x27},
    //     {0x1d, 0x5c},
    //     {0x1e, 0x28},
    //     {0x1f, 0xf6},
    //     {0x20, 0x2a},
    //     {0x21, 0x6b},
    //     {0x22, 0x85},
    //     {0x23, 0x1f},
    //     {0x24, 0x2d},
    //     {0x25, 0x7a},
    //     {0x26, 0xe1},
    //     {0x27, 0x48},
    //     {0x28, 0x30},
    //     {0x29, 0x8a},
    //     {0x2a, 0x3d},
    //     {0x2b, 0x71},
    //     {0x2c, 0x33},
    //     {0x2d, 0x99},
    //     {0x2e, 0x99},
    //     {0x2f, 0x9a},
    //     {0x30, 0x36},
    //     {0x31, 0xa8},
    //     {0x32, 0xf5},
    //     {0x33, 0xc3},
    //     {0x34, 0x39},
    //     {0x35, 0xb8},
    //     {0x36, 0x51},
    //     {0x37, 0xec},
    //     {0x38, 0x3c},
    //     {0x39, 0xc7},
    //     {0x3a, 0xae},
    //     {0x3b, 0x14},
    //     {0x3c, 0x3f},
    //     {0x3d, 0xd7},
    //     {0x3e, 0x0a},
    //     {0x3f, 0x3d},
    //     {0x50, 0x1c},
    //     {0x51, 0x94},
    //     {0x52, 0x7a},
    //     {0x53, 0xe1},
    //     {0x54, 0x1f},
    //     {0x55, 0xa3},
    //     {0x56, 0xd7},
    //     {0x57, 0x0a},
    //     {0x58, 0x22},
    //     {0x59, 0xb3},
    //     {0x5a, 0x33},
    //     {0x5b, 0x33},
    //     {0x5c, 0x25},
    //     {0x5d, 0xc2},
    //     {0x5e, 0x8f},
    //     {0x5f, 0x5c},
    //     {0x60, 0x28},
    //     {0x61, 0xd1},
    //     {0x62, 0xeb},
    //     {0x63, 0x85},
    //     {0x64, 0x2b},
    //     {0x65, 0xe1},
    //     {0x66, 0x47},
    //     {0x67, 0xae},
    //     {0x68, 0x2e},
    //     {0x69, 0xf0},
    //     {0x6a, 0xa3},
    //     {0x6b, 0xd7},
    //     {0x6c, 0x32},
    //     {0x6d, 0x00},
    //     {0x6e, 0x00},
    //     {0x6f, 0x00},
    //     {0x70, 0x35},
    //     {0x71, 0x0f},
    //     {0x72, 0x5c},
    //     {0x73, 0x29},
    //     {0x74, 0x38},
    //     {0x75, 0x1e},
    //     {0x76, 0xb8},
    //     {0x77, 0x52},
    //     {0x78, 0x3b},
    //     {0x79, 0x2e},
    //     {0x7a, 0x14},
    //     {0x7b, 0x7b},
    //     {0x7c, 0x3e},
    //     {0x7d, 0x3d},
    //     {0x7e, 0x70},
    //     {0x7f, 0xa4},
    
    // };
    
    cfg_reg registers_ch1[] = {
    #define CHECKSUM (0)
        // -----------------------------------------------------------------------------
        // Reset
        // -----------------------------------------------------------------------------
        // Page 0
        {0x00, 0x00},
        // Book 0
        {0x7f, 0x00},
        // Page 0
        {0x00, 0x00},
        // Reset Device
        {0x01, 0x01},
        // 1mS Delay
        {CFG_META_DELAY, 0x01},
        // Test bits Page fd
        {0x00, 0x00},
        {0x7f, 0x00},
        {0x00, 0xfd},
        // Password
        {0x0d, 0x0d},
        {0x19, 0x80},
        {0x32, 0x49},
        {0x3f, 0x21},
        {0x51, 0xc1},
        // -----------------------------------------------------------------------------
        // Begin Device Memory
        // -----------------------------------------------------------------------------
        // Book 0 Page 0 (0x00) Dump
        {0x00, 0x00},
        {0x7f, 0x00},
        {0x00, 0x00},
        {0x04, 0xc2},
        {0x07, 0x03},
        {0x08, 0x10},
        {0x0a, 0x03},
        {0x0b, 0x00},
        {0x11, 0x00},
        {0x14, 0x00},
        {0x16, 0x00},
        {0x17, 0x00},
        {0x18, 0x00},
        {0x32, 0x81},
        {0x35, 0x84},
        {0x38, 0x20},
        {0x40, 0xb6},
        // Book 0 Page 1 (0x01) Dump
        {0x00, 0x00},
        {0x7f, 0x00},
        {0x00, 0x01},
        // Book 0 Page 2
        {0x00, 0x00},
        {0x7f, 0x00},
        {0x00, 0x02},
        {0x0c, 0x40},
        {0x0d, 0x00},
        {0x0e, 0x00},
        {0x0f, 0x00},
        {0x10, 0x03},
        {0x11, 0x4a},
        {0x12, 0x51},
        {0x13, 0x6c},
        {0x14, 0x2d},
        {0x15, 0x6a},
        {0x16, 0x86},
        {0x17, 0x6f},
        {0x18, 0x47},
        {0x19, 0x33},
        {0x1a, 0x33},
        {0x1b, 0x33},
        {0x1c, 0x16},
        {0x1d, 0x66},
        {0x1e, 0x66},
        {0x1f, 0x66},
        {0x20, 0x34},
        {0x21, 0xcc},
        {0x22, 0xcc},
        {0x23, 0xcd},
        {0x24, 0x10},
        {0x25, 0x00},
        {0x26, 0x00},
        {0x27, 0x00},
        {0x28, 0x2b},
        {0x29, 0x33},
        {0x2a, 0x33},
        {0x2b, 0x33},
        {0x2c, 0x2b},
        {0x2d, 0x33},
        {0x2e, 0x33},
        {0x2f, 0x33},
        {0x30, 0x7f},
        {0x31, 0xfb},
        {0x32, 0xb6},
        {0x33, 0x14},
        {0x34, 0x80},
        {0x35, 0x04},
        {0x36, 0x49},
        {0x37, 0xed},
        {0x38, 0x7f},
        {0x39, 0xf7},
        {0x3a, 0x6c},
        {0x3b, 0x28},
        {0x3c, 0x37},
        {0x3d, 0x24},
        {0x3e, 0x91},
        {0x3f, 0xbf},
        {0x40, 0x40},
        {0x41, 0xf8},
        {0x42, 0x3f},
        {0x43, 0xbe},
        {0x44, 0x00},
        {0x45, 0x00},
        {0x46, 0xbb},
        {0x47, 0x7f},
        {0x48, 0x02},
        {0x49, 0x46},
        {0x4a, 0xb4},
        {0x4b, 0xe4},
        {0x4c, 0xe0},
        {0x4d, 0x00},
        {0x4e, 0x00},
        {0x4f, 0x01},
        {0x50, 0x6e},
        {0x51, 0xd9},
        {0x52, 0xeb},
        {0x53, 0xa1},
        {0x54, 0x00},
        {0x55, 0x00},
        {0x56, 0x00},
        {0x57, 0x04},
        {0x58, 0x08},
        {0x59, 0x09},
        {0x5a, 0xbc},
        {0x5b, 0xc4},
        {0x5c, 0x01},
        {0x5d, 0xc9},
        {0x5e, 0x24},
        {0x5f, 0x92},
        {0x60, 0x00},
        {0x61, 0x12},
        {0x62, 0x49},
        {0x63, 0x25},
        {0x64, 0x00},
        {0x65, 0x20},
        {0x66, 0xc4},
        {0x67, 0x9c},
        {0x6c, 0x00},
        {0x6d, 0x00},
        {0x6e, 0x12},
        {0x6f, 0xc0},
        {0x70, 0x7f},
        {0x71, 0xfb},
        {0x72, 0xb6},
        {0x73, 0x14},
        {0x74, 0x80},
        {0x75, 0x04},
        {0x76, 0x49},
        {0x77, 0xed},
        {0x78, 0x7f},
        {0x79, 0xf7},
        {0x7a, 0x6c},
        {0x7b, 0x28},
        {0x7c, 0x72},
        {0x7d, 0x14},
        {0x7e, 0x82},
        {0x7f, 0xc0},
        // Book 0 Page 4
        {0x00, 0x00},
        {0x7f, 0x00},
        {0x00, 0x04},
        {0x58, 0x00},
        {0x59, 0x00},
        {0x5a, 0x00},
        {0x5b, 0x64},
        {0x5c, 0x40},
        {0x5d, 0xbd},
        {0x5e, 0xb7},
        {0x5f, 0xc0},
        {0x60, 0x39},
        {0x61, 0x80},
        {0x62, 0x00},
        {0x63, 0x00},
        {0x64, 0x2d},
        {0x65, 0x6a},
        {0x66, 0x86},
        {0x67, 0x6f},
        {0x68, 0x02},
        {0x69, 0x46},
        {0x6a, 0xb4},
        {0x6b, 0xe4},
        // Book 100 Page 8
        {0x00, 0x00},
        {0x7f, 0x64},
        {0x00, 0x08},
        {0x1c, 0x50},
        {0x1d, 0x17},
        {0x1e, 0x01},
        {0x1f, 0xc0},
        // Book 100 Page 7
        {0x00, 0x00},
        {0x7f, 0x64},
        {0x00, 0x07},
        {0x38, 0x2f},
        {0x39, 0x33},
        {0x3a, 0x33},
        {0x3b, 0x33},
        {0x3c, 0x00},
        {0x3d, 0x00},
        {0x3e, 0x00},
        {0x3f, 0x00},
        {0x40, 0x04},
        {0x41, 0xcc},
        {0x42, 0xcc},
        {0x43, 0xcd},
        {0x48, 0x09},
        {0x49, 0x99},
        {0x4a, 0x99},
        {0x4b, 0x9a},
        {0x4c, 0x00},
        {0x4d, 0x00},
        {0x4e, 0x00},
        {0x4f, 0x00},
        // Book 100 Page 18
        {0x00, 0x00},
        {0x7f, 0x64},
        {0x00, 0x12},
        {0x10, 0x1e},
        {0x11, 0x2e},
        {0x12, 0x14},
        {0x13, 0x7b},
        {0x14, 0x21},
        {0x15, 0x3d},
        {0x16, 0x70},
        {0x17, 0xa4},
        {0x18, 0x24},
        {0x19, 0x4c},
        {0x1a, 0xcc},
        {0x1b, 0xcd},
        {0x1c, 0x27},
        {0x1d, 0x5c},
        {0x1e, 0x28},
        {0x1f, 0xf6},
        {0x20, 0x2a},
        {0x21, 0x6b},
        {0x22, 0x85},
        {0x23, 0x1f},
        {0x24, 0x2d},
        {0x25, 0x7a},
        {0x26, 0xe1},
        {0x27, 0x48},
        {0x28, 0x30},
        {0x29, 0x8a},
        {0x2a, 0x3d},
        {0x2b, 0x71},
        {0x2c, 0x33},
        {0x2d, 0x99},
        {0x2e, 0x99},
        {0x2f, 0x9a},
        {0x30, 0x36},
        {0x31, 0xa8},
        {0x32, 0xf5},
        {0x33, 0xc3},
        {0x34, 0x39},
        {0x35, 0xb8},
        {0x36, 0x51},
        {0x37, 0xec},
        {0x38, 0x3c},
        {0x39, 0xc7},
        {0x3a, 0xae},
        {0x3b, 0x14},
        {0x3c, 0x3f},
        {0x3d, 0xd7},
        {0x3e, 0x0a},
        {0x3f, 0x3d},
        {0x50, 0x1c},
        {0x51, 0x94},
        {0x52, 0x7a},
        {0x53, 0xe1},
        {0x54, 0x1f},
        {0x55, 0xa3},
        {0x56, 0xd7},
        {0x57, 0x0a},
        {0x58, 0x22},
        {0x59, 0xb3},
        {0x5a, 0x33},
        {0x5b, 0x33},
        {0x5c, 0x25},
        {0x5d, 0xc2},
        {0x5e, 0x8f},
        {0x5f, 0x5c},
        {0x60, 0x28},
        {0x61, 0xd1},
        {0x62, 0xeb},
        {0x63, 0x85},
        {0x64, 0x2b},
        {0x65, 0xe1},
        {0x66, 0x47},
        {0x67, 0xae},
        {0x68, 0x2e},
        {0x69, 0xf0},
        {0x6a, 0xa3},
        {0x6b, 0xd7},
        {0x6c, 0x32},
        {0x6d, 0x00},
        {0x6e, 0x00},
        {0x6f, 0x00},
        {0x70, 0x35},
        {0x71, 0x0f},
        {0x72, 0x5c},
        {0x73, 0x29},
        {0x74, 0x38},
        {0x75, 0x1e},
        {0x76, 0xb8},
        {0x77, 0x52},
        {0x78, 0x3b},
        {0x79, 0x2e},
        {0x7a, 0x14},
        {0x7b, 0x7b},
        {0x7c, 0x3e},
        {0x7d, 0x3d},
        {0x7e, 0x70},
        {0x7f, 0xa4},
    };
    
    void tas2110_ppc3_cfg(const struct i2c_dt_spec i2c_dt) {
        int i = 0;
        int ret;
    
        while (i < sizeof(registers_ch1) / sizeof(cfg_reg)) {
            switch (registers_ch1[i].command) {
            case CFG_META_DELAY:
                k_msleep(registers_ch1[i].param);
                break;
            default:
                ret = i2c_write_dt(&i2c_dt, (unsigned char *)&registers_ch1[i], 2);
                if (ret != 0) {
                    printk("Failed to write to I2C at reg. %x (error %d)\n", registers_ch1[i].command,
                           ret);
                    k_msleep(10);
                    continue; // retry
                }
                break;
            }
            i++;
            k_msleep(5);
        }
    }
    
  • Plotting the i2s data on the wire, I can see my wave form and what I believe to be outliers from the logic probe/wires. 
    Even with those deviations, I would expect to hear some parts of the sine wave with noise. 

  • Hi Michael,

    Sorry I overlooked this but it looks like this device can only support 2 time slots at 32 bits and 4 or 8 at 16, 24, or 32 bit. 

    I'm not sure your I2S input is supported, I will check this out on the EVM. 

    Regards,

    Sebastian

  • Thanks Sebastian. I thought I was only doing 2 time slots at 16 bit signed. Really I just want to use a single mono channel but I was not sure how to do that with this chip. I'm currently copying the same data to both channels in hopes one will work. 

  • wait so if I change to 32 bits we're probably good? I will try this immediately. thanks. 

  • So this is interesting. The nrf52 can only do 32 bit mode in I2S slave mode. 
    Maybe I can figure out 4 timeslots at 16 or 24 with this driver. 

    https://devzone.nordicsemi.com/f/nordic-q-a/15713/i2s-32-bit-word-size/59992

  • Has anyone ever used an nrf52840 to drive this?

    I try 32 bit words - 

    [00:00:00.252,410] <err> i2s_nrfx: Unsupported word size: 32
    [00:00:00.252,410] <err> tas2110: Failed to configure I2S stream

    I try 4 16 bit channels -

    [00:00:00.252,410] <err> i2s_nrfx: Unsupported number of channels: 4
    [00:00:00.252,410] <err> tas2110: Failed to configure I2S stream

  • Hi Michael,

    If you're able to change to 32 bits that should work. Make sure you have a proper SBLCK to FSYNC ratios from the previous snippet.

    I haven't personally used an NRF52840 before. 

    regards,

    Sebastian

  • That's the thing. This MCU can't do 32 bits ! 

    I posted about it on nordic's forum, quoting an older message with the same concern. 
    The support engineer verified 2 channels only, but missed the detail about the 32 bit frame limitation. 

    devzone.nordicsemi.com/.../i2s-capabilities-on-nrf52840