[alsa-devel] multi-channel playback regression
Takashi Iwai
tiwai at suse.de
Thu Jul 23 13:30:42 CEST 2009
At Thu, 23 Jul 2009 13:29:21 +0200,
I wrote:
>
> At Thu, 23 Jul 2009 10:39:04 +0200 (CEST),
> Jaroslav Kysela wrote:
> >
> > On Thu, 23 Jul 2009, Takashi Iwai wrote:
> >
> > > At Thu, 23 Jul 2009 10:14:27 +0200 (CEST),
> > > Jaroslav Kysela wrote:
> > >>
> > >> On Thu, 23 Jul 2009, Wu Fengguang wrote:
> > >>
> > >>>> Is this with the patched (as is on sound git tree) kernel?
> > >>>
> > >>> Yes, it's unmodified latest git tree.
> > >>>
> > >>>> What if changing from #if 1 to #if 0?
> > >>>
> > >>> This makes 8-channel playback work again.
> > >>
> > >> Can we check if we running under VMWare at runtime?
> > >
> > > No idea. But, an option to allow to choose manually might be usefl
> > > for other broken hardwares that require a similar fallback like
> > > VMware, although this doesn't conflict with the automatic detection
> > > of vmware.
> >
> > Yes, maybe a sysfs attribute might be useful.
>
> How about the patch below?
> This is in sound-unstable tree fix/pcm-hwptr-debug branch.
And VMware check patch is below.
Note that it's totally untested and I'm really not sure whether this
works...
This patch is also on fix/pcm-hwptr-debug branch of sound-unstable
tree.
thanks,
Takashi
===
From f5a9b7ddd3bd3db496f93ef2a4f1b95531d28a51 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai at suse.de>
Date: Thu, 23 Jul 2009 13:24:49 +0200
Subject: [PATCH] ALSA: pcm - Add VMware workaround
Enable the VMware workaround again by checking boot_cpu_data
x86_hyper_vendor field.
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/core/pcm.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 15502af..a637dc4 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -28,6 +28,10 @@
#include <sound/pcm.h>
#include <sound/control.h>
#include <sound/info.h>
+/* for VMware check */
+#ifdef CONFIG_X86
+#include <asm/processor.h>
+#endif
MODULE_AUTHOR("Jaroslav Kysela <perex at perex.cz>, Abramo Bagnara <abramo at alsa-project.org>");
MODULE_DESCRIPTION("Midlevel PCM code for ALSA.");
@@ -730,6 +734,11 @@ int snd_pcm_new(struct snd_card *card, const char *id, int device,
snd_pcm_free(pcm);
return err;
}
+#ifdef CONFIG_X86
+ /* workaround for VMware */
+ if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE)
+ pcm->filter_bogus_irq = 1;
+#endif
if (rpcm)
*rpcm = pcm;
return 0;
--
1.6.3.3
More information about the Alsa-devel
mailing list