snd_jack_set_key - Set a key mapping on a jack
2. SYNOPSIS ▲
int snd_jack_set_key(struct snd_jack * jack , enum snd_jack_types type , int keytype );
3. ARGUMENTS ▲
The jack to configure
Jack report type for this key
Input layer key type to be reported
4. DESCRIPTION ▲
Map a SND_JACK_BTN_ button type to an input layer key, allowing reporting of keys on accessories via the jack abstraction. If no mapping is provided but keys are enabled in the jack type then BTN_n numeric buttons will be reported.
If jacks are not reporting via the input API this call will have no effect.
Note that this is intended to be use by simple devices with small numbers of keys that can be reported. It is also possible to access the input device directly - devices with complex input capabilities on accessories should consider doing this rather than using this abstraction.
This function may only be called prior to registration of the jack.
5. RETURN ▲
Zero if successful, or a negative error code on failure.
6. COPYRIGHT ▲