diff options
Diffstat (limited to 'sound/soc/sh/rcar/ssiu.c')
-rw-r--r-- | sound/soc/sh/rcar/ssiu.c | 20 |
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 | } |