'\" t .\" Title: snd_device_new .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Management of Cards and Devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SND_DEVICE_NEW" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Management of Cards and Device" .\" ----------------------------------------------------------------- .\" * 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_device_new \- create an ALSA device component .SH "SYNOPSIS" .HP \w'int\ snd_device_new('u .BI "int snd_device_new(struct\ snd_card\ *\ " "card" ", enum\ snd_device_type\ " "type" ", void\ *\ " "device_data" ", struct\ snd_device_ops\ *\ " "ops" ");" .SH "ARGUMENTS" .PP \fIcard\fR .RS 4 the card instance .RE .PP \fItype\fR .RS 4 the device type, SNDRV_DEV_XXX .RE .PP \fIdevice_data\fR .RS 4 the data pointer of this device .RE .PP \fIops\fR .RS 4 the operator table .RE .SH "DESCRIPTION" .PP Creates a new device component for the given data pointer\&. The device will be assigned to the card and managed together by the card\&. .PP The data pointer plays a role as the identifier, too, so the pointer address must be unique and unchanged\&. .SH "RETURN" .PP Zero if successful, or a negative error code on failure\&. .SH "COPYRIGHT" .br