7 Mar
2014
7 Mar
'14
7:06 a.m.
On Wed, Mar 05, 2014 at 04:34:38PM +0800, RongJun Ying wrote:
From: Rongjun Ying rongjun.ying@csr.com
This connects platform DAI, hdmi audio codec DAI and SiRF I2S DAI together and works as a mach driver.
This looks like it should be able to use simple-card?
+static int sirf_hdmi_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;
- struct snd_soc_codec *codec = rtd->codec;
- struct snd_soc_card *card = codec->card;
- unsigned int fmt;
- int ret;
- fmt = card->dai_link[0].dai_fmt;
- ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
The whole point with dai_fmt is that the framework will do this for you.