Hey there, so I am not an experienced C programmer just to get that out of the way. However, I am attempting to both learn C and the Linux ASoC system. I am working on replacing some old hardware (codec) with a new one. Specifically, I am attempting to write/adapt a new machine driver for the WM8750 audio codec based off of the existing machine driver that I have for the WM8753 audio codec (deprecated).
I have a few questions:
1) The following define:
Code:
#define WM8753_SSI MASTER 1
What does the 1 mean after the initial deceleration?
2)
Code:
#if WM8753_SSI_MASTER
dai_format |= SND_SOC_DAIFMT_CBM_CFM;
Bit-wise OR operation I think it is equivalent to:
dai_format = dai_format | SND_SOC_DAIFMT_CBM_CFM
is that right?
3)
Code:
ssi_mode->sync_mode = 1;
Equivalent to: (*xxi_mode).sync_mode = 1... where xxi = ssi (wont let me type what I want to... keeps replacing it with ..........)
I believe, this means: assign the member sync_mode that ssi_mode points to and set its value to 1?
4) :
Code:
channels == 1 ? 0xfffffffe : 0xfffffffc,
I believe this means: if channels == 1 then 0xfffffffe else 0xfffffffc
5) :
-What does it mean when a variable has a . in front of it?
6) :
Code:
plat = priv->pdev->dev.platform_data;
plat = (*priv).(*pdev).(*dev.platform_data)??? -not sure what's happening here.
Well that is plenty for now I would say. Hey if anyone wants to help me with the project I can post the old machine driver and the codecs, just let me know!