diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-10-30 22:59:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-01 10:47:51 -0400 |
commit | 80b4addc9c697c8d515afdaf671b948b3de6801c (patch) | |
tree | 65d35cfd29e49139f2d3b367a6f245fb8116bb6a /sound/soc/sh/fsi.c | |
parent | ddeb2d701b76bb1fc299c0f9306c63109769bc33 (diff) |
ASoC: fsi: care fsi_hw_start/stop() return value
Current FSI driver didn't care fsi_hw_start/stop() return value,
and it causes WARNING() call if SNDRV_PCM_TRIGGER_START failed.
This patch solved this issue
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 | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 53d1a7c0a6bb..ef257bcb5341 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1335,17 +1335,19 @@ static int fsi_hw_startup(struct fsi_priv *fsi, | |||
1335 | 1335 | ||
1336 | /* start master clock */ | 1336 | /* start master clock */ |
1337 | if (fsi_is_clk_master(fsi)) | 1337 | if (fsi_is_clk_master(fsi)) |
1338 | fsi_set_master_clk(dev, fsi, fsi->rate, 1); | 1338 | return fsi_set_master_clk(dev, fsi, fsi->rate, 1); |
1339 | 1339 | ||
1340 | return 0; | 1340 | return 0; |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | static void fsi_hw_shutdown(struct fsi_priv *fsi, | 1343 | static int fsi_hw_shutdown(struct fsi_priv *fsi, |
1344 | struct device *dev) | 1344 | struct device *dev) |
1345 | { | 1345 | { |
1346 | /* stop master clock */ | 1346 | /* stop master clock */ |
1347 | if (fsi_is_clk_master(fsi)) | 1347 | if (fsi_is_clk_master(fsi)) |
1348 | fsi_set_master_clk(dev, fsi, fsi->rate, 0); | 1348 | return fsi_set_master_clk(dev, fsi, fsi->rate, 0); |
1349 | |||
1350 | return 0; | ||
1349 | } | 1351 | } |
1350 | 1352 | ||
1351 | static int fsi_dai_startup(struct snd_pcm_substream *substream, | 1353 | static int fsi_dai_startup(struct snd_pcm_substream *substream, |
@@ -1376,13 +1378,16 @@ static int fsi_dai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
1376 | switch (cmd) { | 1378 | switch (cmd) { |
1377 | case SNDRV_PCM_TRIGGER_START: | 1379 | case SNDRV_PCM_TRIGGER_START: |
1378 | fsi_stream_init(fsi, io, substream); | 1380 | fsi_stream_init(fsi, io, substream); |
1379 | fsi_hw_startup(fsi, io, dai->dev); | 1381 | if (!ret) |
1380 | ret = fsi_stream_transfer(io); | 1382 | ret = fsi_hw_startup(fsi, io, dai->dev); |
1381 | if (0 == ret) | 1383 | if (!ret) |
1384 | ret = fsi_stream_transfer(io); | ||
1385 | if (!ret) | ||
1382 | fsi_stream_start(fsi, io); | 1386 | fsi_stream_start(fsi, io); |
1383 | break; | 1387 | break; |
1384 | case SNDRV_PCM_TRIGGER_STOP: | 1388 | case SNDRV_PCM_TRIGGER_STOP: |
1385 | fsi_hw_shutdown(fsi, dai->dev); | 1389 | if (!ret) |
1390 | ret = fsi_hw_shutdown(fsi, dai->dev); | ||
1386 | fsi_stream_stop(fsi, io); | 1391 | fsi_stream_stop(fsi, io); |
1387 | fsi_stream_quit(fsi, io); | 1392 | fsi_stream_quit(fsi, io); |
1388 | break; | 1393 | break; |