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.

Error occurs audio file play in application with AM335x supported board

Problem is that when I trying to play an audio file vi application on my AM335x based board board, file play when I am using

aplay -l

on command prompt. While in the application

snd_pcm_open(&(hAudPlayHandle), "default", SND_PCM_STREAM_PLAYBACK, 0))

giving error. I put the checks with this API  it shows  error and can't play the file. While I don't put the checks with this API it shows error,  further it plays the sound file also.

Error is that it can't open the device to play file.

Thanks in advance.. Please guide me.

  • Hi Suneet,

    I guess that the device is busy by some other process but could you attach 'dmesg' kernel log for better investigation of the issue.

    BR
    Tsvetolin Shulev
  • But when I try to play sound file as

    aplay sound.wav

    on terminal it plays well. After just play it also gives an error as

    tlv320aic31xx-codec 0-0018: aic31xx_wait_bits: Failed! 0x25 was 0x88 expected 0x0 (0, 0x80, 500000 us)
    tlv320aic31xx-codec 0-0018: ASoC: POST_PMD: DAC Left event failed: -1
    

    There is problem with device parameter in snd_pcm_open() API, which giving problem to initialize the sound device.

    Please guide me.