This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to playback an audio wav file with OMAP3530 and WinCe BSP 6.14.0?

Other Parts Discussed in Thread: TPS65930, OMAP3530, TPS65950

Hi,

My custom board has a OMAP3530 and a companion chip TPS65930.  McBSP2 pins of the OMAP are connected to I2S of TPS65930.

I use WinCE and BSP 6.14.00 and get the system to display the desktop screen.  I have a wav file and I would like to play it in order to check out the I2S connection between the two chips.  Would anyone please show me how to do it?

In my release directory, there is a dll file named EVM3530_wave.dll but no wave.dll so I modified the platform registry from wave.dll to EVM3530_wave.dll.  Is that the right thing to do?

Thank you for any advice that you can give me.

Luan

  • Hi Luan Le,

    To answer the first question in your post, you could either use ceplayer.exe (media player) which should be part of the image or use the wavplay.exe application from the release directory of your OS design. If ceplayer is not part of the design, you may include it from the catalog and rebuild the solution. From desktop->StartMenu->Programs->Media Player. You can place the wave file in any storage media.

    Regards, Aparna

  • Hi Aparna,

    Thank you for your quick response.  I will try your suggestion soon to prove that my hardware is working.

    Because playing a short wave file is part of my application, I was thinking about using an existing driver in the WinCE BSP, getting a handle, and then sending data to the codec directly using DeviceIOCTL, similar to the way that data is sent to the SPI or I2C.  In this way, my application has total control when and how much to play.

    In summary, is there a way to use a wave driver in the BSP directly to play back wave data?

    Thanks,

    Luan

  • Hi Luan,

    From your application, you can directly call the Windows Waveform API (http://msdn.microsoft.com/en-us/library/ee487531.aspx) in order to play sounds.

    It is an IOCTL based API that will call the audio driver for you and perform sound related operations. If you have Platform Builder 6.0 installed, you can find some sample code used by the "wavplay" application under :

    \WINCE600/PUBLIC/COMMON/SDK/SAMPLES/AUDIO/

     

     

     

     

     

     

  • All,

    If a WAV file needs to be played back, WinCE provides an Application level API named PlaySound() which can be used to play Audio .WAV files directly with one system call or a specific Sound Event.

    The PlaySound() takes 3 parameters. One possible usage is shown below:

    PlaySound (TEXT("\\SOUNDS\\BELLS.WAV"), NULL, SND_FILE | SND_SYNC);
    The above expects a root folder named SOUNDS to be created and containing the BELLS.wav inside it. 
    
    
    Regards,
    Ravi
  • Hi Ravi,

    I did try out your suggestion but I did not see any audio signal come out on the speaker line of the TPS65930.  Would you please give me suggestions on how to debug this problem?

    Thanks,

    Luan

  • Luan,

    What is your workspace setup? What environment variables have you enabled in the ti_evm_3530.bat prior to the build?

    Also, you need to select the Waveform Audio from the Catalog.

    I have not yet tested on the 6.14 version of the BSP, but the same call works on a different BSP with a similar Audio Driver.

    Regards,

    ravi

  • Hi Ravi,

    I cloned the TI_EVM_3530 BSP and kept all environment variables the same.  I created an OS design from this BSP with the Waveform Audio from the Catalog selected.  I am able to get sound when calling PlaySound() API with this OS running on the EVM but not on our custom board.  Our board is designed after the EVM except that we use TPS65930 instead of TPS65950.  According to our hardware guy, these two chips are compatible as far as audio is concerned.

     Your suggestions will be very appreciated.

    Luan

  • Hello,

    I just learned that the audio output on the EVM3530 always comes out to at the headset output.  Can anyone give me a tip on how to route the audio to the speaker (PreDriv output) from the application?

    Thanks,

    Luan

  • Luan,

    The Audio Codec HwCodec Module should implement a function named SetHwCodecMode_Speaker() which enables the Audio Routing to the Speaker.

    This is present in the earlier TWL4030 Driver source available with the 6.13 or 6.14 version of the BSP.

    From the OMAP3430_HwAudioBridge::start_AudioPort() function, you can call the SetAudioPath(m_CurrentAudioRoute, m_dwAudioProfile) which in turn calls the SetHwCodecMode_Speaker().

    You need to ensure that the correct set of parameters are passed to the SetAudioPath. Please refer to the omap3430_HwBridge.h for more information.

    Regarding your other question on the difference among the two TPS parts, it is a good idea to ask this in the TPS PMIC forum.

    Regards,

    Ravi