diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-05-17 20:35:34 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-19 14:41:09 -0400 |
commit | f33238e96f619d9888713c07dcd92e4518879282 (patch) | |
tree | 3367085471db4d5d4f2193e3f5c3af0f446b67d2 /sound/soc/sh/fsi.c | |
parent | 9c59dd342e4dd3c0bab5a9cad1aca7ed9501cbf8 (diff) |
ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()
fsi_hw_startup/shutdown() needs the setup of bus width,
but it is impossible to get parameter of snd_pcm_runtime at this timing.
So, these functions are changed so that be called from fsi_dai_trigger().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r-- | sound/soc/sh/fsi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index bddc353254ac..e52a95d44a6b 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1232,7 +1232,9 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream, | |||
1232 | { | 1232 | { |
1233 | struct fsi_priv *fsi = fsi_get_priv(substream); | 1233 | struct fsi_priv *fsi = fsi_get_priv(substream); |
1234 | 1234 | ||
1235 | return fsi_hw_startup(fsi, fsi_stream_get(fsi, substream), dai->dev); | 1235 | fsi->rate = 0; |
1236 | |||
1237 | return 0; | ||
1236 | } | 1238 | } |
1237 | 1239 | ||
1238 | static void fsi_dai_shutdown(struct snd_pcm_substream *substream, | 1240 | static void fsi_dai_shutdown(struct snd_pcm_substream *substream, |
@@ -1240,7 +1242,6 @@ static void fsi_dai_shutdown(struct snd_pcm_substream *substream, | |||
1240 | { | 1242 | { |
1241 | struct fsi_priv *fsi = fsi_get_priv(substream); | 1243 | struct fsi_priv *fsi = fsi_get_priv(substream); |
1242 | 1244 | ||
1243 | fsi_hw_shutdown(fsi, dai->dev); | ||
1244 | fsi->rate = 0; | 1245 | fsi->rate = 0; |
1245 | } | 1246 | } |
1246 | 1247 | ||
@@ -1254,11 +1255,13 @@ static int fsi_dai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
1254 | switch (cmd) { | 1255 | switch (cmd) { |
1255 | case SNDRV_PCM_TRIGGER_START: | 1256 | case SNDRV_PCM_TRIGGER_START: |
1256 | fsi_stream_init(fsi, io, substream); | 1257 | fsi_stream_init(fsi, io, substream); |
1258 | fsi_hw_startup(fsi, io, dai->dev); | ||
1257 | ret = fsi_stream_transfer(io); | 1259 | ret = fsi_stream_transfer(io); |
1258 | if (0 == ret) | 1260 | if (0 == ret) |
1259 | fsi_stream_start(fsi, io); | 1261 | fsi_stream_start(fsi, io); |
1260 | break; | 1262 | break; |
1261 | case SNDRV_PCM_TRIGGER_STOP: | 1263 | case SNDRV_PCM_TRIGGER_STOP: |
1264 | fsi_hw_shutdown(fsi, dai->dev); | ||
1262 | fsi_stream_stop(fsi, io); | 1265 | fsi_stream_stop(fsi, io); |
1263 | fsi_stream_quit(fsi, io); | 1266 | fsi_stream_quit(fsi, io); |
1264 | break; | 1267 | break; |