All of lore.kernel.org
 help / color / mirror / Atom feed
* ioctl32 on ppc64
@ 2004-09-13  1:21 Juergen Kreileder
  2004-09-13 23:38 ` Juergen Kreileder
  2004-09-14 10:39 ` Takashi Iwai
  0 siblings, 2 replies; 7+ messages in thread
From: Juergen Kreileder @ 2004-09-13  1:21 UTC (permalink / raw)
  To: alsa-devel

Hi,

I'm trying to get an Audigy NX working with a ppc64 kernel (2.6.9-rc1)
and 32-bit userland.  ALSA seems to work fine (except for dmix) with
32-bit kernels + 32-bit userland and 64-bit kernels + 64 userland.

With mixed a mixed 32-bit/64-bit environment I wasn't able to run
alsactl/amixer/alsamixer initially:

,----
| ioctl32(alsactl:2581): Unknown cmd fd(3) cmd(c2c85513){02} arg(ffffe6e0) on /dev/snd/controlC0
| ioctl32(amixer:2582): Unknown cmd fd(3) cmd(c2c85512){02} arg(ffffe180) on /dev/snd/controlC0
| ioctl32(alsactl:2584): Unknown cmd fd(3) cmd(c2c85513){02} arg(ffffe6e0) on /dev/snd/controlC0
`----

After removing the packed attribute from struct sndrv_ctl_elem_value32,
32-bit alsactl and alsamixer seem to work fine.

I also can play 48000 Hz wav files with 32-bit aplay now, but playing
41000 Hz stuff only works directly to hw:0,0 (sounds broken).
Doing rate conversion with a plugin defined in .asoundrc works for the
pure 32-bit and 64-bit cases but not for the mixed 32-bit/64-bit case,
it fails with "ALSA lib pcm_hw.c:549:(snd_pcm_hw_start)
SNDRV_PCM_IOCTL_START failed: Broken pipe":

,----
| $ aplay 44100.wav 
| Playing WAVE '44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
| ALSA lib pcm_hw.c:549:(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed: Broken pipe
| Aborted by signal Interrupt...
| jk@fry:~$ aplay -v 44100.wav 
| Playing WAVE '44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
| Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
| Its setup is:
| stream       : PLAYBACK
| access       : RW_INTERLEAVED
| format       : S16_LE
| subformat    : STD
| channels     : 2
| rate         : 44100
| exact rate   : 44100 (44100/1)
| msbits       : 16
| buffer_size  : 15052
| period_size  : 3763
| period_time  : 85333
| tick_time    : 1000
| tstamp_mode  : NONE
| period_step  : 1
| sleep_min    : 0
| avail_min    : 3763
| xfer_align   : 3763
| start_threshold  : 15052
| stop_threshold   : 15052
| silence_threshold: 0
| silence_size : 0
| boundary     : 986447872
| Slave: Hardware PCM card 0 'SB Audigy 2 NX' device 0 subdevice 0
| 
| Its setup is:
| stream       : PLAYBACK
| access       : MMAP_INTERLEAVED
| format       : S16_LE
| subformat    : STD
| channels     : 2
| rate         : 48000
| exact rate   : 48000 (48000/1)
| msbits       : 16
| buffer_size  : 16384
| period_size  : 4096
| period_time  : 85333
| tick_time    : 1000
| tstamp_mode  : NONE
| period_step  : 1
| sleep_min    : 0
| avail_min    : 4096
| xfer_align   : 4096
| start_threshold  : 16384
| stop_threshold   : 16384
| silence_threshold: 0
| silence_size : 0
| boundary     : 0
| ALSA lib pcm_hw.c:549:(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed: Broken pipe
| Aborted by signal Interrupt...
| $ strace aplay 44100.wav
| [...]
| ioctl(4, 0x40104132, 0xffffdf80)        = 0
| ioctl(4, 0x40104132, 0xffffdf80)        = 0
| mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0x40027000
| shmget(IPC_PRIVATE, 61440, 0666)        = 16121856
| shmat(16121856, 0, 0)                   = 0x40037000
| shmctl(16121856, IPC_RMID, 0)           = 0
| ioctl(4, 0x20004140, 0xeb300000)        = 0
| ioctl(4, 0xc0684113, 0x1001fac4)        = 0
| read(3, "\1\0\377\377\1\0\377\377\0\0\0\0\0\0\1\0\377\377\0\0\0"..., 15052) = 15052
| read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\376\377\1\0\0\0\377\377"..., 15052) = 15052
| read(3, "\2\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 15052) = 15052
| read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\377\377\0\0\0"..., 15052) = 15052
| ioctl(4, 0x20004142, 0x1000)            = -1 EPIPE (Broken pipe)
| write(2, "ALSA lib pcm_hw.c:549:(snd_pcm_h"..., 41ALSA lib pcm_hw.c:549:(snd_pcm_hw_start) ) = 41
| write(2, "SNDRV_PCM_IOCTL_START failed", 28SNDRV_PCM_IOCTL_START failed) = 28
| write(2, ": Broken pipe", 13: Broken pipe)           = 13
| write(2, "\n", 1
| )                       = 1
| read(3, "\1\0\376\377\1\0\0\0\0\0\0\0\0\0\1\0\377\377\1\0\376\377"..., 15052) = 15052
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| poll([{fd=4, events=POLLOUT|POLLERR|POLLNVAL, revents=POLLOUT}], 1, -1) = 1
| [...]
`----

