Skip to content

Commit d1493b6

Browse files
herculanodavihenrikbrixandersen
authored andcommitted
driver: i2s: fix nxp i2s fifo combine values
MCUX defined RX fifo combine names and the references need to be adjusted in the i2s driver. Signed-off-by: Davi Herculano <[email protected]>
1 parent f430d38 commit d1493b6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/i2s/i2s_mcux_sai.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,7 @@ static int i2s_mcux_config(const struct device *dev, enum i2s_dir dir,
614614

615615
config.fifo.fifoWatermark = (uint32_t)FSL_FEATURE_SAI_FIFO_COUNTn(base) - 1;
616616
#if defined(FSL_FEATURE_SAI_HAS_FIFO_COMBINE_MODE) && FSL_FEATURE_SAI_HAS_FIFO_COMBINE_MODE
617-
/*
618-
* TX FIFO combine on write. The value below has correct value and wrong name
619-
* because RX and TX definitions are different but MCUX uses the same for both.
620-
*/
621-
config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnRead;
617+
config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnWrite;
622618
#endif
623619
/* set bit clock divider */
624620
SAI_TxSetConfig(base, &config);
@@ -639,7 +635,7 @@ static int i2s_mcux_config(const struct device *dev, enum i2s_dir dir,
639635
/* For RX, DMA reads from FIFO whenever data present */
640636
config.fifo.fifoWatermark = 0;
641637
#if defined(FSL_FEATURE_SAI_HAS_FIFO_COMBINE_MODE) && FSL_FEATURE_SAI_HAS_FIFO_COMBINE_MODE
642-
config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnRead;
638+
config.fifo.fifoCombine = kSAI_RXFifoCombineModeEnabledOnRead;
643639
#endif
644640

645641
memcpy(&dev_data->rx.cfg, i2s_cfg, sizeof(struct i2s_config));

0 commit comments

Comments
 (0)