summaryrefslogtreecommitdiffstats
path: root/sound/soc/kirkwood/kirkwood-i2s.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-06-26 15:23:20 +0100
committerMark Brown <broonie@linaro.org>2014-06-28 13:18:46 +0100
commit920ec4e595faf89f7db022a068a4729a4d2c48ae (patch)
treef82ac9e0ac61eac897e602779cad88c90a41b0f9 /sound/soc/kirkwood/kirkwood-i2s.c
parenta622251c01b628cbbd1b02a877a6469303ec2b58 (diff)
downloadblackbird-op-linux-920ec4e595faf89f7db022a068a4729a4d2c48ae.tar.gz
blackbird-op-linux-920ec4e595faf89f7db022a068a4729a4d2c48ae.zip
ASoC: kirkwood: implement NO_PERIOD_WAKEUP support
Permit ALSA to run without hardware interrupts from the audio interface. Instead, ALSA will use a kernel timer to decide when to check the buffer state, resulting in a lighter workload for the CPU. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Andrew Lunn <andrew@lunn.ch> 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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index e98650c01eba..0704cd6d2314 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -234,6 +234,7 @@ static unsigned kirkwood_i2s_play_mute(unsigned ctl)
static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai);
uint32_t ctl, value;
@@ -271,9 +272,11 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream,
writel(value, priv->io + KIRKWOOD_PLAYCTL);
/* enable interrupts */
- value = readl(priv->io + KIRKWOOD_INT_MASK);
- value |= KIRKWOOD_INT_CAUSE_PLAY_BYTES;
- writel(value, priv->io + KIRKWOOD_INT_MASK);
+ if (!runtime->no_period_wakeup) {
+ value = readl(priv->io + KIRKWOOD_INT_MASK);
+ value |= KIRKWOOD_INT_CAUSE_PLAY_BYTES;
+ writel(value, priv->io + KIRKWOOD_INT_MASK);
+ }
/* enable playback */
writel(ctl, priv->io + KIRKWOOD_PLAYCTL);
OpenPOWER on IntegriCloud