Any idea?

BTW, is anybody working on a driver for the built-in soundcard of the
PowerMac G5?


        Juergen

--- sound/core/ioctl32/ioctl32.c.orig   2004-09-13 01:05:44.732947976 +0200
+++ sound/core/ioctl32/ioctl32.c        2004-09-13 01:10:53.208913840 +0200
@@ -246,7 +246,7 @@ struct sndrv_ctl_elem_value32 {
                struct sndrv_aes_iec958 iec958;
         } value;
         unsigned char reserved[128];
-} __attribute__((packed));
+};
 
 
 /* hmm, it's so hard to retrieve the value type from the control id.. */
=

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php

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

* Re: ioctl32 on ppc64
  2004-09-13  1:21 ioctl32 on ppc64 Juergen Kreileder
@ 2004-09-13 23:38 ` Juergen Kreileder
  2004-09-14 10:39 ` Takashi Iwai
  1 sibling, 0 replies; 7+ messages in thread
From: Juergen Kreileder @ 2004-09-13 23:38 UTC (permalink / raw)
  To: alsa-devel

Juergen Kreileder <jk@blackdown.de> writes:

> Doing rate conversion with a plugin defined in .asoundrc works for
> the pure 32-bit and 64-bit cases but not for the mixed 32-bit/64-bit
> case, it fails with "ALSA lib pcm_hw.c:549:(snd_pcm_hw_start)
> SNDRV_PCM_IOCTL_START failed: Broken pipe":

This seems to be related to the mmap mode.  "aplay -vDhw:0 48000.wav"
works both with 32-bit and 64-bit versions of aplay but "aplay
-MvDhw:0 48000.wav" only works with the 64-bit version.  The 32-bit
version fails with:

$ aplay -MvDhw:0 48000.wav 
Playing WAVE '48000.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 0 'SB Audigy 2 NX' device 0 subdevice 0

Its setup is:
stream       : PLAYBACK
access       : MMAP_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 2
rate         : 48000
exact rate   : 48000 (48000/1)
msbits       : 16
buffer_size  : 16384
period_size  : 4096
period_time  : 85333
tick_time    : 1000
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 4096
xfer_align   : 4096
start_threshold  : 16384
stop_threshold   : 16384
silence_threshold: 0
silence_size : 0
boundary     : 0
ALSA lib pcm_hw.c:549:(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed: Broken pipe
Aborted by signal Interrupt...


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php

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

* Re: ioctl32 on ppc64
  2004-09-13  1:21 ioctl32 on ppc64 Juergen Kreileder
  2004-09-13 23:38 ` Juergen Kreileder
@ 2004-09-14 10:39 ` Takashi Iwai
  2004-09-14 14:00   ` Takashi Iwai
  1 sibling, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2004-09-14 10:39 UTC (permalink / raw)
  To: Juergen Kreileder; +Cc: alsa-devel

At Mon, 13 Sep 2004 03:21:07 +0200,
Juergen Kreileder wrote:
> 
> Hi,
> 
> I'm trying to get an Audigy NX working with a ppc64 kernel (2.6.9-rc1)
> and 32-bit userland.  ALSA seems to work fine (except for dmix) with
> 32-bit kernels + 32-bit userland and 64-bit kernels + 64 userland.
> 
> With mixed a mixed 32-bit/64-bit environment I wasn't able to run
> alsactl/amixer/alsamixer initially:
> 
> ,----
> | ioctl32(alsactl:2581): Unknown cmd fd(3) cmd(c2c85513){02} arg(ffffe6e0) on /dev/snd/controlC0
> | ioctl32(amixer:2582): Unknown cmd fd(3) cmd(c2c85512){02} arg(ffffe180) on /dev/snd/controlC0
> | ioctl32(alsactl:2584): Unknown cmd fd(3) cmd(c2c85513){02} arg(ffffe6e0) on /dev/snd/controlC0
> `----
> 
> After removing the packed attribute from struct sndrv_ctl_elem_value32,
> 32-bit alsactl and alsamixer seem to work fine.

Thanks, I'll apply it after checking on x86-64 environment.


> I also can play 48000 Hz wav files with 32-bit aplay now, but playing
> 41000 Hz stuff only works directly to hw:0,0 (sounds broken).
> Doing rate conversion with a plugin defined in .asoundrc works for the
> pure 32-bit and 64-bit cases but not for the mixed 32-bit/64-bit case,
> it fails with "ALSA lib pcm_hw.c:549:(snd_pcm_hw_start)
> SNDRV_PCM_IOCTL_START failed: Broken pipe":

This is likely a problem of size incompatibility of mmapped records.
Sigh, this is a bit touch to fix...


> BTW, is anybody working on a driver for the built-in soundcard of the
> PowerMac G5?

I'd like to do but no time, so far (also no machine).  Sorry.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php

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

* Re: ioctl32 on ppc64
  2004-09-14 10:39 ` Takashi Iwai
@ 2004-09-14 14:00   ` Takashi Iwai
  2004-09-14 14:30     ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2004-09-14 14:00 UTC (permalink / raw)
  To: Juergen Kreileder; +Cc: alsa-devel

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

At Tue, 14 Sep 2004 12:39:48 +0200,
I wrote:
> 
> > I also can play 48000 Hz wav files with 32-bit aplay now, but playing
> > 41000 Hz stuff only works directly to hw:0,0 (sounds broken).
> > Doing rate conversion with a plugin defined in .asoundrc works for the
> > pure 32-bit and 64-bit cases but not for the mixed 32-bit/64-bit case,
> > it fails with "ALSA lib pcm_hw.c:549:(snd_pcm_hw_start)
> > SNDRV_PCM_IOCTL_START failed: Broken pipe":
> 
> This is likely a problem of size incompatibility of mmapped records.
> Sigh, this is a bit touch to fix...

Could you try the attached patch?
With the patch, mmapping of PCM status/control records is disabled
on 32bit mode.


Takashi

[-- Attachment #2: Type: text/plain, Size: 3638 bytes --]

Index: alsa-kernel/core/pcm_native.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/pcm_native.c,v
retrieving revision 1.82
diff -u -r1.82 pcm_native.c
--- alsa-kernel/core/pcm_native.c	6 Sep 2004 12:55:44 -0000	1.82
+++ alsa-kernel/core/pcm_native.c	14 Sep 2004 13:57:38 -0000
@@ -1973,6 +1973,7 @@
 
 	str = substream->pstr;
 	substream->file = pcm_file;
+	substream->no_mmap_ctrl = 0;
 
 	pcm_file->substream = substream;
 
@@ -3158,8 +3159,12 @@
 	offset = area->vm_pgoff << PAGE_SHIFT;
 	switch (offset) {
 	case SNDRV_PCM_MMAP_OFFSET_STATUS:
+		if (substream->no_mmap_ctrl)
+			return -ENXIO;
 		return snd_pcm_mmap_status(substream, file, area);
 	case SNDRV_PCM_MMAP_OFFSET_CONTROL:
+		if (substream->no_mmap_ctrl)
+			return -ENXIO;
 		return snd_pcm_mmap_control(substream, file, area);
 	default:
 		return snd_pcm_mmap_data(substream, file, area);
Index: alsa-kernel/core/ioctl32/ioctl32.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/ioctl32.c,v
retrieving revision 1.25
diff -u -r1.25 ioctl32.c
--- alsa-kernel/core/ioctl32/ioctl32.c	3 Aug 2004 15:03:54 -0000	1.25
+++ alsa-kernel/core/ioctl32/ioctl32.c	14 Sep 2004 10:35:40 -0000
@@ -246,7 +246,7 @@
 		struct sndrv_aes_iec958 iec958;
         } value;
         unsigned char reserved[128];
-} __attribute__((packed));
+};
 
 
 /* hmm, it's so hard to retrieve the value type from the control id.. */
Index: alsa-kernel/core/ioctl32/pcm32.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/pcm32.c,v
retrieving revision 1.22
diff -u -r1.22 pcm32.c
--- alsa-kernel/core/ioctl32/pcm32.c	3 Aug 2004 15:03:54 -0000	1.22
+++ alsa-kernel/core/ioctl32/pcm32.c	14 Sep 2004 13:58:59 -0000
@@ -439,6 +439,30 @@
 
 
 /*
+ * When PCM is used on 32bit mode, we need to disable
+ * mmap of PCM status/control records because of the size
+ * incompatibility.
+ * 
+ * Since INFO ioctl is always called at first, we mark the
+ * mmap-disabling in this ioctl wrapper.
+ */
+static int snd_pcm_info_ioctl32(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *filp)
+{
+	snd_pcm_file_t *pcm_file;
+	snd_pcm_substream_t *substream;
+	if (! filp->f_op || ! filp->f_op->ioctl)
+		return -ENOTTY;
+	pcm_file = file->private_data;
+	if (! pcm_file)
+		return -ENOTTY;
+	substream = pcm_file->substream;
+	if (! substream)
+		return -ENOTTY;
+	substream->no_mmap_ctrl = 1;
+	return filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
+}
+
+/*
  */
 #define AP(x) snd_ioctl32_##x
 
@@ -462,7 +486,8 @@
 
 struct ioctl32_mapper pcm_mappers[] = {
 	MAP_COMPAT(SNDRV_PCM_IOCTL_PVERSION),
-	MAP_COMPAT(SNDRV_PCM_IOCTL_INFO),
+	/* MAP_COMPAT(SNDRV_PCM_IOCTL_INFO), */
+	{ SNDRV_PCM_IOCTL_INFO, snd_pcm_info_ioctl32 },
 	MAP_COMPAT(SNDRV_PCM_IOCTL_TSTAMP),
 	{ SNDRV_PCM_IOCTL_HW_REFINE32, AP(pcm_hw_refine) },
 	{ SNDRV_PCM_IOCTL_HW_PARAMS32, AP(pcm_hw_params) },
Index: alsa-kernel/include/pcm.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/pcm.h,v
retrieving revision 1.48
diff -u -r1.48 pcm.h
--- alsa-kernel/include/pcm.h	6 Sep 2004 12:55:44 -0000	1.48
+++ alsa-kernel/include/pcm.h	14 Sep 2004 11:12:49 -0000
@@ -405,6 +405,8 @@
 	snd_info_entry_t *proc_sw_params_entry;
 	snd_info_entry_t *proc_status_entry;
 	snd_info_entry_t *proc_prealloc_entry;
+	/* misc flags */
+	unsigned int no_mmap_ctrl: 1;
 };
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)

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

