[alsa-devel] Problem to init AD1938 on i.MX25

Murat Sahin murat.sahin.zeisberg at googlemail.com
Mon Aug 23 16:55:50 CEST 2010

  Thanks Sascha for your Informations.
The Problem was solved by adding soc-cache.c and changing the KARO-SPI 
driver with them from Mainline.

The codec is still running, but now we have another problem.
The AD1938 has 8 channels, the driver for i.mx25 supports 2 channels.
How we can solve the Problem?

static int imx_ad1938_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_link *machine = rtd->dai;
     struct snd_soc_dai *cpu_dai = machine->cpu_dai;
     struct snd_soc_dai *codec_dai = machine->codec_dai;
     struct imx_ssi *ssi_mode = cpu_dai->private_data;
     unsigned int channels = params_channels(params);
     u32 dai_format;

     int ret;

        ssi_mode->sync_mode = 1;
     if (channels == 1)
         ssi_mode->network_mode = 0;
         ssi_mode->network_mode = 1;

         dai_format = SND_SOC_DAIFMT_DSP_A |

     /* set codec DAI configuration */
     ret = snd_soc_dai_set_fmt(codec_dai, dai_format);
     if (ret) {
         pr_err("%s: failed set codec dai format\n", __func__);
     return ret;

     /* set codec DAI slots, 8 channels, all channels are enabled */
     ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xFF, 0xFF, 8, 32);
     if (ret) {
         pr_err("%s: failed set codec dai tdm slot\n", __func__);
     return ret;

Murat Sahin
Zeisberg GmbH

More information about the Alsa-devel mailing list