diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-04 20:26:03 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-05 18:03:23 +0100 |
commit | db43b16fa0e913582b63c971848e08151d50d952 (patch) | |
tree | 08210f080a12df3cf6a2581a708653cf99f19b33 /sound/soc/kirkwood/kirkwood-i2s.c | |
parent | af64d7341ab51335eeb03453180cf200b120ec43 (diff) | |
download | lwn-db43b16fa0e913582b63c971848e08151d50d952.tar.gz lwn-db43b16fa0e913582b63c971848e08151d50d952.zip |
ASoC: kirkwood: provide KIRKWOOD_PLAYCTL_ENABLE_MASK
Provide a helper macro which includes the sum of all enable bits in
the playback control register. This simplifies the code a little.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-i2s.c')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 0109b1e8449a..ad1c789637b2 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -198,8 +198,7 @@ static int kirkwood_i2s_hw_params(struct snd_pcm_substream *substream, ctl_play |= KIRKWOOD_PLAYCTL_MONO_OFF; priv->ctl_play &= ~(KIRKWOOD_PLAYCTL_MONO_MASK | - KIRKWOOD_PLAYCTL_I2S_EN | - KIRKWOOD_PLAYCTL_SPDIF_EN | + KIRKWOOD_PLAYCTL_ENABLE_MASK | KIRKWOOD_PLAYCTL_SIZE_MASK); priv->ctl_play |= ctl_play; } else { @@ -243,8 +242,7 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_START: /* configure */ ctl = priv->ctl_play; - value = ctl & ~(KIRKWOOD_PLAYCTL_I2S_EN | - KIRKWOOD_PLAYCTL_SPDIF_EN); + value = ctl & ~KIRKWOOD_PLAYCTL_ENABLE_MASK; writel(value, priv->io + KIRKWOOD_PLAYCTL); /* enable interrupts */ @@ -266,7 +264,7 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, writel(value, priv->io + KIRKWOOD_INT_MASK); /* disable all playbacks */ - ctl &= ~(KIRKWOOD_PLAYCTL_I2S_EN | KIRKWOOD_PLAYCTL_SPDIF_EN); + ctl &= ~KIRKWOOD_PLAYCTL_ENABLE_MASK; writel(ctl, priv->io + KIRKWOOD_PLAYCTL); break; @@ -386,7 +384,7 @@ static int kirkwood_i2s_probe(struct snd_soc_dai *dai) /* disable playback/record */ value = readl(priv->io + KIRKWOOD_PLAYCTL); - value &= ~(KIRKWOOD_PLAYCTL_I2S_EN|KIRKWOOD_PLAYCTL_SPDIF_EN); + value &= ~KIRKWOOD_PLAYCTL_ENABLE_MASK; writel(value, priv->io + KIRKWOOD_PLAYCTL); value = readl(priv->io + KIRKWOOD_RECCTL); |