summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_sai.h
diff options
context:
space:
mode:
authorViorel Suman <viorel.suman@nxp.com>2018-11-21 16:09:44 +0200
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:54:09 +0800
commite138a5378b5e459cc71a1cc689fde632cb462cc1 (patch)
tree90bac8b6d9412ca4a3490b9d51823ceeebe5e08d /sound/soc/fsl/fsl_sai.h
parent34ef089c731667deb812342b263da8294b6543af (diff)
MLK-20328-1: ASoC: fsl_sai: map number of pins to dataline masks
The patch enable mapping the number of pins required to play or record a specific number of channels to a specific dataline mask. Three consequent elements in "fsl,dataline" and "fsl,dataline,dsd" defines a particular mapping, for instance for: fsl,dataline = "0 0xff 0xff 2 0x11 0x11" there are two mappings defined: default (0 pins) "rx" and "tx" dataline masks: 0 0xff 0xff 2 pins "rx" and "tx" dataline masks: 2 0x11 0x11 In case if property is missing, then default value "0 0x1 0x1" is considered. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_sai.h')
-rw-r--r--sound/soc/fsl/fsl_sai.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index 4627d79dcb4d..20cc5745b0cc 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -234,6 +234,12 @@ struct fsl_sai_param {
u32 dln; /* number of datalines implemented */
};
+struct fsl_sai_dl_cfg {
+ unsigned int pins;
+ unsigned int mask[2];
+ unsigned int offset[2];
+};
+
struct fsl_sai {
struct platform_device *pdev;
struct regmap *regmap;
@@ -249,10 +255,12 @@ struct fsl_sai {
bool synchronous[2];
bool is_stream_opened[2];
bool is_dsd;
- unsigned int dataline[2];
- unsigned int dataline_dsd[2];
- unsigned int dataline_off[2];
- unsigned int dataline_off_dsd[2];
+
+ int pcm_dl_cfg_cnt;
+ int dsd_dl_cfg_cnt;
+ struct fsl_sai_dl_cfg *pcm_dl_cfg;
+ struct fsl_sai_dl_cfg *dsd_dl_cfg;
+
unsigned int masterflag[2];
unsigned int mclk_id[2];