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.

tlv320aic31xx audio device problem in android 4.2.2

Other Parts Discussed in Thread: TLV320AIC3100

Hi,4426.tinymix.txt

I have interfaced tlv320aic31xx device to beagleboneblack using I2C and McASP0. In linux audio device is working fine with out any noise. I have ported android TI_Android_JB_4.2.2_DevKit_4.1.1 on BBB. Iam trying to enable Audio speaker and speaker seems to be working but lot of noise is generating while playing with default player. I am attaching the tinymix configuration and i have no clue why noise is generating while playing any mp3 or wav files. Please help me out from this issue.

Thank you  5148.tinymix.txt

  • Hi Venkat,

    what do you mean by "ported TI_Android_JB_4.2.2_DevKit_4.1.1 on BBB"? This AOSP version should already support the beagleboneblack without modifying anything.
    In order to help you with this, could you also provide the linux configuration that you use and that gives clear audio? The output of amixer could be helpful for comparison.

  • Hi Venkat,

      I am also facing the same issue in AM335x custom board which is designed with reference from Am335x Stater kit, We are also using tlv320aic3100 Audio IC.

    It si working fine in linux but in android noise is being generated.

    Following are mixer commands in /etc/mixer-paths-xml

    <mixer>

    <!-- These are the initial mixer settings -->
    <ctl name="Speaker Jack Switch" value="1" />
    <ctl name="Headphone Jack Switch" value="0" />
    <ctl name="Left Output Mixer From DAC_L" value="1" />
    <ctl name="Right Output Mixer From DAC_R" value="1" />
    <ctl name="SP driver mute" value="1" />
    <ctl name="Class - D driver Volume(0 = 6 dB, 4 = 24 dB" value="3" />
    <ctl name="SP Analog Gain(0 = 0 dB, 127 = -78.3 dB)" value="117" />
    <ctl name="DAC Playback Volume" value="140" />

    Thanks,

    rajeev battu

     

     

  • Hi,

    I played a 64kbps mp3 file and no noticeable noise was observed through the headphones in MAX volume. Could you tell us the bitrate of the file and what codec was used?

  • Hi Adeneo Support Team,

    Following is the frequency at which audio is being played and i am routing it to speaker(8Ohm 1W)

    aic31xx_set_dai_pll: DAI ID 0 PLL_ID 0 InFreq 24000000 OutFreq 44100

     

    Please find log file for your referance

    Can you attach a a 64kbps mp3  audio file 

    4331.audio.log

    Regards,

    Rajeev

  • Hi Rajeev,

    The log you provided shows the sampling rate of the output audio stream, we would also need to know the frequency of the input file. is it 64kHz, 96kHz, 128kHz, ...? Is it an MP3? are you playing the file with a custom application, standard "Music" application from Android?
    Did you try with other files, was the result similar? If you could provide us with one file that has the problem, we might be able to understand what is happening.

    ​Regards
  • Dear Adeneo Embedded support team,

      I have tested with MP3 file, and it is played with custom "Music" application

    Find attachment t for audio file.

    .1373.HelixMobileProducer_test5_MPEG1_Mono_CBR_64kbps_44100Hz.mp3

          Thanks and regards,

    Rajeev


  • Thanks for the audio file.

    I tested it on my laptop and on the AM335x platform, the audio is similar: quality is not good, but no noise at all.
    Did you try to play the audio file in the official Music application rather than your custom one?  I think this should not change much, but it would be interesting for diagnostic.

  • Hi Adeneo Embedded support team,

         I am using default Music app which is provided with Android OS. I don't have any custom app for music.

     Thanks & Regards,

  • Hi Adeneo Embedded support team,

    I am using TLV320AIC3100 audio codec. Are you using the same codec.
    If you are using tlv320aic3100 codec can you please provide patch.

    Thanks & Regards,
  • Hi Adeneo Embedded support team,

    Audio problem is solved I mean noise has been now gone while playing audio.

    Changes done in davince-mcasp.c file as suggested by TI team.

            TI_Android_JB_4.2.2_DevKit_4.1.1/kernelsound/soc/davinci/davinci-mcasp.c

    Following are the changes done

    In function.

    static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,unsigned int fmt)

                   ….

                       ….

               default:

     /* comment below 4 lines */

    //#analogics1 commented for audio noise testing as suggested by TI
    #if 0
    /* configure a full-word SYNC pulse (LRCLK) */
    mcasp_set_bits(dev->base+DAVINCI_MCASP_TXFMCTL_REG, FSXDUR);
    mcasp_set_bits(dev->base+DAVINCI_MCASP_RXFMCTL_REG, FSRDUR);

    /* make 1st data bit occur one ACLK cycle after the frame sync */
    mcasp_set_bits(dev->base+DAVINCI_MCASP_TXFMT_REG, FSXDLY(1));
    mcasp_set_bits(dev->base+DAVINCI_MCASP_RXFMT_REG, FSRDLY(1));
    #endif
    //#analogics code added as suggested by TI
    mcasp_clr_bits(dev->base+DAVINCI_MCASP_TXFMCTL_REG, FSXDUR);
    mcasp_clr_bits(dev->base+DAVINCI_MCASP_RXFMCTL_REG, FSRDUR);

     break;

    Regards,