asoc: swr-mstr: add rx and tx master frame configuration

Add Rx and TX master frame configuration.

Change-Id: I067931565270e7390d9c5311e0869dfdb6685999
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
This commit is contained in:
Ramprasad Katkam
2018-07-25 17:20:18 +05:30
committed by Gerrit - the friendly Code Review server
parent 997da40118
commit 14f47cc8a6
3 changed files with 199 additions and 54 deletions

View File

@@ -15,7 +15,9 @@
#include <linux/module.h>
#include <soc/swr-wcd.h>
#define SWR_MAX_ROW 0 /* Rows = 48 */
#define SWR_ROW_48 0
#define SWR_ROW_50 1
#define SWR_ROW_64 2
#define SWR_MAX_COL 7 /* Cols = 16 */
#define SWR_MIN_COL 0 /* Cols = 2 */
@@ -62,6 +64,12 @@ struct port_params {
u8 si;
u8 off1;
u8 off2;
u8 hstart;/* head start */
u8 hstop; /* head stop */
u8 wd_len;/* word length */
u8 bp_mode; /* block pack mode */
u8 bgp_ctrl;/* block group control */
u8 lane_ctrl;/* lane to be used */
};
struct swrm_mports {
@@ -77,6 +85,8 @@ struct swrm_mports {
u8 hstop;
u8 blk_grp_count;
u8 blk_pack_mode;
u8 word_length;
u8 lane_ctrl;
};
struct swrm_port_type {
@@ -109,6 +119,7 @@ struct swr_mstr_ctrl {
char __iomem *swrm_dig_base;
u8 rcmd_id;
u8 wcmd_id;
u32 master_id;
void *handle; /* SWR Master handle from client for read and writes */
int (*read)(void *handle, int reg);
int (*write)(void *handle, int reg, int val);
@@ -132,6 +143,7 @@ struct swr_mstr_ctrl {
struct swrm_port_type
port_mapping[SWR_MSTR_PORT_LEN][SWR_MAX_CH_PER_PORT];
int swr_irq;
u32 clk_stop_mode0_supp;
};
#endif /* _SWR_WCD_CTRL_H */