You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/10/28 18:22:20 UTC

[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2405: hw/drivers/i2s: Add I2S driver for DA1469x family

apache-mynewt-bot commented on pull request #2405:
URL: https://github.com/apache/mynewt-core/pull/2405#issuecomment-718122360


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/drivers/i2s/i2s_da1469x/src/i2s_da1469x.c
   <details>
   
   ```diff
   @@ -107,7 +107,8 @@
        uint16_t fdiv;
    };
    
   -static void copy_and_swap_channels_16(const int16_t *lr, int16_t *rl, uint32_t count)
   +static void
   +copy_and_swap_channels_16(const int16_t *lr, int16_t *rl, uint32_t count)
    {
    
        const int16_t *limit = lr + count;
   @@ -344,7 +345,7 @@
                                      (da1469x_dma_interrupt_cb)da1469x_i2s_dma_tx_isr, NULL);
                da1469x_i2s.dma_regs[1]->DMA_A_START_REG = (uint32_t)dma_mem->buffer;
                da1469x_i2s.dma_regs[1]->DMA_B_START_REG = (uint32_t)&APU->PCM1_OUT1_REG +
   -                ((data_format == I2S_DATA_FRAME_16_32) ? 2 : 0);
   +                                                       ((data_format == I2S_DATA_FRAME_16_32) ? 2 : 0);
                da1469x_i2s.dma_regs[1]->DMA_CTRL_REG |= DMA_DMA0_CTRL_REG_CIRCULAR_Msk;
            }
            if (data_format != I2S_DATA_FRAME_16_16) {
   @@ -359,15 +360,15 @@
                                      (da1469x_dma_interrupt_cb)da1469x_i2s_dma_tx_isr, NULL);
                da1469x_i2s.dma_regs[3]->DMA_A_START_REG = (uint32_t)dma_mem->buffer + da1469x_i2s.cfg.dma_memory->size;
                da1469x_i2s.dma_regs[3]->DMA_B_START_REG = (uint32_t)&APU->PCM1_OUT2_REG +
   -                ((data_format == I2S_DATA_FRAME_16_32) ? 2 : 0);
   +                                                       ((data_format == I2S_DATA_FRAME_16_32) ? 2 : 0);
                da1469x_i2s.dma_regs[3]->DMA_CTRL_REG |= DMA_DMA0_CTRL_REG_CIRCULAR_Msk;
            }
            bits_per_frame = data_format == I2S_DATA_FRAME_16_16 ? 32 : 64;
            bit_rate = i2s->sample_rate * bits_per_frame;
            da1469x_i2s_compute_pcm_div(system_clock, bit_rate, &div);
            CRG_PER->PCM_DIV_REG = (1 << CRG_PER_PCM_DIV_REG_PCM_SRC_SEL_Pos) |
   -            (1 << CRG_PER_PCM_DIV_REG_CLK_PCM_EN_Pos) |
   -            (div.div << CRG_PER_PCM_DIV_REG_PCM_DIV_Pos);
   +                               (1 << CRG_PER_PCM_DIV_REG_CLK_PCM_EN_Pos) |
   +                               (div.div << CRG_PER_PCM_DIV_REG_PCM_DIV_Pos);
            CRG_PER->PCM_FDIV_REG = div.fdiv;
    
            APU->PCM1_CTRL_REG = ((bits_per_frame - 1) << APU_PCM1_CTRL_REG_PCM_FSC_DIV_Pos) |
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org