Question about daifmt of legacy DT on simple-card

Mark Brown broonie at kernel.org
Thu Jan 14 14:50:06 CET 2021


On Thu, Jan 14, 2021 at 01:24:04PM +0900, Kuninori Morimoto wrote:

> It rollbacks to legacy DT parsing at (B) if (A) didn't have
> master settings.
> Here, (B) re-try to get daifmt, and use "or" with (daifmt & ~CLOCK mask).
> Why CLOCK mask ? and shouldn't it use mask when "or" ?
> Otherwise FORMAT and INV part will be duplicated, I think.
> for example
> 	daifmt = (snd_soc_of_parse_daifmt() &  SND_SOC_DAIFMT_CLOCK_MASK) |
> 		 (daifmt                    & ~SND_SOC_DAIFMT_CLOCK_MASK)

> I think using snd_soc_of_parse_daifmt() only is very enough at (B),
> but am I misunderstanding ??

I have to confess I'm not entirely clear on what the intent is behind
the code; we can work out what it *does* but looking at it again I'd be
hard pressed to say what the actual intent is.  At the very least it
needs more comments :/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210114/7eeefaa1/attachment.sig>


More information about the Alsa-devel mailing list