[alsa-devel] [PATCH 1/4] ASoC: pxa-ssp: enhance I2S and add Left_J support

Daniel Mack daniel at caiaq.de
Tue Jun 9 11:54:28 CEST 2009


On Tue, Jun 09, 2009 at 05:39:53PM +0800, Paul Shen wrote:
> Would you please give some informations about your platform ?
> Thus I can test the patches with your method.

Sure, here we go.

We're using the following setup:

 - PXA in master mode to BITCLK and LRCLK but external SSP clock
 - 64fs frame format
 - CS4270 codec

Here's the code sniplet I use to configure the port using your latest
patch set:


	fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
		SND_SOC_DAIFMT_CBS_CFS | PXA_SSP_FRM_64FS;

	/* setup the CODEC DAI */
        ret = snd_soc_dai_set_fmt(codec_dai, fmt);
        if (ret < 0)
		return ret;

	ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk, 0);
	if (ret < 0)
		return ret;

	/* setup the CPU DAI */
	ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, clk);
	if (ret < 0)
		return ret;

        ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
        if (ret < 0)
                return ret;

	ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_DIV_SCR, 4);
        if (ret < 0)
                return ret;

	ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_EXT, 0, 1);
        if (ret < 0)
                return ret;

	snd_soc_dai_set_tdm_slot(cpu_dai, 3, 2);

That gives me the following register values:

	SSCR0 0xa10003ff
	SSCR1 0x00e01d80
	SSPSP 0x31a00084

... which works fine for me. But the PXA is not really in a typical
slave configuration, mostly because we had lots of strange issues when
we tried that.

Any more things I can provide?

Thanks,
Daniel



More information about the Alsa-devel mailing list