---
name: "snd_device_new"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/snd_device_new"
---

# snd\_device\_new(9)

create an ALSA device component

## NAME

snd\_device\_new - create an ALSA device component

## SYNOPSIS

**int snd\_device\_new(struct snd\_card \*** *card***, enum snd\_device\_type** *type***, void \*** *device\_data***, struct snd\_device\_ops \*** *ops***);**

## ARGUMENTS

*card*

the card instance

*type*

the device type, SNDRV\_DEV\_XXX

*device\_data*

the data pointer of this device

*ops*

the operator table

## DESCRIPTION

Creates a new device component for the given data pointer. The device will be assigned to the card and managed together by the card.

The data pointer plays a role as the identifier, too, so the pointer address must be unique and unchanged.

## RETURN

Zero if successful, or a negative error code on failure.

## COPYRIGHT
