[alsa-devel] How to specify data format if playback/capture were different ?

Lars-Peter Clausen lars at metafoo.de
Tue May 21 13:58:19 CEST 2013

On 05/21/2013 04:47 AM, Kuninori Morimoto wrote:
> Hi Mark, and ALSA ML
> Now, I'm creating ak4554 AD/DA.
> My question is about data format.
> If my understand is correct,
> we can specify cpu/codec deivce data format by using
> 	snd_soc_dai_set_fmt(dai, SND_SOC_DAIFMT_xxx);
> But, ak4554 case, data formats are
>  playback : SND_SOC_DAIFMT_RIGHT_J
>  capture  : SND_SOC_DAIFMT_LEFT_J
> and, it can't exchange this data format.
> CPU driver should set these information for ak4554 when playback/capture.
> Then, how to specify these data format on ALSA SoC ?

You can add two different DAIs one for playback one for capture. Then you
can specify the format for each.

- Lars

More information about the Alsa-devel mailing list