• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Linux » Linux forum » DM365 McBSP I2S Playback Problem
Share
Linux
  • Forum
Options
  • Subscribe via RSS
Resources
  • Keystone II MCSDK (A15 Linux) Download
  • Forums

    DM365 McBSP I2S Playback Problem

    This question is answered
    Appalayagari Sreedhar
    Posted by Appalayagari Sreedhar
    on Sep 16 2011 04:24 AM
    Intellectual885 points

    Hi,

    I am working with DM365 processor and we have interfaced one audio codec in i2s mode. I am operating DM365 as Master.

    I am working with 2.6.37 kernel.

    I have received the audio driver from the vendor and i have developed the required machine driver.

    when i test the code with aplay.

    i am seeing that the i2s starts and immediately calls shutdown.

    the AUDIO FORMAT i configured is

    #define AUDIO_FORMAT (SND_SOC_DAIFMT_I2S | \
                    SND_SOC_DAIFMT_CBS_CFS)

    Could anyone help me in finding what i am doing wrong.

    Please find the log below.

    root@dm365:~# aplay -v test.wav

    davinci_i2s_startup
    Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
     davinci_i2s_set_dai_fmt 

     davinci_i2s_hw_params
     
     davinci_i2s_prepare
     davinci_mcbsp_stop
     
     toggle_clock
     
    davinci_i2s_trigger
    davinci_mcbsp_start
    toggle_clock

    Plug PCM: Route conversion PCM (sformat=S16_LE)
      Transformation table:
        0 <- 0
        1 <- 0
    Its setup is:
      stream       : PLAYBACK
      access       : RW_INTERLEAVED
      format       : U8
      subformat    : STD
      channels     : 1
      rate         : 8000
      exact rate   : 8000 (8000/1)
      msbits       : 8
      buffer_size  : 16000
      period_size  : 1000
      period_time  : 125000
      tstamp_mode  : NONE
      period_step  : 1
      avail_min    : 1000
      period_event : 0
      start_threshold  : 16000
      stop_threshold   : 16000
      silence_threshold: 0
      silence_size : 0
      boundary     : 2097152000
    Slave: Hardware PCM card 0 'DaVinci DM365 Garuda' device 0 subdevice 0
    Its setup is:
      stream       : PLAYBACK
      access       : MMAP_INTERLEAVED
      format       : S16_LE
      subformat    : STD
      channels     : 2
      rate         : 8000
      exact rate   : 8000 (8000/1)
      msbits       : 16
      buffer_size  : 16000
      period_size  : 1000
      period_time  : 125000
      tstamp_mode  : NONE
      period_step  : 1
      avail_min    : 1000
      period_event : 0
      start_threshold  : 16000
      stop_threshold   : 16000
      silence_threshold: 0
      silence_size : 0
      boundary     : 2097152000
      appl_ptr     : 0
      hw_ptr       : 0

     davinci_i2s_trigger
     davinci_mcbsp_stop
     toggle_clock
     davinci_i2s_shutdown
     davinci_mcbsp_stop
     toggle_clock

     

    Thank you, Sreedhar.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Appalayagari Sreedhar
      Posted by Appalayagari Sreedhar
      on Sep 16 2011 10:26 AM
      Intellectual885 points

      Hi,

      I tried to configure theDM365 and AiC3x codec in I2S mode and configured the DM365 in master/slave mode.

      still i am not able to play the audio using aplay.

      Could anyone please help me where could be the problem, i am really stuck with this issue for sometime.

      Thank you, Sreedhar.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Appalayagari Sreedhar
      Posted by Appalayagari Sreedhar
      on Sep 16 2011 10:30 AM
      Intellectual885 points

      Hi,

      The above test i performed on DM365 Leopard Board. DM365 Communication board.

      Thank you, Sreedhar.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Appalayagari Sreedhar
      Posted by Appalayagari Sreedhar
      on Sep 19 2011 00:20 AM
      Intellectual885 points

      Hi,

      Any suggestion? I am stuck with this problem.

      I have not seen any reply. Please let me know if more information is required.

      Thank you, Sreedhar.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sudhakar Rajashekhara
      Posted by Sudhakar Rajashekhara
      on Sep 22 2011 03:49 AM
      Expert5130 points

      Sreedhar,

      You need to get your hands dirty with the driver code to understand why you are seeing such a behavior. I would suggest, put more prints in the driver and see why it is failing.

      Regards, Sudhakar

      Does this help with your question? If not, please send back more information. If it answers your question, please click the  Verify Answer  button below.

      PSP
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Appalayagari Sreedhar
      Posted by Appalayagari Sreedhar
      on Sep 23 2011 02:13 AM
      Intellectual885 points

      Hi Sudhakar,

      I have played the audio with Aic3x as master and DM365 as Slave in I2S mode. I changed the board and it starts working.

      But DM365 as Master and Aic3x as Slave in I2S is not working, probably i need to do some hardware changes for  this to work.

      Thank you, Sreedhar.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Appalayagari Sreedhar
      Posted by Appalayagari Sreedhar
      on Sep 23 2011 04:49 AM
      Intellectual885 points

      Hi Sudhakar,

      The captured waveform is not w.r.t to the I2S standard mode.

      data is observed without 1-bit delay from the L and R Phase Pulse. In the XCR register (XDATDLY) 1 bit delay is programmed.

      Could you please tell me whether by changing the AUDIO_FORMAT alone can help in davinci-evm.c.

      existing code:

      -- #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
                      SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF)

      changed code:

      ++ #define AUDIO_FORMAT (SND_SOC_DAIFMT_I2S | \
                      SND_SOC_DAIFMT_CBM_CFM )

      Thank you, Sreedhar.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Appalayagari Sreedhar
      Posted by Appalayagari Sreedhar
      on Oct 19 2011 06:39 AM
      Verified Answer
      Verified by Appalayagari Sreedhar
      Intellectual885 points

      Hi,

      I have programmed LJS I2S mode.

      it is working fine.

      Thank you.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use