All of lore.kernel.org
 help / color / mirror / Atom feed
* ALSA on AMD64 with a 32-bit userspace
@ 2005-04-22  9:04 István Váradi
  2005-05-13 14:21 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: István Váradi @ 2005-04-22  9:04 UTC (permalink / raw)
  To: alsa-devel

[-- 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");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-13 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22  9:04 ALSA on AMD64 with a 32-bit userspace István Váradi
2005-05-13 14:21 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.