Hi Yair, This makes perfect sense. Will appear in the hg server soon.
Best regards, Hannu --------- Yair K. wrote: > Hi, > > I discovered something of interest: A 32bit ossmix on a 64bit Linux system > will fail ("Error: OSS version 3.9 or later is required"). I believe what > happens is that since 2.6.11 64bit Linux expects drivers to declare a > compat_ioctl function pointer in order to get 32bit ioctls ( > http://lwn.net/Articles/119652/ ). The compact_ioctl function does the > neccesary translation of data structures back and forth while calling the > real ioctl. Since the kernel still has OSS, it lets most SNDCTL_DSP_* calls > through anyway (see fs/compat_ioctl.c), but the new mixer API calls get > something like "ioctl32(ossmix32:3339): Unknown cmd fd(3) > cmd(c470580a){t:'X';sz:1136} arg(f3cde50c) on /dev/mixer" in dmesg... > > The attached patch declares the compat_ioctl and unlocked_ioctl (on that in > a moment) members, so that 32bit mixer clients will work. There are several > important notes per the LWN article: > A. unlocked_ioctl is a new member. It's a regular ioctl, except: > 1. No inode member (oss_cdev_ioctl didn't use it anyway). > 2. No giant lock before the ioctl (OSS has its own locking. It seems > to work fine, but I haven't tested it heavily). > 3. The kernel will call unlocked_ioctl instead of ioctl if it exists > compat_ioctl has 1&2 properties as well, so OSS might as well use > unlocked too.. > B. I don't think OSS API passes any structure which are incompatible > between 32 and 64bit, so I just had compat_ioctl call oss_cdev_ioctl. All > structures use fields with the same meaning across 32bit/64bit systems, and I > don't see any padding issues, but I could have missed something... > > Yours, > Yair K. > > ------------------------------------------------------------------------ > > _______________________________________________ > oss-devel mailing list > oss-devel@mailman.opensound.com > http://mailman.opensound.com/mailman/listinfo/oss-devel _______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel