diff options
author | Wan ZongShun <mcuos.com@gmail.com> | 2010-06-02 01:54:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-06-02 06:47:06 -0400 |
commit | 018334c045c95793ab58948fe1f63282459c4f8d (patch) | |
tree | afc1618892d81dc16b04d060f1cc24cb0fc46fe5 /sound/soc/nuc900/nuc900-ac97.c | |
parent | 1fab79b8a1bf0d46a7c7e6a1c06dbed1803f403c (diff) |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index f7b44e081420..e1634a2f1701 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, | |||
222 | int cmd, struct snd_soc_dai *dai) | 222 | int cmd, struct snd_soc_dai *dai) |
223 | { | 223 | { |
224 | struct nuc900_audio *nuc900_audio = nuc900_ac97_data; | 224 | struct nuc900_audio *nuc900_audio = nuc900_ac97_data; |
225 | int ret, stype = SUBSTREAM_TYPE(substream); | 225 | int ret; |
226 | unsigned long val, tmp; | 226 | unsigned long val, tmp; |
227 | 227 | ||
228 | ret = 0; | 228 | ret = 0; |
@@ -231,7 +231,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream, | |||
231 | case SNDRV_PCM_TRIGGER_START: | 231 | case SNDRV_PCM_TRIGGER_START: |
232 | case SNDRV_PCM_TRIGGER_RESUME: | 232 | case SNDRV_PCM_TRIGGER_RESUME: |
233 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); | 233 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); |
234 | if (PCM_TX == stype) { | 234 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
235 | tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACOS0); | 235 | tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACOS0); |
236 | tmp |= (SLOT3_VALID | SLOT4_VALID | VALID_FRAME); | 236 | tmp |= (SLOT3_VALID | SLOT4_VALID | VALID_FRAME); |
237 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACOS0, tmp); | 237 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACOS0, tmp); |
@@ -254,7 +254,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream, | |||
254 | case SNDRV_PCM_TRIGGER_STOP: | 254 | case SNDRV_PCM_TRIGGER_STOP: |
255 | case SNDRV_PCM_TRIGGER_SUSPEND: | 255 | case SNDRV_PCM_TRIGGER_SUSPEND: |
256 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); | 256 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_RESET); |
257 | if (PCM_TX == stype) { | 257 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
258 | tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACOS0); | 258 | tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACOS0); |
259 | tmp &= ~(SLOT3_VALID | SLOT4_VALID); | 259 | tmp &= ~(SLOT3_VALID | SLOT4_VALID); |
260 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACOS0, tmp); | 260 | AUDIO_WRITE(nuc900_audio->mmio + ACTL_ACOS0, tmp); |