• 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 » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM3x DaVinci Video Processor Forum » Issue on AIC codec with IPNC V2.6
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

Issue on AIC codec with IPNC V2.6

This question is answered
bioz
Posted by bioz
on Oct 06 2011 22:31 PM
Expert1495 points

Hi,

I am working with DM368 IPNC. We are using V2.6 software. Previous, we support to use internal codec of SOC but now we move to use external codec AIC3x.

For that change we modified the kernel config as below

# CONFIG_SND_DM365_INTERNAL_CODEC=y

# CONFIG_SND_SOC_CQ0093VC=y

CONFIG_SND_DM365_EXTERNAL_CODEC=y

CONFIG_SND_SOC_TLV320AIC3101=y

 

With the new kernel, we can play audio for alarm function in IPNC but micro and audio stream didn't work. I saw the error message from log whenever we turn on audio.

ERROR  (drv_audio.c|DRV_audioRead|157): audio error from read : Resource temporarily unavailable

ERROR  (audioThr.c|AUDIO_audioTskMain|684): AUDIO_audioTskRun()

We knew that we got problem during read data from driver and the function DRV_audioRead always return -11.

does Any one have experience for this? PLease share me what you know.

 Thank you so much!

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • TaeHo Kim89108
    Posted by TaeHo Kim89108
    on Feb 17 2012 01:39 AM
    Verified Answer
    Verified by bioz
    Prodigy70 points

    Please change the macro 'NUM_CHANNELS' as shown below,

    File: audioThr.c

    #define NUM_CHANNELS (1)     ->    #define NUM_CHANNELS (2)

    Good luck~!

    dm36x AIC310x External Codec
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • bioz
    Posted by bioz
    on Apr 03 2012 21:16 PM
    Expert1495 points

    hi,

    I really thanks for your sharing. Do you have some experiences to the AIC audio gain? By this modification, the audio worked but the audio volumn adjustment may not affect.

    Thank you so much!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TaeHo Kim89108
    Posted by TaeHo Kim89108
    on Apr 03 2012 21:51 PM
    Prodigy70 points

    You can change the audio volumn of left and right channel as below.

    <audio in>

    amixer -c 0 sset 'Left MIC to Left Input',0 100%

    amixer -c 0 sset 'Right MIC to Right Input',0 100%

     

    <audio out>

    amixer set 'PCM' 100%

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • bioz
    Posted by bioz
    on Apr 04 2012 07:17 AM
    Verified Answer
    Verified by bioz
    Expert1495 points

    hi,

    Firstly, I wanna show my big thanks for your help. I tried the amixer and figure out your command didn't work in my case with audio out.

    But instead of that the command:  

    amixer -c 0 sset 'Line DAC',0 X% 

    worked correctly.

    Thanks again for your hint. From your name, I guess you are korean. If you are now staying in Seoul I will be very happy to invite you a coffee.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Peng Zeng1
    Posted by Peng Zeng1
    on Jul 17 2012 01:41 AM
    Prodigy70 points

    hi TaeHo Kim89108, I met the same problem with bioz ,Under your proposal,I changed NUM_CHANNELS to 2, audio data can be reiveived, but there is a new problem. When I delete audio task,there is an error below: Alignment trap: av_server.out (568) PC=0x401aba28 Instr=0xe591300c Address=0xfec 77b47 FSR 0x001 and once the error occored, I cann't begin audio task again. Is there someting else to be changed except NUM_CHANNELS ? In this program, i opend a capture and playback audio device, is that playback device caused this problem? NUM_CHANNELS of playback device should be set to 1 or 2?

    DM368 aic32
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TaeHo Kim89108
    Posted by TaeHo Kim89108
    on Jul 18 2012 03:26 AM
    Prodigy70 points

    hi, Pen Zeng1

    Did you delete the audio task except the video task?

    I think the problem is memory reference error...but I don't know why right now.

    I will reply to you if I find a solution.

    Good luck..!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • TaeHo Kim89108
    Posted by TaeHo Kim89108
    on Jul 18 2012 03:34 AM
    Prodigy70 points

    You're welcome.. late reply..

    I'm a Korean. But I live in Daejeon :D

    Thank you for your kindness.

    Good luck~!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • bioz
    Posted by bioz
    on Jul 18 2012 04:14 AM
    Expert1495 points

    I have just gone to Boryeng Mud festival last weekend :).

    Glad to know you and hope to see you one day.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Peng Zeng1
    Posted by Peng Zeng1
    on Jul 19 2012 02:32 AM
    Prodigy70 points

    Hi,TaeHo Kim89108

    When I run 

    OSA_tskSendMsg(&gAUDIO_ctrl.audioTsk, pTsk1, AVSERVER_CMD_CREATE, NULL, OSA_MBX_WAIT_ACK); nad 

    OSA_tskSendMsg(&gAUDIO_ctrl.audioTsk, pTsk1, AVSERVER_CMD_START, NULL, OSA_MBX_WAIT_ACK);

    to create and start audio task, the capture device is running, but when i DELETE the audio tast,that is

    OSA_tskSendMsg(&gAUDIO_ctrl.audioTsk, pTsk1, AVSERVER_CMD_DELETE, NULL,OSA_MBX_WAIT_ACK);

    an error occored as below:

    AUDIO: Received CMD = 0x0301

    AUDIO: Delete...
    AUDIO_audioTskDelete
    *** glibc detected *** ./av_server.out: free(): invalid next size (normal): 0x00380d28 ***

    And I print the  gAUDIO_ctrl.inputBuffer pointer which is created by AUDIO_audioTskCreate() the pointer value is just 0x00380d28.

    The video task is allways running when start up and not closed.

    int AUDIO_audioTskCreate()
    {
    int ret = OSA_EFAIL;
    DRV_AudioConfig Audioconfig;

    Audioconfig.deviceId = 0;
    Audioconfig.numChannels = NUM_CHANNELS;
    Audioconfig.samplingRate = SAMPLE_RATE;
    Audioconfig.buff_Of_Samples = NUMSAMPLES;

    ret = DRV_audioOpen(&gAUDIO_ctrl.audioHndl, &Audioconfig);
    if( ret != OSA_SOK )
    {
    return ret;
    }

    gAUDIO_ctrl.streamId = ALG_AUD_CODEC_G711;
    gAUDIO_ctrl.encodedBuffer = (short *)OSA_cmemAlloc(ENCODEDBUFSIZE,32);
    if (gAUDIO_ctrl.encodedBuffer == NULL)
    {
    OSA_ERROR("Failed to allocate encodedBuffer\n");
    return OSA_EFAIL;

    }

    /* Allocate input buffer */
    gAUDIO_ctrl.inputBuffer = OSA_memAlloc(INPUTBUFSIZE);
    if (gAUDIO_ctrl.inputBuffer == NULL)
    {
    OSA_ERROR("Failed to allocate input buffer\n");
    return OSA_EFAIL;
    }
    return OSA_SOK;
    }

    int AUDIO_audioTskDelete()
    {
    DRV_audioClose(&gAUDIO_ctrl.audioHndl);
    if( gAUDIO_ctrl.inputBuffer )
    {
    OSA_memFree(gAUDIO_ctrl.inputBuffer);
    }


    if( gAUDIO_ctrl.encodedBuffer )
    {
    OSA_cmemFree((Uint8 *)gAUDIO_ctrl.encodedBuffer);
    }

    return OSA_SOK;
    }

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James lin
    Posted by James lin
    on Oct 17 2012 01:15 AM
    Prodigy45 points

    hi, I am working with DM368 IPNC. We are using V2.6 software,to. For your change we modified ehe kernel config as yours,and change NUM_CHANNELS from 1 to 2,but the record is wrong . My MCLK is from CLKOUT1,24MHZ,MIC in use MIC2. Can you tell me where am I wrong???

    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