1SND_JACK_SET_KEY(9) Miscellaneous Functions SND_JACK_SET_KEY(9)
2
3
4
6 snd_jack_set_key - Set a key mapping on a jack
7
9 int snd_jack_set_key(struct snd_jack * jack, enum snd_jack_types type,
10 int keytype);
11
13 jack
14 The jack to configure
15
16 type
17 Jack report type for this key
18
19 keytype
20 Input layer key type to be reported
21
23 Map a SND_JACK_BTN_* button type to an input layer key, allowing
24 reporting of keys on accessories via the jack abstraction. If no
25 mapping is provided but keys are enabled in the jack type then BTN_n
26 numeric buttons will be reported.
27
28 If jacks are not reporting via the input API this call will have no
29 effect.
30
31 Note that this is intended to be use by simple devices with small
32 numbers of keys that can be reported. It is also possible to access the
33 input device directly - devices with complex input capabilities on
34 accessories should consider doing this rather than using this
35 abstraction.
36
37 This function may only be called prior to registration of the jack.
38
40 Zero if successful, or a negative error code on failure.
41
43Kernel Hackers Manual 3.10 June 2019 SND_JACK_SET_KEY(9)