AnsweredAssumed Answered

SAIF1 as output

Question asked by Carlos Rivera on Feb 24, 2014
Latest reply on Apr 15, 2014 by Yixing Kong

Hello

 

I am using WinCE 6.3 on a custom board based on i.mx28EVK, and I need to reconfigure the audio ports in order to play a sound.

 

On i.mx28 EVK SAIF0 is configured as output while SAIF1 is configured as input; to have full duplex interface. I tried to use the same configuration as SAIF0 on SAIF1 and remove SAIF0 from the driver, but the program hangs when I try un a *.wav file.

 

    // Init SAIF0(AUDIOOUT)

    // Reset SAIF0

    HW_SAIF_CTRL_SET(0, BM_SAIF_CTRL_SFTRST);

    // Wait for some time

    HW_SAIF_CTRL_RD(0);

    // In order to configure SAIF0,  we must first clear the CLKGATE and SFTRST bit

    HW_SAIF_CTRL_CLR(0, BM_SAIF_CTRL_SFTRST);

    // Wait for some time

    HW_SAIF_CTRL_RD(0);

    // Clear the clock gate for normal operation

    HW_SAIF_CTRL_CLR(0, BM_SAIF_CTRL_CLKGATE);

    // Wait for some time

    HW_SAIF_CTRL_RD(0);

    // 16bit sample

    HW_SAIF_CTRL_WR(0, BF_SAIF_CTRL_SFTRST(0)                    |

                       BF_SAIF_CTRL_CLKGATE(0)                   |

                       BF_SAIF_CTRL_BITCLK_MULT_RATE(0)          |

                       BF_SAIF_CTRL_BITCLK_BASE_RATE(0)          |

                       BF_SAIF_CTRL_FIFO_ERROR_IRQ_EN(0)         |

                       BF_SAIF_CTRL_FIFO_SERVICE_IRQ_EN(0)       |

                       BF_SAIF_CTRL_DMAWAIT_COUNT(0)             |

                       BF_SAIF_CTRL_CHANNEL_NUM_SELECT(0)        |

                       BF_SAIF_CTRL_BIT_ORDER(0)                 |

                       BF_SAIF_CTRL_DELAY(1)                     |

                       BF_SAIF_CTRL_JUSTIFY(0)                   |

                       BF_SAIF_CTRL_LRCLK_POLARITY(0)            |

                       BF_SAIF_CTRL_BITCLK_EDGE(0)               |

                       BF_SAIF_CTRL_WORD_LENGTH(0)               |

                       BF_SAIF_CTRL_BITCLK_48XFS_ENABLE(0)       |

                       BF_SAIF_CTRL_SLAVE_MODE(0)                |

                       BF_SAIF_CTRL_READ_MODE(0)                 |

                       BF_SAIF_CTRL_RUN(1));

 

The configuration code I am trying to modify is located in bsphwctxt.cpp.

 

Is there ant other place where I should modify the code?.

 

I will appreciate any help.

 

Carlos

Outcomes