'\" t .\" Title: snd_soc_dai_set_tdm_slot .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: ASoC .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SND_SOC_DAI_SET_TDM_" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "ASoC" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" snd_soc_dai_set_tdm_slot \- Configures a DAI for TDM operation .SH "SYNOPSIS" .HP \w'int\ snd_soc_dai_set_tdm_slot('u .BI "int snd_soc_dai_set_tdm_slot(struct\ snd_soc_dai\ *\ " "dai" ", unsigned\ int\ " "tx_mask" ", unsigned\ int\ " "rx_mask" ", int\ " "slots" ", int\ " "slot_width" ");" .SH "ARGUMENTS" .PP \fIdai\fR .RS 4 The DAI to configure .RE .PP \fItx_mask\fR .RS 4 bitmask representing active TX slots\&. .RE .PP \fIrx_mask\fR .RS 4 bitmask representing active RX slots\&. .RE .PP \fIslots\fR .RS 4 Number of slots in use\&. .RE .PP \fIslot_width\fR .RS 4 Width in bits for each slot\&. .RE .SH "DESCRIPTION" .PP This function configures the specified DAI for TDM operation\&. \fIslot\fR contains the total number of slots of the TDM stream and \fIslot_with\fR the width of each slot in bit clock cycles\&. \fItx_mask\fR and \fIrx_mask\fR are bitmasks specifying the active slots of the TDM stream for the specified DAI, i\&.e\&. which slots the DAI should write to or read from\&. If a bit is set the corresponding slot is active, if a bit is cleared the corresponding slot is inactive\&. Bit 0 maps to the first slot, bit 1 to the second slot and so on\&. The first active slot maps to the first channel of the DAI, the second active slot to the second channel and so on\&. .PP TDM mode can be disabled by passing 0 for \fIslots\fR\&. In this case \fItx_mask\fR, \fIrx_mask\fR and \fIslot_width\fR will be ignored\&. .PP Returns 0 on success, a negative error code otherwise\&. .SH "COPYRIGHT" .br