summaryrefslogtreecommitdiff
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2015-03-27 12:47:51 +0300
committerMark Brown <broonie@kernel.org>2015-04-01 23:34:15 +0300
commit7b3d165a282145e605247148d3dec034814e0a78 (patch)
tree483adcd36f9d8afa97140c047cb4c6981e2366e1 /sound/soc/davinci/davinci-mcasp.c
parenta75a053f1eefbbbbae0f7d6bf1ed12ce012112b7 (diff)
downloadlinux-7b3d165a282145e605247148d3dec034814e0a78.tar.xz
ASoC: davinci-mcasp: Index ruledata in drvdata with substream->stream
The serializer direction definitions runs from 1 to 2, which does not suite the purpose. The substream->stream is perfect for the purpose and should have been used from the beginning. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 76156d18ed46..0b6b1b286201 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1149,7 +1149,7 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
if (mcasp->serial_dir[i] == dir)
max_channels++;
}
- mcasp->ruledata[dir].serializers = max_channels;
+ mcasp->ruledata[substream->stream].serializers = max_channels;
max_channels *= mcasp->tdm_slots;
/*
* If the already active stream has less channels than the calculated
@@ -1172,7 +1172,7 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
if (mcasp->bclk_master && mcasp->bclk_div == 0 && mcasp->sysclk_freq) {
int ret;
- mcasp->ruledata[dir].mcasp = mcasp;
+ mcasp->ruledata[substream->stream].mcasp = mcasp;
ret = snd_pcm_hw_rule_add(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,