[alsa-devel] [PATCH 0/1] HDSPM: ioctl_compat
Hi!
There is a one-line patch in my patch-queue that enables 32bit applications that access RME specific ioctls to be run on 64bit kernels.
I only had a little test program that worked flawlessly (it solely tested SNDRV_HDSPM_IOCTL_GET_PEAK_RMS), but the IOSONO guys said they've tried the patch and it solves their problem (initial bug report was also from IOSONO).
Cheers
Adrian Knoth (1): ALSA: hdspm - Provide ioctl_compat
sound/pci/rme9652/hdspm.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
snd_hdspm uses its own ioctls to acquire config- and status information. Expose the corresponding ioctl handler via ioctl_compat, so that 32bit applications can use it on 64bit kernels.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 942cbe6..603cfc5 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6345,6 +6345,7 @@ static int __devinit snd_hdspm_create_hwdep(struct snd_card *card,
hw->ops.open = snd_hdspm_hwdep_dummy_op; hw->ops.ioctl = snd_hdspm_hwdep_ioctl; + hw->ops.ioctl_compat = snd_hdspm_hwdep_ioctl; hw->ops.release = snd_hdspm_hwdep_dummy_op;
return 0;
At Thu, 8 Mar 2012 15:38:04 +0100, Adrian Knoth wrote:
snd_hdspm uses its own ioctls to acquire config- and status information. Expose the corresponding ioctl handler via ioctl_compat, so that 32bit applications can use it on 64bit kernels.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
Applied now. Thanks.
We can make the hwdep ioctl compat handler to use ioctl if ioctl_compat is NULL. It'd work in most cases like this. But some driver may not allow the compat, so it's not entirely safe until we investigate through the tree...
Takashi
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 942cbe6..603cfc5 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6345,6 +6345,7 @@ static int __devinit snd_hdspm_create_hwdep(struct snd_card *card,
hw->ops.open = snd_hdspm_hwdep_dummy_op; hw->ops.ioctl = snd_hdspm_hwdep_ioctl;
hw->ops.ioctl_compat = snd_hdspm_hwdep_ioctl; hw->ops.release = snd_hdspm_hwdep_dummy_op;
return 0;
-- 1.7.9.1
participants (2)
-
Adrian Knoth
-
Takashi Iwai