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 offer the TLV320AIC31's clock with the ACLKX of McASP?

Hello all:

        Now I want to use the DEVOSC(not use the AUXOSC) to offer the clock to the audio device(TLV320AIC3,and I want to use the ACLKX of  McASP as the clock of  TLV320AIC3,which steps should I need?

     As I konw:

1.

static const struct clksel osc_audio_dpll_mux_sel[] = {
{ .parent = &osc0_clkin_ck, .rates = div_1_0_rates },
{ .parent = &osc1_clkin_ck, .rates = div_1_1_rates },
{ .parent = NULL}
};

/* Clock input select for audio PRCM */
static struct clk audio_dpll_clkin_ck = {
.name = "audio_dpll_clkin_ck",
.init = &omap2_init_clksel_parent,
.ops = &clkops_null,
.clksel = osc_audio_dpll_mux_sel,
.clksel_reg = TI814X_PLL_CMGC_OSC_SRC,
.clksel_mask = TI814X_OSC_AUDIO_PLL_CLKS_MASK,
.recalc = &omap2_clksel_recalc,
};

the above:

#define TI814X_OSC_AUDIO_PLL_CLKS_MASK (1 << 24)

So,Set the OSC_SRC register the 24bits(AUDIO_PLL_SOURACE) to 0 will not use the AUXSOC .

But how to  use the ACLKX of  McASP as the clock of  TLV320AIC3' clock?Thanks.

               zhichao.

  • Zhichao,

    zhichao tan60372 said:
    But how to  use the ACLKX of  McASP as the clock of  TLV320AIC3' clock?

    Refer to the DM814x TRM, chapter 16 McASP, section 16.2.2 Clock and Frame Sync Generators

    BR,
    Pavel


  • Hello Pavel:

          Thanks for your reply,Now I will not use interal clock.

    On my DM8148 board,the tlv320aic3x device is attached I2c4(I2c1~I2c4) not I2c1 as the EVM,and the tlv320aic3x MCLK use 24M External Crystal Oscillator not 24.576M as EVM board.So How should I change the audio driver according to my board?

    I changes the followings:

    1.sound/soc/davinci/davinci-evm.c

    static struct snd_soc_dai_link ti81xx_evm_dai[]={

    .codec_name="tlv320aic3x-codec.4-0018",//If I2c1 then use tlv320aic3x-codec.1-0018 (I2c1~I2c4)

    }

    2、arch/arm/mach-omap2/board-ti8148-evm.c

    static struct i2c_board_info __initdata ti814x_i2c_boardinfo3[] = {
            {
                    I2C_BOARD_INFO("tlv320aic3x", 0x18),
            },
    };
    and:

    omap_register_i2c_bus(4, 100, ti814x_i2c_boardinfo3, ARRAY_SIZE(ti814x_i2c_boardinfo3));.

    3、

    Modify arch/arm/mach-omap2/i2c.c to add correct mux entries.config the I2c3 pins,and enable pull up.

    this is all ok.

    After the above ,execute :

    amixer cset name='PCM Playback Volume' 100%,100%    
    test OK.
     
    But when execute:
     gst-launch -v alsasrc ! alsasink
    the sound is have much noise,and can not hear clealy ,almost all noise,
      ISo,I  use 24M clock as MCLK not 24.576,any other changes should I do?
    Thanks.
                                               zhichao.
  • Zhichao,

    zhichao tan60372 said:
    So How should I change the audio driver according to my board?

    Are you using McASP2 in your custom board, or other McASP instance for TLV320AIC3x?

    Refer to the below links:

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#I2C_Driver

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#Audio_driver_.28McASP.29

    http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_Audio_Driver_User_Guide

    Best regards,
    Pavel

  • Zhichao,

    Refer also to the below E2E threads, which might be in help:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/131219.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/197142/704653.aspx

    Best regards,
    Pavel

  • Hello Pavel:

              Thanks for you reply ,I am using  McASP2,I will refer to the links you offer,Thanks.