Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "István Váradi" <ivaradi@gmail.com>
To: alsa-devel@lists.sourceforge.net
Subject: ALSA on AMD64 with a 32-bit userspace
Date: Fri, 22 Apr 2005 11:04:53 +0200	[thread overview]
Message-ID: <dbdd6db90504220204e2f80ac@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]

Hi,

I am using ALSA with a 64-bit AMD64 kernel (2.6.11) but with 32-bit
applications. While trying to use Rosegarden4 (with JACK and
Fluidsynth), I encountered some problems:

- some sequencer-related ioctl's did not work correctly because the
kernel member of seq_port_info structure was not initialized. I
attached a patch that initializes this to 0.

- start the playback with snd_pcm_hw_start failed with -EPIPE, because
some pointers were not updated. I attached a patch for alsa-lib 1.0.8,
in which sync_ptr is called before SNDRV_PCM_IOCTL_START. It seems to
solve the problem, though I don't know alsa-lib enough to be sure that
this is the right solution...

With these patches playback works, but JACK always reports xruns,
whereas there aren't any. I discovered that the xruns are detected in
the alsa_driver_wait function in alsa_driver.c (in JACK) returns 0,
because the snd_pcm_avail_update calls in that function return 0.
Putting sync_ptr into snd_pcm_avail_update does not seem to solve the
problem.

JACK works properly when run with a 32-bit kernel or when compiled
into a 64-bit executable.

Could you give me some hints as to what can I try? Or what can I do to
help you debugging this problem? (Please reply to me directly, since I
am not on the list).

Thanks,

István

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: alsa-ioctl32-2.6.11.patch --]
[-- Type: text/x-patch; name="alsa-ioctl32-2.6.11.patch", Size: 281 bytes --]

--- sound/core/ioctl32/seq32.c.orig	2005-03-02 08:38:33.000000000 +0100
+++ sound/core/ioctl32/seq32.c	2005-04-16 16:39:02.000000000 +0200
@@ -59,6 +59,7 @@
 	COPY(write_use);\
 	COPY(flags);\
 	COPY(time_queue);\
+        dst->kernel = 0;\
 }
 
 DEFINE_ALSA_IOCTL(seq_port_info);

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: alsa_pcm_hw.patch --]
[-- Type: text/x-patch; name="alsa_pcm_hw.patch", Size: 385 bytes --]

--- src/pcm/pcm_hw.c.orig	2004-12-21 15:11:02.000000000 +0100
+++ src/pcm/pcm_hw.c	2005-04-16 19:09:11.000000000 +0200
@@ -543,6 +543,7 @@
 	assert(pcm->stream != SND_PCM_STREAM_PLAYBACK ||
 	       snd_pcm_mmap_playback_hw_avail(pcm) > 0);
 #endif
+        sync_ptr(hw, 0);
 	if (ioctl(hw->fd, SNDRV_PCM_IOCTL_START) < 0) {
 		err = -errno;
 		SYSMSG("SNDRV_PCM_IOCTL_START failed");

             reply	other threads:[~2005-04-22  9:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-22  9:04 István Váradi [this message]
2005-05-13 14:21 ` ALSA on AMD64 with a 32-bit userspace Takashi Iwai

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=dbdd6db90504220204e2f80ac@mail.gmail.com \
    --to=ivaradi@gmail.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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