Merge branch 'asoc-4.19' into asoc-4.20 for rcar dep
[muen/linux.git] / sound / soc / sh / rcar / rsnd.h
index 8f7a0ab..7a04b19 100644 (file)
@@ -156,9 +156,30 @@ enum rsnd_reg {
        RSND_REG_SSI_MODE2,
        RSND_REG_SSI_CONTROL,
        RSND_REG_SSI_CTRL,
-       RSND_REG_SSI_BUSIF_MODE,
-       RSND_REG_SSI_BUSIF_ADINR,
-       RSND_REG_SSI_BUSIF_DALIGN,
+       RSND_REG_SSI_BUSIF0_MODE,
+       RSND_REG_SSI_BUSIF0_ADINR,
+       RSND_REG_SSI_BUSIF0_DALIGN,
+       RSND_REG_SSI_BUSIF1_MODE,
+       RSND_REG_SSI_BUSIF1_ADINR,
+       RSND_REG_SSI_BUSIF1_DALIGN,
+       RSND_REG_SSI_BUSIF2_MODE,
+       RSND_REG_SSI_BUSIF2_ADINR,
+       RSND_REG_SSI_BUSIF2_DALIGN,
+       RSND_REG_SSI_BUSIF3_MODE,
+       RSND_REG_SSI_BUSIF3_ADINR,
+       RSND_REG_SSI_BUSIF3_DALIGN,
+       RSND_REG_SSI_BUSIF4_MODE,
+       RSND_REG_SSI_BUSIF4_ADINR,
+       RSND_REG_SSI_BUSIF4_DALIGN,
+       RSND_REG_SSI_BUSIF5_MODE,
+       RSND_REG_SSI_BUSIF5_ADINR,
+       RSND_REG_SSI_BUSIF5_DALIGN,
+       RSND_REG_SSI_BUSIF6_MODE,
+       RSND_REG_SSI_BUSIF6_ADINR,
+       RSND_REG_SSI_BUSIF6_DALIGN,
+       RSND_REG_SSI_BUSIF7_MODE,
+       RSND_REG_SSI_BUSIF7_ADINR,
+       RSND_REG_SSI_BUSIF7_DALIGN,
        RSND_REG_SSI_INT_ENABLE,
        RSND_REG_SSI_SYS_STATUS0,
        RSND_REG_SSI_SYS_STATUS1,
@@ -438,6 +459,7 @@ struct rsnd_dai_stream {
        char name[RSND_DAI_NAME_SIZE];
        struct snd_pcm_substream *substream;
        struct rsnd_mod *mod[RSND_MOD_MAX];
+       struct rsnd_mod *dma;
        struct rsnd_dai *rdai;
        struct device *dmac_dev; /* for IPMMU */
        u32 parent_ssi_status;
@@ -467,6 +489,7 @@ struct rsnd_dai {
 
        int max_channels;       /* 2ch - 16ch */
        int ssi_lane;           /* 1lane - 4lane */
+       int chan_width;         /* 16/24/32 bit width */
 
        unsigned int clk_master:1;
        unsigned int bit_clk_inv:1;
@@ -500,6 +523,11 @@ int rsnd_rdai_channels_ctrl(struct rsnd_dai *rdai,
 int rsnd_rdai_ssi_lane_ctrl(struct rsnd_dai *rdai,
                            int ssi_lane);
 
+#define rsnd_rdai_width_set(rdai, width) \
+       rsnd_rdai_width_ctrl(rdai, width)
+#define rsnd_rdai_width_get(rdai) \
+       rsnd_rdai_width_ctrl(rdai, 0)
+int rsnd_rdai_width_ctrl(struct rsnd_dai *rdai, int width);
 void rsnd_dai_period_elapsed(struct rsnd_dai_stream *io);
 int rsnd_dai_connect(struct rsnd_mod *mod,
                     struct rsnd_dai_stream *io,
@@ -692,6 +720,7 @@ void rsnd_ssi_remove(struct rsnd_priv *priv);
 struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
 int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod);
 int rsnd_ssi_use_busif(struct rsnd_dai_stream *io);
+int rsnd_ssi_get_busif(struct rsnd_dai_stream *io);
 u32 rsnd_ssi_multi_slaves_runtime(struct rsnd_dai_stream *io);
 
 #define RSND_SSI_HDMI_PORT0    0xf0
@@ -709,7 +738,7 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
 void rsnd_parse_connect_ssi(struct rsnd_dai *rdai,
                            struct device_node *playback,
                            struct device_node *capture);
-unsigned int rsnd_ssi_clk_query(struct rsnd_priv *priv,
+unsigned int rsnd_ssi_clk_query(struct rsnd_dai *rdai,
                       int param1, int param2, int *idx);
 
 /*