Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: multi-channel playback regression
Date: Thu, 23 Jul 2009 13:30:42 +0200	[thread overview]
Message-ID: <s5hws5zy6u5.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hy6qfy6we.wl%tiwai@suse.de>

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@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@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@perex.cz>, Abramo Bagnara <abramo@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

  reply	other threads:[~2009-07-23 11:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23  6:53 multi-channel playback regression Wu Fengguang
2009-07-23  7:01 ` Takashi Iwai
2009-07-23  7:08   ` Wu Fengguang
2009-07-23  7:22   ` Wu Fengguang
2009-07-23  7:30     ` Takashi Iwai
2009-07-23  7:56       ` Wu Fengguang
2009-07-23  8:14         ` Jaroslav Kysela
2009-07-23  8:21           ` Takashi Iwai
2009-07-23  8:39             ` Jaroslav Kysela
2009-07-23 11:29               ` Takashi Iwai
2009-07-23 11:30                 ` Takashi Iwai [this message]
2009-07-23 11:31                 ` Jaroslav Kysela
2009-07-23  8:15         ` Takashi Iwai
2009-07-23  8:33           ` Wu Fengguang
2009-07-23  8:36             ` Takashi Iwai
2009-07-23  8:37               ` Jaroslav Kysela
2009-07-23 11:31                 ` Takashi Iwai
2009-07-24  5:29           ` Wu Fengguang
2009-07-23 14:30         ` Takashi Iwai
2009-07-23 14:36           ` Jaroslav Kysela
2009-07-23 14:42             ` Takashi Iwai
2009-07-24  5:32           ` Wu Fengguang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hws5zy6u5.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=fengguang.wu@intel.com \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox