Re: [PATCH v2] ASoC: pcm3168a: Add option to force clock consumer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



 From "Sound Card" point of view, setup directly Bx_Fx base instead of
CBx_CFx base is not a big deal. But if we do it, we need to have such
setting for each DAI, instead of common dai_link.

Now dai_link->dai_fmt is including 4 type of info

	1. DAI hardware audio formats
	2. DAI Clock gating
	3. DAI hardware signal polarity
	4. DAI hardware clock providers/consumers

I think we want to separate 4 (and maybe 2 too ?) from it to support
more flexible system ?

Legacy system
	dai_link->dai_fmt		// include all 1, 2, 3, 4

New system
	dai_link->dai_fmt		// include 1, 2, 3 (or 1, 3)
	dai_link->cpus[idx].fmt		// include 4       (or 2, 4)

	fmt = dai_link->dai_fmt | dai_link->cpus[i].fmt

"flip" has effect to 4 only, so New system has no issue with flipping
on dai_link->dai_fmt.

Hi Morimoto-san,

This is a great idea. I'd add that #4 could still be in dai_link->dai_fmt, but the new field in CPU/codec (snd_soc_dai_link_component.fmt) should override the setting (not a simple OR). This would preserve backward compatibility (I think). It greatly improves support for multiple codecs sharing clock lines, where 1 codec is the producer and others are consumers. The bit/frame logic in simple/graph cards should be able to be changed to handle this properly too.

Without this type of override, the original patch is needed (or the card driver needs to write registers directly, which seems bad).

I will wait to hear Mark's opinion.

Stephen





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux