At Fri, 1 Oct 2010 14:57:28 -0700, Peter Hsiang wrote:
On Fri, Oct 01, 2010, Takashi Iwai wrote:
At Fri, 1 Oct 2010 00:12:34 -0700, Mark Brown wrote:
On Fri, Oct 01, 2010 at 08:56:25AM +0200, Clemens Ladisch wrote:
If the firmware isn't needed when initialzing the device, you can add some ioctl that makes the driver call request_firmware() (this basically assumes that the data is stored in a file with a known name), or just add some device that allows userspace to write data to the device (use this for dynamic data).
Thanks Clemens, Takashi and Mark for the good comments. Does ALSA use ioctl to implement its ALSA control elements?
Yes, but you can't add your own ioctl for control API. The API already provides the (small fixed-size) byte array communication.
To add an ioctl entry, would one expand on an existing list of ioctls in ALSA, or would it be a fresh set of open/read/write/ioctl implemented in the codec driver?
If you need own syscalls, implement freely using other method, such as ALSA hwdep device or whatever you like. But, of course, it will be unportable since you define a new API set there.
Takashi