---
name: "snd_ctl_replace"
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_ctl_replace"
---

# snd\_ctl\_replace(9)

replace the control instance of the card

## NAME

snd\_ctl\_replace - replace the control instance of the card

## SYNOPSIS

**int snd\_ctl\_replace(struct snd\_card \*** *card***, struct snd\_kcontrol \*** *kcontrol***, bool** *add\_on\_replace***);**

## ARGUMENTS

*card*

the card instance

*kcontrol*

the control instance to replace

*add\_on\_replace*

add the control if not already added

## DESCRIPTION

Replaces the given control. If the given control does not exist and the add\_on\_replace flag is set, the control is added. If the control exists, it is destroyed first.

It frees automatically the control which cannot be added or replaced.

## RETURN

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

## COPYRIGHT
