---
name: "snd_register_device_for_dev"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/snd_register_device_for_dev"
---

# snd\_register\_device\_for\_dev(9)

Register the ALSA device file for the card

## NAME

snd\_register\_device\_for\_dev - Register the ALSA device file for the card

## SYNOPSIS

**int snd\_register\_device\_for\_dev(int** *type***, struct snd\_card \*** *card***, int** *dev***, const struct file\_operations \*** *f\_ops***, void \*** *private\_data***, const char \*** *name***, struct device \*** *device***);**

## ARGUMENTS

*type*

the device type, SNDRV\_DEVICE\_TYPE\_XXX

*card*

the card instance

*dev*

the device index

*f\_ops*

the file operations

*private\_data*

user pointer for f\_ops-\>**open**

*name*

the device file name

*device*

the struct device to link this new device to

## DESCRIPTION

Registers an ALSA device file for the given card. The operators have to be set in reg parameter.

## RETURN

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

## COPYRIGHT
