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.

change the codec.....



HI, I am working on pandaboard(omap4460) and I want to change the codec.....  I want the signal out from the mcbsp2 instead of mcpdm....

 

I modify the sdp4430.c

 

 {
  .name = "wm8978-lp",
  .stream_name = "Multimedia",
  /* ABE components - MM-DL (mmap) */
  .cpu_dai_name = "MultiMedia1 LP",
  .platform_name = "aess",
  .dynamic = 1, /* BE is dynamic */
  .dsp_link = &fe_lp_media,
 },

 

/*
 * Backend DAIs - i.e. dynamically matched interfaces, invisible to userspace.
 * Matched to above interfaces at runtime, based upon use case.
 */


 {
  .name = OMAP_ABE_BE_MM_EXT0_DL,
  .stream_name = "PCM Playback",
  /* ABE components - MCBSP2 - MM-EXT */
  .cpu_dai_name = "omap-mcbsp-dai.1",
  .platform_name = "aess",
  /* FM */
  .codec_dai_name = "wm8978-hifi",
  .codec_name = "wm8978.1-001a",
  .no_pcm = 1, /* don't create ALSA pcm for this */
  .be_hw_params_fixup = mcbsp_be_hw_params_fixup,
  .ops = &carsmart_abe_ops,
  .be_id = OMAP_ABE_DAI_MM_FM,
 },

 

and I make it out to the MM_EXT_DL......    but howerver there is no signal out from the mcbsp2 ...

 

 

here is the log

 

 

here is the log:

 


/ # [   63.268371] dapm_get_playback_paths Playback: checking paths from MM_DL_LP
[   63.276184]  * 1: MM_DL_LP -> (null) -> MM_DL VMixer
[   63.281616]    2: MM_DL VMixer -> Media Playback -> Voice Capture Mixer
[   63.289642]    2: MM_DL VMixer -> Multimedia -> DL2 Mixer
[   63.295471]  * 2: MM_DL VMixer -> Multimedia -> DL1 Mixer
[   63.301910]  * 3: DL1 Mixer -> Playback -> Sidetone Mixer
[   63.307830]    4: Sidetone Mixer -> Switch -> DL1 PDM
[   63.313415]  * 4: Sidetone Mixer -> Switch -> DL1 MM_EXT
[   63.319213]  * 5: DL1 MM_EXT -> (null) -> MM_EXT_DL
[   63.324615]    4: Sidetone Mixer -> Switch -> DL1 BT_VX
[   63.330230]  * 1: MM_DL_LP -> (null) -> MM_DL VMixer
[   63.335571]  * 1: MM_DL_LP -> (null) -> MM_DL VMixer
[   63.340942]  * 1: MM_DL_LP -> (null) -> MM_DL VMixer
[   63.346343] soc_dsp_fe_dai_startup dsp: open FE wm8978-lp
[   63.352142] soc_dsp_be_dai_startup dsp: open BE FM-EXT-DL
[   63.361846] soc_dsp_fe_dai_startup end
[   63.376220] w name BE_OUT w power 0 power 1
[   63.380859] dapm_power_widgets up_list w name BE_OUT
[   63.386474] w name MM_DL VMixer w power 0 power 1
[   63.391662] dapm_power_widgets up_list w name MM_DL VMixer
[   63.397705] w name DL1 MM_EXT w power 0 power 1
[   63.402679] dapm_power_widgets up_list w name DL1 MM_EXT
[   63.408599] w name Sidetone Mixer w power 0 power 1
[   63.413970] dapm_power_widgets up_list w name Sidetone Mixer
[   63.420318] w name DL1 Mixer w power 0 power 1
[   63.425170] dapm_power_widgets up_list w name DL1 Mixer
[   63.431091] w name MM_EXT_DL w power 0 power 1
[   63.436035] dapm_power_widgets up_list w name MM_EXT_DL
[   63.441894] w name PDM_VIB w power 0 power 1
[   63.446624] dapm_power_widgets up_list w name PDM_VIB
[   63.452331] w name VIB_DL w power 0 power 1
[   63.456939] dapm_power_widgets up_list w name VIB_DL
[   63.462402] w name MM_DL_LP w power 0 power 1
[   63.467254] dapm_power_widgets up_list w name MM_DL_LP
[   63.472869] w name MM_DL w power 0 power 1
[   63.477508] dapm_power_widgets up_list w name MM_DL
[   63.483734] pop test : Queue BE_OUT: reg=0xffffffff, 0x1/0x1
[   63.489959] pop test : Queue MM_DL: reg=0x27, 0x1/0x1
[   63.495483] pop test : Queue MM_DL_LP: reg=0x27, 0x1/0x1
[   63.501953] pop test : Applying 0x1/0x1 to 27 in 0ms
[   63.507354] pop test : Queue VIB_DL: reg=0x28, 0x4/0x4
[   63.512939] pop test : Applying 0x4/0x4 to 28 in 0ms
[   63.519256] pop test : Queue PDM_VIB: reg=0x2e, 0x4/0x4
[   63.524993] pop test : Applying 0x4/0x4 to 2e in 0ms
[   63.530456] pop test : Queue MM_EXT_DL: reg=0x32, 0x1/0x1
[   63.536285] pop test : Applying 0x1/0x1 to 32 in 0ms
[   63.541809] pop test : Queue MM_DL VMixer: reg=0xffffffff, 0x1/0x1
[   63.548553] pop test : Queue DL1 Mixer: reg=0x42, 0x1/0x1
[   63.554443] pop test : Applying 0x1/0x1 to 42 in 0ms
[   63.559906] pop test : Queue Sidetone Mixer: reg=0x47, 0x1/0x1
[   63.566192] pop test : Applying 0x1/0x1 to 47 in 0ms
[   63.571533] pop test : Queue DL1 MM_EXT: reg=0x4a, 0x2/0x2
[   63.577423] pop test : Applying 0x2/0x2 to 4a in 0ms
[   63.584167] w name SPK w power 0 power 1
[   63.588562] dapm_power_widgets up_list w name SPK
[   63.593902] w name HP w power 0 power 1
[   63.598541] dapm_power_widgets up_list w name HP
[   63.603607] w name RSPK w power 0 power 1
[   63.608062] dapm_power_widgets up_list w name RSPK
[   63.613342] w name LSPK w power 0 power 1
[   63.617889] dapm_power_widgets up_list w name LSPK
[   63.623229] w name RHP w power 0 power 1
[   63.627563] dapm_power_widgets up_list w name RHP
[   63.632965] w name LHP w power 0 power 1
[   63.637329] dapm_power_widgets up_list w name LHP
[   63.642608] w name Right Speaker Out w power 0 power 1
[   63.648254] dapm_power_widgets up_list w name Right Speaker Out
[   63.654846] w name Left Speaker Out w power 0 power 1
[   63.660400] dapm_power_widgets up_list w name Left Speaker Out
[   63.666839] w name Right Headphone Out w power 0 power 1
[   63.672698] dapm_power_widgets up_list w name Right Headphone Out
[   63.679321] w name Left Headphone Out w power 0 power 1
[   63.684997] dapm_power_widgets up_list w name Left Headphone Out
[   63.691589] w name Right Output Mixer w power 0 power 1
[   63.697326] dapm_power_widgets up_list w name Right Output Mixer
[   63.704040] w name Left Output Mixer w power 0 power 1
[   63.709869] dapm_power_widgets up_list w name Left Output Mixer
[   63.716430] w name Right DAC w power 0 power 1
[   63.721343] dapm_power_widgets up_list w name Right DAC
[   63.727142] w name Left DAC w power 0 power 1
[   63.731933] dapm_power_widgets up_list w name Left DAC
[   63.738372] pop test : Queue LHP: reg=0xffffffff, 0x1/0x1
[   63.744171] pop test : Queue RHP: reg=0xffffffff, 0x1/0x1
[   63.749969] pop test : Queue LSPK: reg=0xffffffff, 0x1/0x1
[   63.756958] pop test : Queue RSPK: reg=0xffffffff, 0x1/0x1
[   63.762969] pop test : Queue Left DAC: reg=0x3, 0x1/0x1
[   63.768737] pop test : Queue Right DAC: reg=0x3, 0x3/0x3
[   63.774414] pop test : Applying 0x3/0x3 to 3 in 0ms
[   63.780822] pop test : Queue Left Output Mixer: reg=0x3, 0x4/0x4
[   63.787353] pop test : Queue Right Output Mixer: reg=0x3, 0xc/0xc
[   63.794036] pop test : Applying 0xc/0xc to 3 in 0ms
[   63.799468] pop test : Queue Left Headphone Out: reg=0x2, 0x80/0x80
[   63.806213] pop test : Queue Right Headphone Out: reg=0x2, 0x180/0x180
[   63.813201] pop test : Applying 0x180/0x180 to 2 in 0ms
[   63.819030] pop test : Queue Left Speaker Out: reg=0x3, 0x40/0x40
[   63.825683] pop test : Queue Right Speaker Out: reg=0x3, 0x60/0x60
[   63.832489] pop test : Applying 0x60/0x60 to 3 in 0ms
[   63.838348] pop test : Queue HP: reg=0xffffffff, 0x1/0x1
[   63.844207] pop test : Queue SPK: reg=0xffffffff, 0x1/0x1
[   63.851348] enable_be_port MM_EXT connection to McBSP 2 ports

 

 

  • Hi Sunny,

    Can you tell me what release are you using to verify the changes you are doing are correct?. Thank you

  • Thank you.....

    I just changed the abe..... and the codecs will be later...

    the route of the abe i want to get is that:

    MultiMedia1 LP Playback -> MM_DL_LP -> MM_DL VMixer -> DL1 Mixer Multimedia -> Sidetone Mixer Playback -> DL1 MM_EXT Switch -> MM_EXT_DL

    --------------------------------------------------------------------

    SND_SOC_DAPM_AIF_OUT("MM_EXT_DL", "PCM Playback", 0,
      W_AIF_MM_EXT_DL, ABE_OPP_25, 0),

    -------------------------------------------------------------------

    MM_EXT_DL will be out to PCM Playback right?

    --------------------------------------------------------------------

      .name = OMAP_ABE_BE_MM_EXT0_DL,
      .stream_name = "PCM Playback",
      /* ABE components - MCBSP2 - MM-EXT */
      .cpu_dai_name = "omap-mcbsp-dai.1",
      .platform_name = "aess",
      /* FM */
      .codec_dai_name = "wm8978-hifi",
      .codec_name = "wm8978.1-001a",
      .no_pcm = 1, /* don't create ALSA pcm for this */
      .be_hw_params_fixup = mcbsp_be_hw_params_fixup,
      .ops = &carsmart_abe_ops,
      .be_id = OMAP_ABE_DAI_MM_FM,

     

     case OMAP_ABE_DAI_MM_FM:
      if (stream == SNDRV_PCM_STREAM_PLAYBACK) {

       /* port can only be configured if it's not running */
       if (omap_abe_port_is_enabled(abe_priv->abe,
         abe_priv->port[OMAP_ABE_BE_PORT_MM_EXT_DL]))
        return;

       printk("%s MM_EXT connection to McBSP 2 ports \n",__FUNCTION__);
       
       /* MM_EXT connection to McBSP 2 ports */
       format.f = 48000;
       format.samp_format = STEREO_RSHIFTED_16;
       abe_connect_serial_port(MM_EXT_OUT_PORT, &format, MCBSP2_TX);
       omap_abe_port_enable(abe_priv->abe,
        abe_priv->port[OMAP_ABE_BE_PORT_MM_EXT_DL]);

    _______________________________________________________

    and then it wil be out to mcbsp2(48k or 44.1k) right?

    and the log show that

    [   63.276184]  * 1: MM_DL_LP -> (null) -> MM_DL VMixer
    [   63.281616]    2: MM_DL VMixer -> Media Playback -> Voice Capture Mixer
    [   63.289642]    2: MM_DL VMixer -> Multimedia -> DL2 Mixer
    [   63.295471]  * 2: MM_DL VMixer -> Multimedia -> DL1 Mixer
    [   63.301910]  * 3: DL1 Mixer -> Playback -> Sidetone Mixer
    [   63.307830]    4: Sidetone Mixer -> Switch -> DL1 PDM
    [   63.313415]  * 4: Sidetone Mixer -> Switch -> DL1 MM_EXT
    [   63.319213]  * 5: DL1 MM_EXT -> (null) -> MM_EXT_DL

    [   63.483734] pop test : Queue BE_OUT: reg=0xffffffff, 0x1/0x1
    [   63.489959] pop test : Queue MM_DL: reg=0x27, 0x1/0x1
    [   63.495483] pop test : Queue MM_DL_LP: reg=0x27, 0x1/0x1
    [   63.501953] pop test : Applying 0x1/0x1 to 27 in 0ms
    [   63.507354] pop test : Queue VIB_DL: reg=0x28, 0x4/0x4
    [   63.512939] pop test : Applying 0x4/0x4 to 28 in 0ms
    [   63.519256] pop test : Queue PDM_VIB: reg=0x2e, 0x4/0x4
    [   63.524993] pop test : Applying 0x4/0x4 to 2e in 0ms
    [   63.530456] pop test : Queue MM_EXT_DL: reg=0x32, 0x1/0x1
    [   63.536285] pop test : Applying 0x1/0x1 to 32 in 0ms
    [   63.541809] pop test : Queue MM_DL VMixer: reg=0xffffffff, 0x1/0x1
    [   63.548553] pop test : Queue DL1 Mixer: reg=0x42, 0x1/0x1
    [   63.554443] pop test : Applying 0x1/0x1 to 42 in 0ms
    [   63.559906] pop test : Queue Sidetone Mixer: reg=0x47, 0x1/0x1
    [   63.566192] pop test : Applying 0x1/0x1 to 47 in 0ms
    [   63.571533] pop test : Queue DL1 MM_EXT: reg=0x4a, 0x2/0x2
    [   63.577423] pop test : Applying 0x2/0x2 to 4a in 0ms

    is that right?

    thank you.....

  • Hi Sunny,

    I thunk I understand what you are trying to do, but I think it is not necessary to add too many changes since there is a Back end configuration named "FM" ready to use McBSP2. All you would need to do is to change the codec for yours and change the McBSP configuration in case you want another. Have you try to do that?