[alsa-devel] Hardware-specific IOCTLs
ivanbublikov at yahoo.com
Fri Jan 13 23:45:46 CET 2012
> From: Clemens Ladisch <clemens at ladisch.de>
> Ivan Bublikov wrote:
>> As an HDA codec vendor, I want to be able to control some functionality
>> in my codec, that is not present in codecs from other vendors. [...]
>> I can register an IOCTL handler using snd_ctl_register_ioctl.
> This functions is for ioctl calls on the ctl device, which is global
> for one sound card and is not appropriate if one wants to address
> something like a PCM device or a codec.
> For a HDA codec, use a hwdep device.
OK, I understand I simply need to add a new case in hda_hwdep_ioctl().
>> My difficulty is how to define a code for my IOCTL and avoid
>> a conflict with the common code in the future.
> Pick something not yet allocated in Documentation/ioctl/ioctl-number.txt.
Since half of the lines in it are marked "Conflict!" anyway, should I only pay attention to not conflict with "sound/*" lines? And then add a new line for my IOCTLs? And should I put my IOCTL definitions in hda_hwdep.h or create a new file?
More information about the Alsa-devel