---
name: "snd_card_create"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/snd_card_create"
---

# snd\_card\_create(9)

create and initialize a soundcard structure

## NAME

snd\_card\_create - create and initialize a soundcard structure

## SYNOPSIS

**int snd\_card\_create(int** *idx***, const char \*** *xid***, struct module \*** *module***, int** *extra\_size***, struct snd\_card \*\*** *card\_ret***);**

## ARGUMENTS

*idx*

card index (address) \[0 ... (SNDRV\_CARDS-1)\]

*xid*

card identification (ASCII string)

*module*

top level module for locking

*extra\_size*

allocate this extra size after the main soundcard structure

*card\_ret*

the pointer to store the created card instance

## DESCRIPTION

Creates and initializes a soundcard structure.

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.

Returns zero if successful or a negative error code.

## COPYRIGHT
