summaryrefslogtreecommitdiffstats
path: root/sound/soc/nuc900/nuc900-ac97.c
diff options
context:
space:
mode:
authorWan ZongShun <mcuos.com@gmail.com>2010-06-02 13:54:25 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-06-02 11:47:06 +0100
commit018334c045c95793ab58948fe1f63282459c4f8d (patch)
treeafc1618892d81dc16b04d060f1cc24cb0fc46fe5 /sound/soc/nuc900/nuc900-ac97.c
parent1fab79b8a1bf0d46a7c7e6a1c06dbed1803f403c (diff)
downloadop-kernel-dev-018334c045c95793ab58948fe1f63282459c4f8d.zip
op-kernel-dev-018334c045c95793ab58948fe1f63282459c4f8d.tar.gz
ASoC: nuc900: patch for SUBSTREAM_TYPE', 'PCM_TX' and 'PCM_RX' removal
This patch is to remove the 'SUBSTREAM_TYPE','PCM_TX' and 'PCM_RX' definition. There is no need to redefine SNDRV_PCM_STREAM_PLAYBACK as PCM_TX, the SUBSTREAM_TYPE(substream) can be deleted too, the playback or record can be judged by 'if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)' directly rather than 'if (PCM_TX == stype)', which makes the codes easy to read. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/nuc900/nuc900-ac97.c')
-rw-r--r--sound/soc/nuc900/nuc900-ac97.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index f7b44e0..e1634a2 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -222,7 +222,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct nuc900_audio *nuc900_audio = nuc900_ac97_data;
- int ret, stype = SUBSTREAM_TYPE(substream);
+ int ret;
unsigned long val, tmp;
ret = 0;
@@ -231,7 +231,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET);
- if (PCM_TX == stype) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACOS0);
tmp |= (SLOT3_VALID | SLOT4_VALID | VALID_FRAME);
AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACOS0, tmp);
@@ -254,7 +254,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET);
- if (PCM_TX == stype) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACOS0);
tmp &= ~(SLOT3_VALID | SLOT4_VALID);
AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACOS0, tmp);
OpenPOWER on IntegriCloud