Antonio Ospite wrote:
I attach the patch ported to the new code.

SND_SOC_DAIFMT_MSB is for I2S emulation in MSB mode, shouldn't the
format be called SND_SOC_DAIFMT_I2S_MSB?

Yes, but there is no DAIFMT_I2S_MSB on soc.h. It will work with I2S_DAIFMT_I2S too, but the audio channels will be swapped.

        case SND_SOC_DAIFMT_I2S:
+               SSPSP_P(port) |= SSPSP_FSRT;

This is an OR and there's actually no 'break' here, right?

Right! The only difference between I2S and MSB is that the first has SSPSP_FSRT set.

        case SND_SOC_DAIFMT_MSB:
-               /* handled above */
+               SSCR0_P(port) |= SSCR0_EDSS | SCCR0_DataSize(16);
+               SSPSP_P(port) |= SSPSP_SFRMWDTH(16);
                break;



+               ret = cpu_dai->dai_ops.set_fmt(cpu_dai, SND_SOC_DAIFMT_MSB |
                        SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM);
                                                                ^   ^
AFAICS the Ms refer to codec point of view, so we are setting pxa as
slave here, right?

        Exactly! PXA is slave when SCLKDIR and SFRMDIR are set.

--
Daniel Ribeiro

Reply via email to