From: Takashi Iwai Subject: Re: strace and ALSA ioctls Date: Thu, 18 May 2006 17:47:56 +0200 Message-ID: References: <1147966909.12531.65.camel@mindpipe> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1147966909.12531.65.camel@mindpipe> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Lee Revell Cc: alsa-devel List-Id: alsa-devel@alsa-project.org At Thu, 18 May 2006 11:41:48 -0400, Lee Revell wrote: > > I have never seen strace correctly identify a single ALSA ioctl. This > makes debugging a serious PITA. Is it fixable? Quite unlikely. Some ioctl commands are indeed identical with these USBDEVFS_*. This happened since we didn't care about the collision and found it too late. In the kernel side this is no problem because the ioctl cmd is bound to each driver's ioctl op. But, from user-space, there is no way to distinguish properly. Takashi > > ioctl(3, USBDEVFS_CONTROL, 0xbfe13958) = 0 > ioctl(3, UI_DEV_CREATE, 0xbfe13a70) = 0 > close(3) = 0 > stat64("/usr/share/alsa/alsa.conf", {st_mode=S_IFREG|0644, > st_size=7501, ...}) = 0 > open("/dev/snd/controlC0", O_RDONLY) = 3 > close(3) = 0 > open("/dev/snd/controlC0", O_RDWR) = 3 > ioctl(3, USBDEVFS_CONTROL, 0xbfe138f8) = 0 > fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) > fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 > ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbfe139e4) = 0 > ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbfe139e4) = 0 > ioctl(3, USBDEVFS_CONNECTINFO, 0xbfe136d0) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13230) = 0 > ioctl(3, USBDEVFS_CONNECTINFO, 0xbfe136d0) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13230) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13230) = 0 > ioctl(3, USBDEVFS_CONNECTINFO, 0xbfe136d0) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13250) = 0 > ioctl(3, USBDEVFS_CONNECTINFO, 0xbfe136d0) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13230) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13230) = 0 > ioctl(3, USBDEVFS_CONNECTINFO, 0xbfe136d0) = 0 > ioctl(3, USBDEVFS_IOCTL, 0xbfe13250) = 0 > > etc > > Lee > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642