---
name: "snd_register_device"
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_register_device"
---

# snd\_register\_device(9)

Register the ALSA device file for the card

## NAME

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

## SYNOPSIS

**int snd\_register\_device(int** *type***, struct snd\_card \*** *card***, int** *dev***, const struct file\_operations \*** *f\_ops***, void \*** *private\_data***, 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**

*device*

the device to register

## 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
