'\" t .\" Title: snd_jack_set_key .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Miscellaneous Functions .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SND_JACK_SET_KEY" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Miscellaneous Functions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" snd_jack_set_key \- Set a key mapping on a jack .SH "SYNOPSIS" .HP \w'int\ snd_jack_set_key('u .BI "int snd_jack_set_key(struct\ snd_jack\ *\ " "jack" ", enum\ snd_jack_types\ " "type" ", int\ " "keytype" ");" .SH "ARGUMENTS" .PP \fIjack\fR .RS 4 The jack to configure .RE .PP \fItype\fR .RS 4 Jack report type for this key .RE .PP \fIkeytype\fR .RS 4 Input layer key type to be reported .RE .SH "DESCRIPTION" .PP 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\&. .PP If jacks are not reporting via the input API this call will have no effect\&. .PP 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\&. .PP This function may only be called prior to registration of the jack\&. .SH "RETURN" .PP Zero if successful, or a negative error code on failure\&. .SH "COPYRIGHT" .br