diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-01 09:58:10 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-01 09:58:10 -0500 |
commit | 75639e7ee1401b3876c7a00ffe96ea8027668690 (patch) | |
tree | 3d6813cd3fe0d974e0a40237d003a22c5f7438dd /sound/core | |
parent | 7584af10cf46e0f4aa1696f1be79fa0f19a945ba (diff) | |
parent | ad1cd745060ae2f24026b3b3d09da3426df6ab36 (diff) |
Merge branch 'topic/beep-rename' into topic/core-change
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/isadma.c | 10 | ||||
-rw-r--r-- | sound/core/oss/mixer_oss.c | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sound/core/isadma.c b/sound/core/isadma.c index 79f0f16af339..950e19ba91fc 100644 --- a/sound/core/isadma.c +++ b/sound/core/isadma.c | |||
@@ -85,16 +85,24 @@ EXPORT_SYMBOL(snd_dma_disable); | |||
85 | unsigned int snd_dma_pointer(unsigned long dma, unsigned int size) | 85 | unsigned int snd_dma_pointer(unsigned long dma, unsigned int size) |
86 | { | 86 | { |
87 | unsigned long flags; | 87 | unsigned long flags; |
88 | unsigned int result; | 88 | unsigned int result, result1; |
89 | 89 | ||
90 | flags = claim_dma_lock(); | 90 | flags = claim_dma_lock(); |
91 | clear_dma_ff(dma); | 91 | clear_dma_ff(dma); |
92 | if (!isa_dma_bridge_buggy) | 92 | if (!isa_dma_bridge_buggy) |
93 | disable_dma(dma); | 93 | disable_dma(dma); |
94 | result = get_dma_residue(dma); | 94 | result = get_dma_residue(dma); |
95 | /* | ||
96 | * HACK - read the counter again and choose higher value in order to | ||
97 | * avoid reading during counter lower byte roll over if the | ||
98 | * isa_dma_bridge_buggy is set. | ||
99 | */ | ||
100 | result1 = get_dma_residue(dma); | ||
95 | if (!isa_dma_bridge_buggy) | 101 | if (!isa_dma_bridge_buggy) |
96 | enable_dma(dma); | 102 | enable_dma(dma); |
97 | release_dma_lock(flags); | 103 | release_dma_lock(flags); |
104 | if (unlikely(result < result1)) | ||
105 | result = result1; | ||
98 | #ifdef CONFIG_SND_DEBUG | 106 | #ifdef CONFIG_SND_DEBUG |
99 | if (result > size) | 107 | if (result > size) |
100 | snd_printk(KERN_ERR "pointer (0x%x) for DMA #%ld is greater than transfer size (0x%x)\n", result, dma, size); | 108 | snd_printk(KERN_ERR "pointer (0x%x) for DMA #%ld is greater than transfer size (0x%x)\n", result, dma, size); |
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 772423889eb3..54e2eb56e4c2 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c | |||
@@ -1251,7 +1251,9 @@ static void snd_mixer_oss_build(struct snd_mixer_oss *mixer) | |||
1251 | { SOUND_MIXER_SYNTH, "FM", 0 }, /* fallback */ | 1251 | { SOUND_MIXER_SYNTH, "FM", 0 }, /* fallback */ |
1252 | { SOUND_MIXER_SYNTH, "Music", 0 }, /* fallback */ | 1252 | { SOUND_MIXER_SYNTH, "Music", 0 }, /* fallback */ |
1253 | { SOUND_MIXER_PCM, "PCM", 0 }, | 1253 | { SOUND_MIXER_PCM, "PCM", 0 }, |
1254 | { SOUND_MIXER_SPEAKER, "PC Speaker", 0 }, | 1254 | { SOUND_MIXER_SPEAKER, "Beep", 0 }, |
1255 | { SOUND_MIXER_SPEAKER, "PC Speaker", 0 }, /* fallback */ | ||
1256 | { SOUND_MIXER_SPEAKER, "Speaker", 0 }, /* fallback */ | ||
1255 | { SOUND_MIXER_LINE, "Line", 0 }, | 1257 | { SOUND_MIXER_LINE, "Line", 0 }, |
1256 | { SOUND_MIXER_MIC, "Mic", 0 }, | 1258 | { SOUND_MIXER_MIC, "Mic", 0 }, |
1257 | { SOUND_MIXER_CD, "CD", 0 }, | 1259 | { SOUND_MIXER_CD, "CD", 0 }, |