* Re: ioctl32 on ppc64
  2004-09-14 14:00   ` Takashi Iwai
@ 2004-09-14 14:30     ` Takashi Iwai
  2004-09-14 15:11       ` Juergen Kreileder
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2004-09-14 14:30 UTC (permalink / raw)
  To: Juergen Kreileder; +Cc: alsa-devel

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

At Tue, 14 Sep 2004 16:00:43 +0200,
I wrote:
> 
> [1  <text/plain; US-ASCII (7bit)>]
> At Tue, 14 Sep 2004 12:39:48 +0200,
> I wrote:
> > 
> > > I also can play 48000 Hz wav files with 32-bit aplay now, but playing
> > > 41000 Hz stuff only works directly to hw:0,0 (sounds broken).
> > > Doing rate conversion with a plugin defined in .asoundrc works for the
> > > pure 32-bit and 64-bit cases but not for the mixed 32-bit/64-bit case,
> > > it fails with "ALSA lib pcm_hw.c:549:(snd_pcm_hw_start)
> > > SNDRV_PCM_IOCTL_START failed: Broken pipe":
> > 
> > This is likely a problem of size incompatibility of mmapped records.
> > Sigh, this is a bit touch to fix...
> 
> Could you try the attached patch?
> With the patch, mmapping of PCM status/control records is disabled
> on 32bit mode.

Sorry, it included a typo.
The fixed patch is below.


Takashi

[-- Attachment #2: Type: text/plain, Size: 3638 bytes --]

Index: alsa-kernel/core/pcm_native.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/pcm_native.c,v
retrieving revision 1.82
diff -u -r1.82 pcm_native.c
--- alsa-kernel/core/pcm_native.c	6 Sep 2004 12:55:44 -0000	1.82
+++ alsa-kernel/core/pcm_native.c	14 Sep 2004 13:57:38 -0000
@@ -1973,6 +1973,7 @@
 
 	str = substream->pstr;
 	substream->file = pcm_file;
+	substream->no_mmap_ctrl = 0;
 
 	pcm_file->substream = substream;
 
@@ -3158,8 +3159,12 @@
 	offset = area->vm_pgoff << PAGE_SHIFT;
 	switch (offset) {
 	case SNDRV_PCM_MMAP_OFFSET_STATUS:
+		if (substream->no_mmap_ctrl)
+			return -ENXIO;
 		return snd_pcm_mmap_status(substream, file, area);
 	case SNDRV_PCM_MMAP_OFFSET_CONTROL:
+		if (substream->no_mmap_ctrl)
+			return -ENXIO;
 		return snd_pcm_mmap_control(substream, file, area);
 	default:
 		return snd_pcm_mmap_data(substream, file, area);
Index: alsa-kernel/core/ioctl32/ioctl32.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/ioctl32.c,v
retrieving revision 1.25
diff -u -r1.25 ioctl32.c
--- alsa-kernel/core/ioctl32/ioctl32.c	3 Aug 2004 15:03:54 -0000	1.25
+++ alsa-kernel/core/ioctl32/ioctl32.c	14 Sep 2004 10:35:40 -0000
@@ -246,7 +246,7 @@
 		struct sndrv_aes_iec958 iec958;
         } value;
         unsigned char reserved[128];
-} __attribute__((packed));
+};
 
 
 /* hmm, it's so hard to retrieve the value type from the control id.. */
Index: alsa-kernel/core/ioctl32/pcm32.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/pcm32.c,v
retrieving revision 1.22
diff -u -r1.22 pcm32.c
--- alsa-kernel/core/ioctl32/pcm32.c	3 Aug 2004 15:03:54 -0000	1.22
+++ alsa-kernel/core/ioctl32/pcm32.c	14 Sep 2004 14:27:51 -0000
@@ -439,6 +439,30 @@
 
 
 /*
+ * When PCM is used on 32bit mode, we need to disable
+ * mmap of PCM status/control records because of the size
+ * incompatibility.
+ * 
+ * Since INFO ioctl is always called at first, we mark the
+ * mmap-disabling in this ioctl wrapper.
+ */
+static int snd_pcm_info_ioctl32(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *filp)
+{
+	snd_pcm_file_t *pcm_file;
+	snd_pcm_substream_t *substream;
+	if (! filp->f_op || ! filp->f_op->ioctl)
+		return -ENOTTY;
+	pcm_file = filp->private_data;
+	if (! pcm_file)
+		return -ENOTTY;
+	substream = pcm_file->substream;
+	if (! substream)
+		return -ENOTTY;
+	substream->no_mmap_ctrl = 1;
+	return filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
+}
+
+/*
  */
 #define AP(x) snd_ioctl32_##x
 
@@ -462,7 +486,8 @@
 
 struct ioctl32_mapper pcm_mappers[] = {
 	MAP_COMPAT(SNDRV_PCM_IOCTL_PVERSION),
-	MAP_COMPAT(SNDRV_PCM_IOCTL_INFO),
+	/* MAP_COMPAT(SNDRV_PCM_IOCTL_INFO), */
+	{ SNDRV_PCM_IOCTL_INFO, snd_pcm_info_ioctl32 },
 	MAP_COMPAT(SNDRV_PCM_IOCTL_TSTAMP),
 	{ SNDRV_PCM_IOCTL_HW_REFINE32, AP(pcm_hw_refine) },
 	{ SNDRV_PCM_IOCTL_HW_PARAMS32, AP(pcm_hw_params) },
Index: alsa-kernel/include/pcm.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/pcm.h,v
retrieving revision 1.48
diff -u -r1.48 pcm.h
--- alsa-kernel/include/pcm.h	6 Sep 2004 12:55:44 -0000	1.48
+++ alsa-kernel/include/pcm.h	14 Sep 2004 11:12:49 -0000
@@ -405,6 +405,8 @@
 	snd_info_entry_t *proc_sw_params_entry;
 	snd_info_entry_t *proc_status_entry;
 	snd_info_entry_t *proc_prealloc_entry;
+	/* misc flags */
+	unsigned int no_mmap_ctrl: 1;
 };
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)

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

* Re: ioctl32 on ppc64
  2004-09-14 14:30     ` Takashi Iwai
