Hi Mark
Cc Stephen
> It is trying to set the CPU end as producer. I think it's because
> asoc_simple_parse_daifmt() checks whether the bit/frame phandles passed
> match the codec phandle - since it doesn't (it's a different codec),
> it sets the DAI link as "consumer mode" (i.e. clocks come from CPU).
> Therefore, the CPU side gets configured as producer.
(snip)
> > # Clock producer/consumer settings is very confusable, because it was
> > # Codec base, and has flip, etc...
Ah.. indeed, but hmm...
Current ASoC provider/consumer settings for clock/frame is set via
dai_link->dai_fmt.
static int soc_init_pcm_runtime(...)
{
...
=> ret = snd_soc_runtime_set_dai_fmt(..., dai_link->dai_fmt);
...
}
And use it for both Codec (A) and CPU (B) with flipping (C)
int snd_soc_runtime_set_dai_fmt(..., dai_fmt)
{
...
^ for_each_rtd_codec_dais(rtd, i, codec_dai) {
(A) ...
v }
/* Flip the polarity for the "CPU" end of link */
(C) dai_fmt = snd_soc_daifmt_clock_provider_flipped(dai_fmt);
^ for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
(B) ...
v }
...
}
So, I think we can't use both CPU/Codec as "consumer" (or "provider")
on current ASoC, but what do you think, Mark ?
Because of ASoC history, the clock/frame provider/consumer settings was
from Codec point of view (CBx_CFx), and "Sound Card" is still based on this.
OTOH, each CPU/Codec driver is now using own base (Bx_Fx).
Because of it we need flipping (C).
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]