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.

omap4460 interfacing with wm8280 using mcbsp1

Hi all,

      i am working on interfacing omap4460 with wm8280 codec. in this i am using mcbsp1 for connecting with codec. in the driver i have edited in sound/soc/omap/omap-abe.c as following

/* BT_DL connection to McBSP 1 ports */
format.f = 8000;
format.samp_format = STEREO_RSHIFTED_16;
abe_connect_serial_port(BT_VX_DL_PORT, &format, MCBSP1_TX);
omap_abe_port_enable(abe_priv->abe,
abe_priv->port[OMAP_ABE_BE_PORT_BT_VX_DL]);

format.f = 8000;
format.samp_format = STEREO_RSHIFTED_16;
abe_connect_serial_port(BT_VX_UL_PORT, &format, MCBSP1_RX);
omap_abe_port_enable(abe_priv->abe,
abe_priv->port[OMAP_ABE_BE_PORT_BT_VX_UL]);

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

configured dai format as:

(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);

(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);

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

WM8280 -> master

omap4460-> slave

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

in WM8280 i have configured as

1.mode as i2s

2.frames size as 64

3. 32 bclks per slots

4.16 valid bits per slot

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

note: i am using andriod 4.4.2. i have not changed anything in audio_hw.c

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

by above configurations i get audio as only one channel(left) and in right channel i get only noise for both playback and capture. 

is there any other files to change in order get stereo in mcbsp1?...

please tell me some pointers where i can find solution for my problem.?.

thankyou,

  • Hi Naveen,

    Can you chweck if you have the following line in function:
    static int mcbsp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
    channels->min = 2;

    There must be other changes included so please post the body of the function as well.
    Regards,
    Boyko
  • thanks for the reply,

    static int mcbsp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
    struct snd_pcm_hw_params *params)
    {
    struct snd_interval *channels = hw_param_interval(params,
    SNDRV_PCM_HW_PARAM_CHANNELS);
    unsigned int be_id = rtd->dai_link->be_id;

    if (be_id == OMAP_ABE_DAI_MM_FM)
    channels->min = 2;
    else if (be_id == OMAP_ABE_DAI_BT_VX)
    channels->min = 1;
    snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
    SNDRV_PCM_HW_PARAM_FIRST_MASK],
    SNDRV_PCM_FORMAT_S16_LE);
    return 0;
    }

    this function is in sound/soc/omap/sdp4430.c

  • Hi Naveen,

    Removing the id checks and making the min to be always 2 will solve the missing channel operation.

    Regards,

    Boyko

  • Thanks for the quick reply,

     i had edited as you suggested

    static int mcbsp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
    struct snd_pcm_hw_params *params)
    {
    struct snd_interval *channels = hw_param_interval(params,
    SNDRV_PCM_HW_PARAM_CHANNELS);

    channels->min = 2;
    snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
    SNDRV_PCM_HW_PARAM_FIRST_MASK],
    SNDRV_PCM_FORMAT_S16_LE);
    return 0;
    }

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

    But i am still getting left channel only.....

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

    what mcbsp configuration(slotlength,validbits per slot,bclk per frame) should be carried out in WM8280 codec, in order to match omap4460 mcbsp's default configuration...

    i have configured in wm8280 as follows

    1.frames size as 64

    2. 32 bclks per slots

    3.16 valid bits per slot

    is this configuration is right or wrong?

    with warm regards,

    Naveen

     

  • Hi 

     i fixed that issue by changing the slot and valid bit configuration.

  • Hello Naveen,


    I'm facing the exact similar issue with the noise. How was the problem fixed with the MCBSP configuration changes. It would be great if you can share the same.

    Thank you,

  • Hi richard,

    For STEREO_RSHIFTED_16 configuration in wm8280 side is

    LRCLK frame length=32 bclks

    16 bclk per slots

    No of vaild bits per slot is 16
  • Thanks Naveen for the update.