aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/ssiu.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-03-14 09:03:29 -0400
committerTakashi Iwai <tiwai@suse.de>2016-03-14 09:03:29 -0400
commitca80e26a5995f078aa442f151b94cf4305e07ac4 (patch)
treebb1b4a0a6e07f1ed80ff6412eb2a20e621244037 /sound/soc/sh/rcar/ssiu.c
parent028cb68ee3d01f5323493cb3c07ba92b0acb2f03 (diff)
parentd4a6360f19c1c551afcba42be98df04651fab31b (diff)
Merge tag 'asoc-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v4.6 The main thing in terms of the core this time around has been some additional framework work for dynamic topologies (though we *still* don't appear to have a stable ABI for the topology code, it's probably worth considering if this will ever happen...). Otherwise the work has almost all been in the drivers: - HDMI support for Sky Lake, along with other fixes and enhancements for the Intel drivers. - Lots of improvements to the Renesas drivers. - Capture support for Qualcomm drivers. - Support for TI DaVinci DRA7xxx devices. - New machine drivers for Freescale systems with Cirrus CODECs, Mediatek systems with RT5650 CODECs. - New CPU drivers for Allwinner S/PDIF controllers - New CODEC drivers for Maxim MAX9867 and MAX98926 and Realtek RT5514.
Diffstat (limited to 'sound/soc/sh/rcar/ssiu.c')
-rw-r--r--sound/soc/sh/rcar/ssiu.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
index 06d72828e5bc..6f9b388ec5a8 100644
--- a/sound/soc/sh/rcar/ssiu.c
+++ b/sound/soc/sh/rcar/ssiu.c
@@ -27,7 +27,7 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod,
27 struct rsnd_priv *priv) 27 struct rsnd_priv *priv)
28{ 28{
29 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); 29 struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
30 u32 multi_ssi_slaves = rsnd_ssi_multi_slaves(io); 30 u32 multi_ssi_slaves = rsnd_ssi_multi_slaves_runtime(io);
31 int use_busif = rsnd_ssi_use_busif(io); 31 int use_busif = rsnd_ssi_use_busif(io);
32 int id = rsnd_mod_id(mod); 32 int id = rsnd_mod_id(mod);
33 u32 mask1, val1; 33 u32 mask1, val1;
@@ -105,7 +105,7 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
105 if (ret < 0) 105 if (ret < 0)
106 return ret; 106 return ret;
107 107
108 if (rsnd_get_slot_width(io) >= 6) { 108 if (rsnd_runtime_is_ssi_tdm(io)) {
109 /* 109 /*
110 * TDM Extend Mode 110 * TDM Extend Mode
111 * see 111 * see
@@ -115,13 +115,14 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
115 } 115 }
116 116
117 if (rsnd_ssi_use_busif(io)) { 117 if (rsnd_ssi_use_busif(io)) {
118 u32 val = rsnd_get_dalign(mod, io);
119
120 rsnd_mod_write(mod, SSI_BUSIF_ADINR, 118 rsnd_mod_write(mod, SSI_BUSIF_ADINR,
121 rsnd_get_adinr_bit(mod, io) | 119 rsnd_get_adinr_bit(mod, io) |
122 rsnd_get_adinr_chan(mod, io)); 120 (rsnd_io_is_play(io) ?
121 rsnd_runtime_channel_after_ctu(io) :
122 rsnd_runtime_channel_original(io)));
123 rsnd_mod_write(mod, SSI_BUSIF_MODE, 1); 123 rsnd_mod_write(mod, SSI_BUSIF_MODE, 1);
124 rsnd_mod_write(mod, SSI_BUSIF_DALIGN, val); 124 rsnd_mod_write(mod, SSI_BUSIF_DALIGN,
125 rsnd_get_dalign(mod, io));
125 } 126 }
126 127
127 return 0; 128 return 0;
@@ -136,7 +137,7 @@ static int rsnd_ssiu_start_gen2(struct rsnd_mod *mod,
136 137
137 rsnd_mod_write(mod, SSI_CTRL, 0x1); 138 rsnd_mod_write(mod, SSI_CTRL, 0x1);
138 139
139 if (rsnd_ssi_multi_slaves(io)) 140 if (rsnd_ssi_multi_slaves_runtime(io))
140 rsnd_mod_write(mod, SSI_CONTROL, 0x1); 141 rsnd_mod_write(mod, SSI_CONTROL, 0x1);
141 142
142 return 0; 143 return 0;
@@ -151,7 +152,7 @@ static int rsnd_ssiu_stop_gen2(struct rsnd_mod *mod,
151 152
152 rsnd_mod_write(mod, SSI_CTRL, 0); 153 rsnd_mod_write(mod, SSI_CTRL, 0);
153 154
154 if (rsnd_ssi_multi_slaves(io)) 155 if (rsnd_ssi_multi_slaves_runtime(io))
155 rsnd_mod_write(mod, SSI_CONTROL, 0); 156 rsnd_mod_write(mod, SSI_CONTROL, 0);
156 157
157 return 0; 158 return 0;
@@ -206,7 +207,8 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv)
206 207
207 for_each_rsnd_ssiu(ssiu, priv, i) { 208 for_each_rsnd_ssiu(ssiu, priv, i) {
208 ret = rsnd_mod_init(priv, rsnd_mod_get(ssiu), 209 ret = rsnd_mod_init(priv, rsnd_mod_get(ssiu),
209 ops, NULL, RSND_MOD_SSIU, i); 210 ops, NULL, rsnd_mod_get_status,
211 RSND_MOD_SSIU, i);
210 if (ret) 212 if (ret)
211 return ret; 213 return ret;
212 } 214 }