'\" t .\" Title: snd_card_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_CARD_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_card_new \- create and initialize a soundcard structure .SH "SYNOPSIS" .HP \w'int\ snd_card_new('u .BI "int snd_card_new(struct\ device\ *\ " "parent" ", int\ " "idx" ", const\ char\ *\ " "xid" ", struct\ module\ *\ " "module" ", int\ " "extra_size" ", struct\ snd_card\ **\ " "card_ret" ");" .SH "ARGUMENTS" .PP \fIparent\fR .RS 4 the parent device object .RE .PP \fIidx\fR .RS 4 card index (address) [0 \&.\&.\&. (SNDRV_CARDS\-1)] .RE .PP \fIxid\fR .RS 4 card identification (ASCII string) .RE .PP \fImodule\fR .RS 4 top level module for locking .RE .PP \fIextra_size\fR .RS 4 allocate this extra size after the main soundcard structure .RE .PP \fIcard_ret\fR .RS 4 the pointer to store the created card instance .RE .SH "DESCRIPTION" .PP Creates and initializes a soundcard structure\&. .PP The function allocates snd_card instance via kzalloc with the given space for the driver to use freely\&. The allocated struct is stored in the given card_ret pointer\&. .SH "RETURN" .PP Zero if successful or a negative error code\&. .SH "COPYRIGHT" .br