forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/sound/soc/sh/rcar/dvc.c
....@@ -86,14 +86,8 @@
8686 val[i] = rsnd_kctrl_valm(dvc->volume, i);
8787
8888 /* Enable Digital Volume */
89
- rsnd_mod_write(mod, DVC_VOL0R, val[0]);
90
- rsnd_mod_write(mod, DVC_VOL1R, val[1]);
91
- rsnd_mod_write(mod, DVC_VOL2R, val[2]);
92
- rsnd_mod_write(mod, DVC_VOL3R, val[3]);
93
- rsnd_mod_write(mod, DVC_VOL4R, val[4]);
94
- rsnd_mod_write(mod, DVC_VOL5R, val[5]);
95
- rsnd_mod_write(mod, DVC_VOL6R, val[6]);
96
- rsnd_mod_write(mod, DVC_VOL7R, val[7]);
89
+ for (i = 0; i < RSND_MAX_CHANNELS; i++)
90
+ rsnd_mod_write(mod, DVC_VOLxR(i), val[i]);
9791 }
9892
9993 static void rsnd_dvc_volume_init(struct rsnd_dai_stream *io,
....@@ -192,7 +186,11 @@
192186 struct rsnd_dai_stream *io,
193187 struct rsnd_priv *priv)
194188 {
195
- rsnd_mod_power_on(mod);
189
+ int ret;
190
+
191
+ ret = rsnd_mod_power_on(mod);
192
+ if (ret < 0)
193
+ return ret;
196194
197195 rsnd_dvc_activation(mod);
198196
....@@ -298,6 +296,7 @@
298296 .init = rsnd_dvc_init,
299297 .quit = rsnd_dvc_quit,
300298 .pcm_new = rsnd_dvc_pcm_new,
299
+ .get_status = rsnd_mod_get_status,
301300 };
302301
303302 struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id)
....@@ -357,7 +356,7 @@
357356 }
358357
359358 ret = rsnd_mod_init(priv, rsnd_mod_get(dvc), &rsnd_dvc_ops,
360
- clk, rsnd_mod_get_status, RSND_MOD_DVC, i);
359
+ clk, RSND_MOD_DVC, i);
361360 if (ret) {
362361 of_node_put(np);
363362 goto rsnd_dvc_probe_done;