11 Feb
2014
11 Feb
'14
1:48 p.m.
On Thu, Jan 30, 2014 at 06:14:07PM +0100, Thomas Petazzoni wrote:
- fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
- ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
- if (ret < 0)
return ret;
- ret = snd_soc_dai_set_fmt(codec_dai, fmt);
- if (ret < 0)
return ret;
Set .dai_fmt in the DAI link.
+static int a370db_dai_init(struct snd_soc_pcm_runtime *rtd) +{
- struct snd_soc_codec *codec = rtd->codec;
- struct snd_soc_dapm_context *dapm = &codec->dapm;
- snd_soc_dapm_enable_pin(dapm, "Out Jack");
- snd_soc_dapm_enable_pin(dapm, "In Jack");
No need to do this, everything defaults to enabled.
- card->dev = &pdev->dev;
- return snd_soc_register_card(card);
+}
devm_snd_soc_register_card().
+static const struct of_device_id a370db_dt_ids[] = {
- { .compatible = "marvell,a370db-audio" },
- { },
+};
No binding document for this, and you should be using DT to look up the controller and CODEC rather than hard coding their names (which may change in future when instantiated from DT, especially the platform device).