@ 2004-09-14 15:11       ` Juergen Kreileder
  2004-09-15  9:31         ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Juergen Kreileder @ 2004-09-14 15:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai <tiwai@suse.de> writes:

> At Tue, 14 Sep 2004 16:00:43 +0200,
> I wrote:
>> Could you try the attached patch?
>> With the patch, mmapping of PCM status/control records is disabled
>> on 32bit mode.
>
> Sorry, it included a typo.
> The fixed patch is below.

Thanks, it works now!
I just had to make one small fix:

--- sound/core/ioctl32/pcm32.c.orig     2004-09-14 17:01:41.817995464 +0200
+++ sound/core/ioctl32/pcm32.c  2004-09-14 17:01:48.864989384 +0200
@@ -480,7 +480,7 @@ enum {
        SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32),
        SNDRV_PCM_IOCTL_HW_REFINE_OLD32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old32),
        SNDRV_PCM_IOCTL_HW_PARAMS_OLD32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old32),
-       SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr),
+       SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr32),
 
 };
 
=

So rate conversion now works in the mixed 32-/64-bit environment.
dmix still doesn't work but that happens in pure 32-bit and 64-bit
environments too.


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m

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

* Re: Re: ioctl32 on ppc64
  2004-09-14 15:11       ` Juergen Kreileder
@ 2004-09-15  9:31         ` Takashi Iwai
  0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2004-09-15  9:31 UTC (permalink / raw)
  To: Juergen Kreileder; +Cc: alsa-devel

At Tue, 14 Sep 2004 17:11:37 +0200,
Juergen Kreileder wrote:
> 
> Takashi Iwai <tiwai@suse.de> writes:
> 
> > At Tue, 14 Sep 2004 16:00:43 +0200,
> > I wrote:
> >> Could you try the attached patch?
> >> With the patch, mmapping of PCM status/control records is disabled
> >> on 32bit mode.
> >
> > Sorry, it included a typo.
> > The fixed patch is below.
> 
> Thanks, it works now!
> I just had to make one small fix:

All patches have been applied to CVS now.
Thanks for testing!


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m

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

end of thread, other threads:[~2004-09-15  9:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-13  1:21 ioctl32 on ppc64 Juergen Kreileder
2004-09-13 23:38 ` Juergen Kreileder
2004-09-14 10:39 ` Takashi Iwai
2004-09-14 14:00   ` Takashi Iwai
2004-09-14 14:30     ` Takashi Iwai
2004-09-14 15:11       ` Juergen Kreileder
2004-09-15  9:31         ` 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.