summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2013-08-07 14:55:18 +0200
committerMichael Grzeschik <m.grzeschik@pengutronix.de>2013-09-09 12:54:41 +0200
commit0a77e568eb3203f238770278200ca00a0e1d1302 (patch)
treeb4896c0343def8ff091afe08844beb47db9a2210
parent95c94eae1d31ead2e2d57f7efc456cd2617e12fe (diff)
downloadlinux-0a77e568eb3203f238770278200ca00a0e1d1302.tar.gz
ASoC: mc13783: always set dac params
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
-rw-r--r--sound/soc/codecs/mc13783.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 5402dfb..30ca4b6 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -188,10 +188,16 @@ static int mc13783_pcm_hw_params_sync(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- return mc13783_pcm_hw_params_dac(substream, params, dai);
- else
- return mc13783_pcm_hw_params_codec(substream, params, dai);
+ int ret = 0;
+
+ ret = mc13783_pcm_hw_params_dac(substream, params, dai);
+ if (ret)
+ return ret;
+
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+ ret = mc13783_pcm_hw_params_codec(substream, params, dai);
+
+ return ret;
}
static int mc13783_set_fmt(struct snd_soc_dai *dai, unsigned int fmt,