This is a note to let you know that I've just added the patch titled
ALSA: Fix SNDCTL_DSP_RESET ioctl for OSS emulation
to the 2.6.36-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-fix-sndctl_dsp_reset-ioctl-for-oss-emulation.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 60686aa0086a14f8b15c83a09f3df1eebe3aab3c Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Tue, 30 Nov 2010 08:14:21 +0100
Subject: ALSA: Fix SNDCTL_DSP_RESET ioctl for OSS emulation
From: Takashi Iwai <[email protected]>
commit 60686aa0086a14f8b15c83a09f3df1eebe3aab3c upstream.
In OSS emulation, SNDCTL_DSP_RESET ioctl needs the reset of the internal
buffer state in addition to drop of the running streams. Otherwise the
succeeding access becomes inconsistent.
Tested-by: Amit Nagal <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
sound/core/oss/pcm_oss.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1510,16 +1510,19 @@ static ssize_t snd_pcm_oss_read1(struct
static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file)
{
struct snd_pcm_substream *substream;
+ struct snd_pcm_runtime *runtime;
+ int i;
- substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
- if (substream != NULL) {
+ for (i = 0; i < 2; i++) {
+ substream = pcm_oss_file->streams[i];
+ if (!substream)
+ continue;
+ runtime = substream->runtime;
snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
- substream->runtime->oss.prepare = 1;
- }
- substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
- if (substream != NULL) {
- snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
- substream->runtime->oss.prepare = 1;
+ runtime->oss.prepare = 1;
+ runtime->oss.buffer_used = 0;
+ runtime->oss.prev_hw_ptr_period = 0;
+ runtime->oss.period_ptr = 0;
}
return 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.36/alsa-hda-use-alc_init_default-for-really-default-initialization.patch
queue-2.6.36/alsa-hda-disable-sticky-pcm-stream-assignment-for-ad-codecs.patch
queue-2.6.36/alsa-hda-enable-internal-mic-on-dell-e6410-and-dell-e6510.patch
queue-2.6.36/alsa-hda-fixed-alc887-vd-initial-error.patch
queue-2.6.36/alsa-ac97-apply-quirk-for-dell-latitude-d610-binding-master-and-headphone-controls.patch
queue-2.6.36/alsa-hda-add-workarounds-for-ct-ibg-controllers.patch
queue-2.6.36/alsa-hda-add-an-extra-dac-for-realtek-alc887-vd.patch
queue-2.6.36/alsa-hda-use-hp-laptop-quirk-to-enable-headphones-automute-for-asus-a52j.patch
queue-2.6.36/alsa-hda-use-alienware-model-quirk-for-another-ssid.patch
queue-2.6.36/alsa-hda-fix-wrong-spdif-nid-assignment-for-ca0110.patch
queue-2.6.36/alsa-hda-add-fixup-pins-for-ideapad-y550.patch
queue-2.6.36/alsa-hda-fix-alc660-vd-alc861-vd-capture-playback-mixers.patch
queue-2.6.36/alsa-hda-add-samsung-r720-ssid-for-subwoofer-pin-fixup.patch
queue-2.6.36/alsa-fix-sndctl_dsp_reset-ioctl-for-oss-emulation.patch
queue-2.6.36/alsa-hda-add-speaker-pin-to-automute-acer-aspire-8943g.patch
queue-2.6.36/alsa-hda-add-some-workarounds-for-creative-ibg.patch
queue-2.6.36/alsa-hda-use-bios-auto-parsing-instead-of-existing-model-quirk-for-medion-md2.patch
queue-2.6.36/alsa-hda-added-fixup-for-lenovo-y550p.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable