[alsa-devel] [PATCH v5-resend 5/7] ASoC: sirf: Add hdmi card
Mark Brown
broonie at kernel.org
Fri Mar 7 07:06:33 CET 2014
On Wed, Mar 05, 2014 at 04:34:38PM +0800, RongJun Ying wrote:
> From: Rongjun Ying <rongjun.ying at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140307/70093b43/attachment.sig>
More information about the Alsa-devel
mailing list