Am Dienstag, 15. April 2008 schrieb Takashi Iwai:
+#endif
+#define USB_STREAM_NURBS 4 +struct usb_stream_config {
- unsigned version;
- unsigned sample_rate;
- unsigned period_frames;
- unsigned frame_size;
+};
The codes below here should be hidden to user-space. If it's exported, then prepare more explicit struct. For example, pointers may have different sizes on user-space.
Needed in user-space. Currently only 64Bit userspace works on 64Bit kernel. Also 32bit user-space on 32bit kernel. 32bit user-space on 64bit kernel returns an error to the caller, please see the plugin. IMO 32bit user-space working on 64bit kernel can wait for "INTERFACE_VERSION 2"
Exporting this kind of particular internal struct to the user-space is very dangerous.
Everything exported by that struct can only be mmap()ed "read only". Please explain why you think its very dangerous.
This shouldn't be done. If a part of the data struct is needed to be accessible via mmap etc, define explicitly the data struct instead.
Nearly all of the data struct is used by the user-space plugin.
thanks, Karsten