imx6q audio pcm format

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6q audio pcm format

1,008 Views
whwshiyuan
Contributor I

Hi, all

I have  a problem in imx6q SSI interface.    I configure SSI in PCM master format, but  BCLK and LRCLK not out.  I configure SSI in I2S master format , BCLK and LRCLK can out.  Anybody konow how to configure SSI in PCM master format.  Thank you so much.

note:my linux version is 4.1.15

Labels (1)
0 Kudos
2 Replies

842 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi, hongwan,

  

   Joan's answer is correct,  you only need to remove "codec-master" from "sound" node:

                mux-int-port = <2>;
                mux-ext-port = <3>;
-               codec-master;
                hp-det-gpios = <&gpio7 8 1>;

                mic-det-gpios = <&gpio1 9 1>;

BUT I don't know if you have configured dai format and cpu clock in "machine driver" like code below:

static int imx_hifi_hw_params(struct snd_pcm_substream *substream,   struct snd_pcm_hw_params *params)
{

    struct snd_soc_pcm_runtime *rtd = substream->private_data;
    struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
    u32 channels = params_channels(params);
    u32 rate = params_rate(params);

    snd_pcm_format_t sample_format = params_format(params);

    int ret = 0;

    ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S
            | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);

     if (sample_format == SNDRV_PCM_FORMAT_S24_LE  || sample_format == SNDRV_PCM_FORMAT_S20_3LE)
       bclk = rate * 384;
    else
       bclk = rate * 256;

     ret = snd_soc_dai_set_sysclk(cpu_dai, 0, bclk, SND_SOC_CLOCK_OUT);

.... ...

}

Probably above code should be modified according to your codec datasheet, BUT you can try .

Have a nice day!

BR,

Weidong

0 Kudos

842 Views
joanxie
NXP TechSupport
NXP TechSupport

"Here is the simple change that makes wm8962 codec to work as slave and SSI as master on 4.1.15 kernel:

https://pastebin.com/UAve2MS4 "

0 Kudos